Collectors

Collector logging

From Settings | Collectors you can control how much information is logged by your collector and how long these log files are retained.  

 

Adjusting log levels

You may want to adjust log levels to increase how much information is logged to debug an issue, or to decrease how much information is logged to save disk space.  Select the Logs icon for the desired collector (from Settings | Collectors) and then select manage to see the log levels on a per component basis for that collector:

Adjusting log levels

The log level for each collector component controls what information is logged for that component.  Available log levels are:

  • trace - this log level is the most verbose, and will log every action of the collector in full detail.  Note that this can use a significant amount of disk space if your collector is actively monitoring a large number of devices, and as such is typically only recommended for debugging purposes.
  • debug - detailed information about collector tasks will be logged (not as much information as trace log level).  The debug log level can make it easier to identify an issue and track down the root cause.
  • info - this is the default log level, and will log basic information about collector tasks.
  • warn - information will only be logged when something isn't quite right, but it may not be causing an issue yet.
  • error - information will only be logged when something is wrong.
  • disable - no information will be logged.

 

As an example, you might write a script datasource and your collector is getting no data, but you can't figure out the problem.  You could increase the log level for the collector.script component to debug or trace and then look at the logs (either using the collector debug facility or on the collector machine itself) to troubleshoot the issue.

 

Changing log file retention

Collector log files are rotated based on size, not date.  By default, there are 3 log files of 64M each.  If you'd like to change these numbers, you can do so in the wrapper.conf file (in the conf directory) where the collector is installed.  You can edit the wrapper.conf file in the conf directory on the collector machine itself, OR you can edit the file directly from your LogicMonitor account UI.  Navigate to Settings | Collectors and select manage for the desired collector.  From the dropdown menu select Collector Configuration and then select the Wrapper Config tab.  Locate the Wrapper Logging Properties and change these values (make sure to override the Wrapper.config before saving and restarting):

Changing log file retention

Sending logs to LogicMonitor

From the Manage dialog you can send your logs to LogicMonitor support.  This might be useful if you are collaborating with our support team and would like them to be able to look through your collector log files.  Select the manage gear icon for the desired collector and then select 'Send logs to LogicMonitor':

Sending logs to LogicMonitor

Logs that you've sent to LogicMonitor support will be displayed in the Logs section for that Collector.  Filter based on time range to limit what is displayed: