
Email and Groupware
check_mail_loop_delay
Description:
Minimalistic email loop delay check perl script. It sends a probe message, forks, then parent returns to Nagios, child sleeps for threshold(s) and awakes/receive/deletes probe message and notifies Nagios submitting as passive check result. No smtp authentication. Receives either from pop3 or imap mail servers.
Current Version
Last Release Date
August 4, 2014
Compatible With
- Nagios 1.x
- Nagios 2.x
- Nagios 3.x
- Nagios 4.x
Owner
License
GPL
Project Files
File | Description |
---|---|
check_mail_loop_delay.pl |
Project Notes
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$"
Reviews
(0)
Add a Review
Add a Review
You must be logged in to submit a review.
Thank you for your review!
Your review has been submitted and is pending approval.
Recommend
To:
From:
Thank you for your recommendation!
Your recommendation has been sent.
Page Sections
Project Stats
Rating
0 (0)
Favorites
0
Views
18,640