Email and Groupware

check_unread_mails

Description:

Connect to a remote mailbox using IMAPS protocol and count uread mails in selected folders.
On threshold, raise alarm.

Current Version

1.0

Last Release Date

2014-07-29

Compatible With

  • Nagios 4.x

License

GPL


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!
Project Files
Project Photos
Project Notes
Main functions : 1 - Open a SSL connection with the mail server 2 - Open an IMAPS connection to the mail server with uer,password 3 - Check connection establishment time and, if necessary, raise an appropriate alarm 4 - For each folder given as input parameter, count mails (unseen or present) and raise an appropriate alarm is necessary. Each mesure and count is treated as a nagios performance value. Input parameters -u : this user must be present in the file /usr/local/nagios/libexec/mdp.txt. The associated password is stored encrypted in the same file -l : comma separated list of folders to analyze -w : in number of unread mails -c : in number of unread mails -D [P|U] P: count mails present in the folder U: count unseen mails in the folder A specific option allows the creation of the user,password file ./check_unread_mails.pl -u -g ex: [nagios@server libexec]$ ./check_unread_mails -u myUser -g myPassword couple(myUser;U2FsdGVkX18wX1YGWM1Le6fYZz2owCbdMuB1yFdUUvY=): successfuly recorded [nagios@server libexec]$ In tyhis case, the file /usr/local/nagios/libexec/mdp.txt is updated with one line corresponding to the user myUser. Run example : [nagios@server libexec]$ ./check_unread_mails -u myUser -l [FOLDER-01,FOLDER-02,FOLDER-03,INBOX] -D P UNREAD_MAILS OK | mailboxAccess=1708ms;3000;5000 FOLDER-01=2;50;90 FOLDER-02=0;50;90 FOLDER-03=5;50;90 INBOX=0;50;90 [nagios@server libexec]$ This plugin requires some specific perl modules :
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.

Project Stats
Rating
0 (0)
Favorites
0
Views
20,919