Home Directory Plugins Operating Systems Linux check grep command output

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

Directory Tree

check grep command output

Rating
1 vote
Favoured:
1
Current Version
1.1
Last Release Date
2011-11-04
Compatible With
  • Nagios 3.x
Owner
License
MPL
Hits
96249
Files:
FileDescription
check_execgrep.plcheck_execgrep.pl
Nagios CSP

Meet The New Nagios Core Services Platform

Built on over 25 years of monitoring experience, the Nagios Core Services Platform provides insightful monitoring dashboards, time-saving monitoring wizards, and unmatched ease of use. Use it for free indefinitely.

Monitoring Made Magically Better

  • Nagios Core on Overdrive
  • Powerful Monitoring Dashboards
  • Time-Saving Configuration Wizards
  • Open Source Powered Monitoring On Steroids
  • And So Much More!
This plugin executes a given command and greps for spedified patterns in the output. It uses perl regex for matching.
Usage: check_execgrep.pl --help
check_execgrep.pl [--contains YES|NO] --warning REGEX --critical REGEX --command Sring
[--parameter String]

Options:
--help
Print detailed this screen
--version
Print version information
--contains YES|NO
Defines if the command output must or must not contain
the patterns defined in warning and critical (Default: YES)
--warning REGEX
Regex to search for in command output for warning.
--critical REGEX
Regex to search for in command output for critical.
--command STRING
Command to be executed.
--parameter STRING
Parameter for the command.

Examples:
check_execgrep.pl --contains YES --warning "d{2}" --critical 333 --command /bin/bla

This returns a warning if the output of /bin/bla contains two
digist (e.g. 23 or 01) and a critical if 333 was found.

check_execgrep.pl --contains NO --warning 22 --critical b --command /bin/cat --parameter /etc/services

Execute `/bin/cat /etc/services` and send warning if NO "22" was found and
critical if NO "b" was found in output.

This plugin is NOT developped by the Nagios Plugin group.
Please do not e-mail them for support on this plugin, since
they won't know what you're talking about.

For contact info, read the plugin itself...