Log

Name

Log -- Scan log file for strings

Synopsis

{ 'type'      : 'Log' ,
  'subents'   : [
                  {
                   'status'   : 'on' ,
                   'name'     : 'CrashDump',
                   'logFile'  : '/var/log/messages',
                   'matchMesg': 'Reboot after panic detected',
                   'triggers' : [{ 'level' : 'warn', trigger:'/reboot after panic/' }, ],
                  }
                 ]
 }

Description

The Log Entity monitors the specified logfile messages and triggers when log entries match specified regular expressions. The Entity always scans the entire logFile.

Fields

name

A descriptive name for this subentity.

logFile

The name of the log file to scan.

matchMesg

The message to send as the status message to the Server when the regular expressions in this SubEntity match. If not specified, the message defaults to "Matched regular expression."

matchFlags

A list of flags to pass to the regular expression module to change its behavior. For example, to request a case-insensitive search, use IGNORECASE.

Trigger

The Trigger fires if the regular expression in trigger returns a match.