Using a Standalone Logwatcher
  • 1 Minute to read
  • Dark
    Light
  • PDF

Using a Standalone Logwatcher

  • Dark
    Light
  • PDF

Article Summary

The main purpose of the Standalone Logwatcher is to monitor a file you find important, like the Apache log for example. You can use the Standalone Logwatcher to upload the contents of these files as they are updated to Retrace which then the contents will be view-able via the Logs Dashboard. Only one file can be monitored per path, if you have multiple files you wish to monitor you must configure the path for each of them separately.

Note: This feature is only available within the Linux monitoring agent.

You will need to add the following parameters to the /usr/local/stackify/stackify-agent/stackify-agent.conf file:

stackify.log.monitor.log_file_name.path="path_of_log_file"
stackify.log.monitor.log_file_name.app="app_name"

Replace log_file_name with the name of your log file, or any name you like, to designate the file that you are configuring for the logwatcher. Be sure to also replace path_of_log_file and app_name with their appropriate values.

Optional Configuration

Date Format option:

By default, formatting uses the Java date formatting patterns: SimpleDateFormat

#date: Scans each line using supplied format
stackify.log.monitor.log_file_name.dateFormat="date_format"

Example:

stackify.log.monitor.myapp.dateFormat="MM/dd/yyyy HH:mm:ss"

Start at the end of the file option:

#startEndOfFile: Starts log collection from the beginning of the file
stackify.log.monitor.log_file_name.startEndOfFile="FALSE"

Note: By default, the setting startEndOfFile is set to “TRUE”.

Full Configuration Example

The following configuration is an example for syslog log files:

#Syslog
stackify.log.monitor.syslog.path="/var/log/syslog"
stackify.log.monitor.syslog.app="Ubuntu Syslog"
stackify.log.monitor.syslog.dateFormat="MM/dd/yyyy HH:mm:ss"
stackify.log.monitor.syslog.startEndOfFile="FALSE"

Note: Once you have made the changes to the stackify-agent.conf file, you will need to restart the Linux agent.


Was this article helpful?