Search Exchange
Search All Sites
Nagios Live Webinars
Let our experts show you how Nagios can help your organization.Login
Directory Tree
check_unread_mails
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!
On threshold, raise alarm.
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 :
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
-l
-w
-c
-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
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)
Be the first to review this listing!