About :
This article covers the steps involved in collecting logs from a NetFoundry ziti-edge-tunnel endpoint.
Method 1
If you are running the ZET as systemd. Follow the below steps
Steps:
1. Increase Log Level: Set the log level to DEBUG to identify the activity that is occurring at the same time as the problem.
# set the logLevel to "debug" in /var/lib/ziti/config.json
sudo -u ziti ziti-edge-tunnel set_log_level --loglevel DEBUG
The tunneler obeys the value of logLevel in /var/lib/ziti/config.json. The initial value may be set with run --verbose 4, but setting this option on subsequent runs has no effect on log level.
2. Capture the Current Process Log
journalctl _SYSTEMD_INVOCATION_ID=$(systemctl show -p InvocationID --value ziti-edge-tunnel.service) -l \
| tee /tmp/ziti-edge-tunnel.log
Method 2
If you are running ZET directly with the package, follow the below steps
Steps:
1. Run the transparent intercepting proxy (tun device) with built-in nameserver.
sudo ./ziti-edge-tunnel run --identity myTunneler.json
2. Generate logs and re-direct to file “log” instead of your screen.
sudo ./ziti-edge-tunnel run --verbose 6 --identity myTunneler.json 2>>log.txt
Setting the logging level
At times, our customer support team might ask for increasing the logging level for collecting more information.
Logs are by default collected with log level 3 and for troubleshooting issues, NetFoundry Support team would request for logs with detailed level (log level 6).
Note: make sure to bring back the log level to 3 once the issue is resolved to prevent disk space being over utilized
Handling tunneler crash:
- If the tunneler is crashing then it may be crucial to collect and analyze the core dump file. You may need to enable saving core dumps depending upon your OS configuration.
- You can see how dump files are handled by inspecting this file, which is from Ubuntu 20.10.
❯ cat /proc/sys/kernel/core_pattern
|/usr/share/apport/apport %p %s %c %d %P %E
In this case the dump is handled by apport which saves the file in /var/crash.
Attaching logs
Logs up to 15 MB can be sent over e-mail to Netfoundry Support. However, logs up to 50 MB can be uploaded by logging into NetFoundry Support Hub Portal.