Search Exchange

Search All Sites

Nagios Live Webinars

Let our experts show you how Nagios can help your organization.

Contact Us

Phone: 1-888-NAGIOS-1
Email: sales@nagios.com

Login

Remember Me
Don't miss your chance to attend the 2014 Nagios World conference!

Don't miss your chance to attend the 2014 Nagios World Conference, Oct 13-16th. Informative Sessions, Networking, Food and Cocktails! Visit go.nagios.com/conference/ for more information or to register.


check_pattern

Bookmark and Share

Current Version
1
Last Release Date
2013-10-21
Compatible With
  • Nagios 3.x
Owner
E-mail
License
GPL
Hits
14767
Files:
FileDescription
check_pattern.pycheck file for pattern
Check file for pattern
Written in Python 2.6
check_pattern is used to scan the lines of a file for expressions used in python.
It allow to schedule check on several time and send matched result to file or mail to recipient

Usage: check_pattern.py [options]

Options:
-h, --help show this help message and exit
-p, --showpattern show pattern help
-n NAME, --name=NAME name your search (Ex: errors, monster... one at time)
-f FILE, --file=FILE file location
-s TIMES, --schedule=TIMES
STARTTIME-ENDTIME (Ex: 07:00-17:45,19:00-20:00)
default: 00:00-23:59
-o OFFDAY, --off=OFFDAY
exclude days (Ex: Sunday,Saturday)
default: None
-e ERRORS, --error=ERRORS
error patterns to search (Ex: "error|caused by" OR
"^server" OR etc.)
-i, --ignorecase ignore case sensitive
-q, --quite do not print matched search
--line=LINE number of last lines to check. Default: entire file
--outfile=OUTFILE output result to FILE
--mailto=OUTMAIL send result to RECIPIENT (use "mail" command)