#============================================================================== # # USING WOTS # # typical usage: # # ./wots.pl --config=/path/to/wotsrc/file # # Further sections in this README: # COMMAND LINE OPTIONS # GENERAL CONFIGURATION PARAMETERS # FILES SEARCHED # ACTIONS TO A FOUND PATTERN # BEHAVIOR CHANGING # #============================================================================== # # COMMAND LINE OPTIONS # # config ==> specifies the location of the config file, this one you'll need # debug (See section "GENERAL CONFIGURATION PARAMETERS") # version (See section "GENERAL CONFIGURATION PARAMETERS") # daemon (See section "GENERAL CONFIGURATION PARAMETERS") # include_old_lines Normally, wots starts at the end of the monitored files # and checks only new lines, with this option it will # include the original lines once as well # This option is only available from the commandline # Values: on|off # Default: off # # More options are possible, but it is safer to specify as much as possible # in the config file, where you have more options as well # #============================================================================== # GENERAL CONFIGURATION PARAMETERS # # change the value by using "config " # in the config file # all possible parameters are: # # daemon on|off: wether to fork and run as a daemon # You need to specify this!!!! # # lsprog path to "ls", especially needed on windows # defaults to just "ls" # # syslogfacility facility used when sending something to syslog # default: user # # syslogpriority priority used when sending something to syslog # default: info # # debug "on" or "off" # default: off # # poll the number of seconds to sleep before rechecking # the monitored files, default: 5 # # count max number of checks to perform before stopping # 0 means no limit, default: 0 # # restartinterval after how many passes (see poll param) you want # to restart the program to prevent memory leaks # 0 means no restarting, default: 6000 # # logisaliveinterval after how many passes (see poll param) you want # to log a message to the isalivelog, if defined # default: 3000 passes # # isalivelog path to a file where wots logs a message every 6000 passes # to show it is still alive # By default this is emtpy and thus not used # # mailmethod smtp or sendmail, default smtp # mailserver if mailmethod is smtp, mention the name or IP of the nameserver # by default, this is localhost # # close_and_reopen on unix systems, it doesn't matter if a file is open # when rotating, but on windows this locks the file # So by default this is "off" on *nix systems and # "on" on windows #============================================================================== # # FILES SEARCHED # # The files you want searched can have wildcards and even expressions, eg: # # from /var/log/`date +%Y%m%d`.audit # from /opt/websphere/*/SystemErr.log # from c:\nagios\wots.log # # For each mentioned from line, you need to specify the patterns (perl regex) # you want to search for, and the actions taken when found # #============================================================================== # # ACTIONS TO A FOUND PATTERN # # a found pattern needs an action, possible actions are: # syslog # mail # exec # sendnsca # ignore # See the example wotsrc file for example usages of these # #============================================================================== # # BEHAVIOR CHANGING # # Normally, when a pattern is found, the action wanted is executed and the line # is not looked at again, so patterns further down are not matched # This behavior can be changed by adding a option before the action parameter # Possible options are: # # continue If a line matches the pattern, do the action and continue with # further pattern mathing on this line # ignore_rest_file If the line matches the pattern, execute the action # but stop parsing the rest of the file afterwards # # See the example wotsrc file for example usages of these # #==============================================================================