Search Exchange
Search All Sites
Nagios Live Webinars
Let our experts show you how Nagios can help your organization.Login
Directory Tree
check_imap_login Plugin
100257
File | Description |
---|---|
check_imap_login.txt | check_imap_login.txt |
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 plugin check if a imap log is executed correctly.
It support IMAP and IMAPS (IMAP + SSL)
It support IMAP and IMAPS (IMAP + SSL)
Reviews (4)
byhenryudha, June 10, 2015
great script.
working on my enviroment.
thanks mate!
working on my enviroment.
thanks mate!
byisavcic, December 13, 2012
We have made a modification of this script for tracking the IMAP response time, with warning and critical thresholds attached to it, as well as printing out the performance data.
You can find the modified version here:
https://github.com/isavcic/check_imap_login
Thanks for the original script!
You can find the modified version here:
https://github.com/isavcic/check_imap_login
Thanks for the original script!
bydcodix, September 6, 2012
Works OK for me,...
What I saw is that in case the imap server goes down, the check breaks and returns a lot of garbage and exits with "1" (warning). The same happens in case the port is not up.
I made a small modification:
--- 1/check_imap 2012-09-06 13:53:44.760047791 +0200
+++ 2/check_imap 2012-09-06 13:54:08.590047801 +0200
@@ -43,9 +43,17 @@
return 1
if use_ssl:
- M = imaplib.IMAP4_SSL(host=host)
+ try:
+ M = imaplib.IMAP4_SSL(host=host)
+ except Exception, e:
+ print "CRITICAL: IMAP connection not Successful: %s" % e
+ sys.exit(2)
else:
- M = imaplib.IMAP4(host)
+ try:
+ M = imaplib.IMAP4(host)
+ except Exception, e:
+ print "CRITICAL: IMAP connection not Successful: %s" % e
+ sys.exit(2)
try:
M.login(user, password)
Thanks for the check!
What I saw is that in case the imap server goes down, the check breaks and returns a lot of garbage and exits with "1" (warning). The same happens in case the port is not up.
I made a small modification:
--- 1/check_imap 2012-09-06 13:53:44.760047791 +0200
+++ 2/check_imap 2012-09-06 13:54:08.590047801 +0200
@@ -43,9 +43,17 @@
return 1
if use_ssl:
- M = imaplib.IMAP4_SSL(host=host)
+ try:
+ M = imaplib.IMAP4_SSL(host=host)
+ except Exception, e:
+ print "CRITICAL: IMAP connection not Successful: %s" % e
+ sys.exit(2)
else:
- M = imaplib.IMAP4(host)
+ try:
+ M = imaplib.IMAP4(host)
+ except Exception, e:
+ print "CRITICAL: IMAP connection not Successful: %s" % e
+ sys.exit(2)
try:
M.login(user, password)
Thanks for the check!