Search Exchange
Search All Sites
Nagios Live Webinars
Let our experts show you how Nagios can help your organization.Login
Directory Tree
check_mail_loop_delay
- Nagios 1.x
- Nagios 2.x
- Nagios 3.x
- Nagios 4.x
GPL
18639
File | Description |
---|---|
check_mail_loop_delay.pl | check_mail_loop_delay.pl |
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 script is an hybrid of active and passive check plugin. It forks to run a child process which submits final results of the mail loop as passive check through Nagios command file.
First the parent process sends a probe message connecting to an MTA server without client authentication and returns immediately to Nagios with the same service state it was given at command line and notifying of the message sent and its timestamp.
The child process detaches from parent process and sleeps for a warning threshold period of time. It then awakes and connects to the mail box server to receive the probe message sent by the parent process and to delete it if it founds it. Otherwise it sleeps again until critical threshold and retries connection and deletion again, submitting results before exiting.
Based on the found (or missing) probe within (out of) thresholds, Nagios is notified with "OK" if probe message is found in mail box after the first connection, "WARNING" if found after the second or "CRITICAL" if not found. Also it is informed of possible delayed messages arrived from previous executions of the plugin.
Nagios main config file options affecting this plugin:
- accept_passive_service_checks=1
- check_external_commands=1
- command_file=
Service definition directives suggested for this plugin:
- command_check_interval gt (warning + critical thresholds)[s]
- max_check_attempts=1
Possible usage in Nagios check command definition:
command_line $USER1$/check_mail_loop_delay.pl
-H "$HOSTNAME$" -D "$SERVICEDESC$" -S "$SERVICESTATEID$" -A "$ARG1$" -M "$ARG2$" -F "$ARG3$" -T "$ARG4$" -P "$ARG5$" -u "$ARG6$" -p "$ARG7$" -w "$ARG8$" -c "$ARG9" -f "$ARG10$"
First the parent process sends a probe message connecting to an MTA server without client authentication and returns immediately to Nagios with the same service state it was given at command line and notifying of the message sent and its timestamp.
The child process detaches from parent process and sleeps for a warning threshold period of time. It then awakes and connects to the mail box server to receive the probe message sent by the parent process and to delete it if it founds it. Otherwise it sleeps again until critical threshold and retries connection and deletion again, submitting results before exiting.
Based on the found (or missing) probe within (out of) thresholds, Nagios is notified with "OK" if probe message is found in mail box after the first connection, "WARNING" if found after the second or "CRITICAL" if not found. Also it is informed of possible delayed messages arrived from previous executions of the plugin.
Nagios main config file options affecting this plugin:
- accept_passive_service_checks=1
- check_external_commands=1
- command_file=
Service definition directives suggested for this plugin:
- command_check_interval gt (warning + critical thresholds)[s]
- max_check_attempts=1
Possible usage in Nagios check command definition:
command_line $USER1$/check_mail_loop_delay.pl
-H "$HOSTNAME$" -D "$SERVICEDESC$" -S "$SERVICESTATEID$" -A "$ARG1$" -M "$ARG2$" -F "$ARG3$" -T "$ARG4$" -P "$ARG5$" -u "$ARG6$" -p "$ARG7$" -w "$ARG8$" -c "$ARG9" -f "$ARG10$"
Reviews (0)
Be the first to review this listing!