Search Exchange
Search All Sites
Nagios Live Webinars
Let our experts show you how Nagios can help your organization.Login
Directory Tree
check_wrapper
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!
The check_wrapper plugin has been developed to facilitate testing of the nagios system itself. The plugin can be wrapped around any other plugin and can be configured to insert simulated error codes. It can also be used to log in syslog the invocation of a plugin with the exact command line parameters provided by the nagios system.
The check_wrapper invocation can be added to the nrpe config as follows:
command[check_smart]=/usr/lib/nagios/plugins/check_wrapper check_ide_smart -d '$ARG1$' –n
The wrapper assumes that the plugin is supposed to call is installed in the same directory as the wrapper itself. It will derive the path to the plugin, in this case check_ide_smart, by pre-pending the check_wrapper dirname, in this case /usr/lib/nagios/plugins.
The wrapper maintains a configuration file in /var/lib/nagios/logs but can optionally maintain a different file. The wrapper is configured by executing it with the –configure flag, followed by the plugin name, the error code and the number of times the error code has to be returned. For every run after it decrements a counter and once the counter has reached zero it will invoke the plugin as normal. Normal operation can be resumed before the counter has reached zero by running the wrapper with the –reset flag for a plugin and it can be reset for all by running the wrapper with the –reset all option.
The wrapper can be configured to log the invocation of a plugin. By running the wrapper with the –log flag, invocation of that plugin will be syslogged until further notice. By running the wrapper with the –nolog flag, the logging for that plugin is disabled. By specifying the keyword all, all logging is disabled.
Output of check_wrapper -h:
Nagios Plugin Wrapper to test the Nagios system by simulating a return code and by syslogging the invokation
Usage: check_wrapper --help
check_wrapper --version
check_wrapper [--file config file] --configure
check_wrapper [--file config file] --reset|all
check_wrapper [--file config file] --log
check_wrapper [--file config file] --nolog|all
check_wrapper [--file config file] [nagios plugin options]
--help Print help message
--version Print version
--configure Configure the to return the the next times
--reset Remove the configuration of the for the or all plugins
--log Enables logging to syslog of every invocation of the and arguments
--nolog Disables logging to syslog of or all plugins
--file Specify the path to the check_wrapper configuration file
Error Codes: WARNING CRITICAL OK DEPENDENT UNKNOWN
The should be greater than zero.
If no check_wrapper options are specified, the wrapper checks whether the plugin is
in test mode. If it is then the wrapper will return the specifed return code. If it
not then the wrapper will execute the plugin with the remaining arguments. By
inserting a call to check_wrapper in the nagios configuration or nrpe.cfg nagios can
be instrumented with this test capability
The wrapper also accepts the old style command line options
This module maintains a configuration file that has to be writable by the nagios system.
The full path is: /var/lib/nagios/logs/check_wrapper
The Nagios check_wrapper plugin has been developed by 2024Sight (www.2024sight.com)
The check_wrapper invocation can be added to the nrpe config as follows:
command[check_smart]=/usr/lib/nagios/plugins/check_wrapper check_ide_smart -d '$ARG1$' –n
The wrapper assumes that the plugin is supposed to call is installed in the same directory as the wrapper itself. It will derive the path to the plugin, in this case check_ide_smart, by pre-pending the check_wrapper dirname, in this case /usr/lib/nagios/plugins.
The wrapper maintains a configuration file in /var/lib/nagios/logs but can optionally maintain a different file. The wrapper is configured by executing it with the –configure flag, followed by the plugin name, the error code and the number of times the error code has to be returned. For every run after it decrements a counter and once the counter has reached zero it will invoke the plugin as normal. Normal operation can be resumed before the counter has reached zero by running the wrapper with the –reset flag for a plugin and it can be reset for all by running the wrapper with the –reset all option.
The wrapper can be configured to log the invocation of a plugin. By running the wrapper with the –log flag, invocation of that plugin will be syslogged until further notice. By running the wrapper with the –nolog flag, the logging for that plugin is disabled. By specifying the keyword all, all logging is disabled.
Output of check_wrapper -h:
Nagios Plugin Wrapper to test the Nagios system by simulating a return code and by syslogging the invokation
Usage: check_wrapper --help
check_wrapper --version
check_wrapper [--file config file] --configure
check_wrapper [--file config file] --reset
check_wrapper [--file config file] --log
check_wrapper [--file config file] --nolog
check_wrapper [--file config file]
--help Print help message
--version Print version
--configure Configure the
--reset Remove the configuration of the
--log Enables logging to syslog of every invocation of the
--nolog Disables logging to syslog of
--file Specify the path to the check_wrapper configuration file
Error Codes: WARNING CRITICAL OK DEPENDENT UNKNOWN
The
If no check_wrapper options are specified, the wrapper checks whether the plugin is
in test mode. If it is then the wrapper will return the specifed return code. If it
not then the wrapper will execute the plugin with the remaining arguments. By
inserting a call to check_wrapper in the nagios configuration or nrpe.cfg nagios can
be instrumented with this test capability
The wrapper also accepts the old style command line options
This module maintains a configuration file that has to be writable by the nagios system.
The full path is: /var/lib/nagios/logs/check_wrapper
The Nagios check_wrapper plugin has been developed by 2024Sight (www.2024sight.com)
Reviews (0)
Be the first to review this listing!