Skip to content

Commit 11a7ea4

Browse files
committed
Reworked section to accomodate new log options and detils
1 parent 60c48e2 commit 11a7ea4

1 file changed

Lines changed: 22 additions & 5 deletions

File tree

memdocs/intune/protect/microsoft-tunnel-monitor.md

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -141,15 +141,32 @@ For more information and command-line examples, see [mst-cli command-line tool f
141141

142142
## View Microsoft Tunnel logs
143143

144-
Microsoft Tunnel logs information to the Linux server logs in the *syslog* format. To view log entries, use the **journalctl -t** command followed by one or more tags that are specific to Microsoft Tunnel entries:
144+
Microsoft Tunnel logs information to the Linux server logs in the *syslog* format. To view log entries, use the **journalctl -t** command followed by one or more tags that are specific to Microsoft Tunnel entries:
145145

146-
- **ocserv** - Display server logs.
147146
- **mstunnel-agent**: Display agent logs.
148147
- **mstunnel_monitor**: Display monitoring task logs.
149-
150-
For example, to view information for only the tunnel server, run `journalctl -t ocserv`. To view information for all three, you can run `journalctl -t ocserv -t mstunnel-agent -t mstunnel_monitor`.
148+
- **ocserv** - Display server logs.
149+
- **ocserv-access** - Display access logs.
150+
151+
By default, access logging is disabled. Enabling access logs can reduce performance, depending on the number of active connections and usage patterns on the server. Logging for DNS connections increases the verbosity of the logs, which can become noisy.
152+
153+
Access logs have the following format: `<Server timestamp><Server Name><ProcessID on Server><userId><deviceId><protocol><src IP and port><dst IP and port><bytes sent><bytes received><connection time in seconds>` For example:
154+
155+
- *Feb 25 16:37:56 MSTunnelTest-VM ocserv-access[9528]: ACCESS_LOG,41150dc4-238x-4dwv-9q89-55e987f30c32,f5132455-ef2dd-225a-a693-afbbqed482dce,tcp,169.254.54.149:49462,10.88.0.5:80,112,60,10*
156+
157+
To enable access logging:
158+
159+
1. set TRACE_SESSIONS=1 in /etc/mstunnel/env.sh
160+
2. set TRACE_SESSIONS=2 to include logging for DNS connections
161+
3. Run `mst-cli server restart` to restart the server.
162+
163+
If access logs are too noisy, you can turn off DNS connection logging by setting TRACE_SESSIONS=1 and restarting the server.
164+
165+
Command line examples for *journalctl*:
151166

152-
You can add `-f` to the command to display an active and continuing view of the log file. For example, to actively monitor ongoing processes for Microsoft Tunnel, run `journalctl -t mstunnel_monitor -f`.
167+
- To view information for only the tunnel server, run `journalctl -t ocserv`.
168+
- To view information for all log options, you can run `journalctl -t ocserv -t ocserv-access -t mstunnel-agent -t mstunnel_monitor`.
169+
- Add `-f` to the command to display an active and continuing view of the log file. For example, to actively monitor ongoing processes for Microsoft Tunnel, run `journalctl -t mstunnel_monitor -f`.
153170

154171
More options for *journalctl*:
155172

0 commit comments

Comments
 (0)