The watch logfile directive lets you add log monitor entries to the Log Monitor table directly in the sysedge.cf file. The arguments represent columns in the Log Monitor table.
Add a line to the sysedge.cf file in the agent data directory using the syntax described below, save the file, and restart the agent for the change to take effect.
Use the watch logfile directive to add entries to the Log Monitor table as follows:
watch logfile index flags 'file' 'regexpr' ['descr'['action'[interval[severity]]]]
Specifies the row (index) of the monitor table to use for this entry. Each row in the table is uniquely identified by an index number. Rows 1 through 10 are reserved for internal use by the agent, so the index value must be greater than 10 and unique across the table.
Specifies any additional behavioral instructions for this entry using a hexadecimal flags value (for example, 0x00000001). For more information about available flags, see Log Monitor Table Flags.
Specifies the complete path and file name of the log file to monitor, or the complete path of the directory to monitor. You can specify this parameter including wildcard characters such as * and ?.
The file you monitor must be an ASCII-based text file. SystemEDGE does not support monitoring of other character sets, such as Unicode.
You can determine a file's encoding by opening it in a text editor and selecting Save As. The encoding is listed in the Save as type field.
Specifies the regular expression to use when scanning the log file for matches. SystemEDGE supports log file regular expressions of up to 512 characters. This parameter is ignored when you are monitoring a directory.
Specifies an arbitrary description (0 to 512 characters in length) of the table entry.
Specifies a command (0 to 2048 characters in length), including the full path and any parameters, to run when the regular expression is matched and a trap is sent. If the string is empty, the agent performs no action for this entry.
Note: You can change the default settings for when the agent performs actions. For more information, see the chapter "Agent Configuration."
Specifies how often to monitor this entry in minutes. Valid interval range is 1 -1440 minutes.
Default: 1
Specifies the severity to assign to the entry when a match occurs and a trap is sent. The severity is included with the trap. Valid values are as follows:
Note that the severity designation only specifies the importance of the monitor and is not used to calculate status.
Default: none
Copyright © 2013 CA. All rights reserved. |
|