View an agent’s logs
NXLog Agent writes log records about its operation to a file. You can view an agent’s logs within NXLog Platform or on the computer where NXLog Agent is installed. The latter is beneficial for troubleshooting communication issues between the agent and NXLog Platform.
View an agent’s logs from NXLog Platform
There are two ways to retrieve an agent’s logs from NXLog Platform. Both methods yield the same result.
Method 1
-
Navigate to Agents from the left navigation menu.
-
Locate the agent in the agents' table. See Agent properties and selectors for information on how to build a search query.
-
Click the Actions menu for your agent and choose View Logs.
Method 2
-
Navigate to Agents from the left navigation menu.
-
Locate the agent in the agents' table and click on its name. See Agent properties and selectors for information on how to build a search query.
-
In the Agent Details panel, click the Actions menu, then choose View Logs.
For both methods, you should see the agent’s logs similar to the following screenshot:
View an agent’s logs on the host
You can view the agent’s logs on the computer where you installed NXLog Agent.
The default log file location is C:\Program Files\nxlog\data\nxlog.log
on Windows and /opt/nxlog/var/log/nxlog/nxlog.log
on Linux-based systems.
You can change the log file location with the LogFile global directive, which must resolve to an existing directory.
Open the file with a text editor, and you should see NXLog Agent logging similar to the following screenshot: