Home Directory Plugins Email and Groupware check_mail_loop_delay

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_mail_loop_delay

Rating
0 votes
Favoured:
0
Compatible With
  • Nagios 1.x
  • Nagios 2.x
  • Nagios 3.x
  • Nagios 4.x
Owner
License
GPL
Hits
18249
Files:
FileDescription
check_mail_loop_delay.plcheck_mail_loop_delay.pl
Network Monitoring Software - Download Nagios XI
Log Management Software - Nagios Log Server - Download
Netflow Analysis Software - Nagios Network Analyzer - Download
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.
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$"