Build precise queries to find exactly what you need
Press ESC to close
Your review has been submitted and is pending approval.
Check mail server statistics like how many messages sent, received, bounced, rejected, virus, spam. This plugin make use of mailgraph to analyse mail server log and get the statistics counter.
Current Version
0.9.1
Last Release Date
2011-03-17
Owner
Curu Wong
Website
http://www.linuxplayer.org
Download URL
http://www.linuxplayer.org/2010/12/check_mailstat-pl-a-nagios-plugin-for-monitoring-mail-server-statistics
License
GPL
Compatible With
mailgraph is a good tool at analysing mail server log, it supports many MTA(including sendmail, postfix, exim,etc.), with support for mailscanner,spamassassin,etc.
As a whole, mailgraph can tell mail server statistics like how many messages sent/ received/ bounced/ rejected/ virus/ spam per time interval, which can be used as a sign of mail server healthy.
This plugin includes a patch for mailgraph so that it will also output its statistics counter to an external file(plus the rra file),and a check_mailstat.pl which check the stat counter to see if it's ok, emit WARN/CRITICAl result if not.It can run on nagios server, or on remote server via NRPE.
I download you plugin to test it but it didn't work for me and give me this error Remote host: I run command ./check_mailstat.pl -w 5:0:0:0:0:0 -c 10:0:0:0:0:0 OK: sent:0.03 received:0.03 bounced:0.00 rejected:0.00 virus:0.03 spam:0.00 |sent=0.03 received=0.03 bounced=0.00 rejected=0.00 virus=0.03 spam=0.00 /etc/init.d/nrpe.cfg command[check_mailstat]=/usr/lib/nagios/plugins/check_mailstat.pl -w $ARG1$ -c $ARG2$ On server Nagios ./check_nrpe -H remotehost -c check_mailstat -a 50:0:0:0:0:0 NRPE: Unable to read output How to configure and fix?
I'd like to run the script on a remote server without NRPE support, but with ssh access. Is there a way to modify the script to accomplish that? Sorry, i'm not a perl programmer
Thanks for the great plugin! With Centreon 2.4.2 i can see graph only for "sent" counter. The problem is related to the performance data format. I'm not good specialist, but i took as a sample perfdata from other service with good graphs, and changed some code in check_mailstat.pl: change line 97 to: my $perfdata = sprintf "'sent'=%-6.2f;;;;'received'=%-6.2f;;;;'bounced'=%-6.2f;;;;'rejected'=%-6.2f;;;;'virus'=%-6.2f;;;;'spam'=%-6.2f;;;;", @stat_counter; add as line 98: $perfdata =~ s/s+//g; #remove spaces I hope this helps... Sorry for bad English.
Hi, I download you plugin to test it but it didn't work for me and give me this error Use of uninitialized value $stat_line in scalar chomp at ./check_mailstat.pl line 187. Use of uninitialized value $stat_line in split at ./check_mailstat.pl line 188. Use of uninitialized value in subtraction (-) at ./check_mailstat.pl line 210. Use of uninitialized value in subtraction (-) at ./check_mailstat.pl line 210. Use of uninitialized value in subtraction (-) at ./check_mailstat.pl line 210. Use of uninitialized value in subtraction (-) at ./check_mailstat.pl line 210. Use of uninitialized value in subtraction (-) at ./check_mailstat.pl line 210. Use of uninitialized value in subtraction (-) at ./check_mailstat.pl line 210. Use of uninitialized value in subtraction (-) at ./check_mailstat.pl line 210. Use of uninitialized value in subtraction (-) at ./check_mailstat.pl line 210. Use of uninitialized value in subtraction (-) at ./check_mailstat.pl line 210. Use of uninitialized value in subtraction (-) at ./check_mailstat.pl line 210. Use of uninitialized value in subtraction (-) at ./check_mailstat.pl line 210. Use of uninitialized value in subtraction (-) at ./check_mailstat.pl line 210. Use of uninitialized value $stat_line in concatenation (.) or string at ./check_mailstat.pl line 221. OK: sent:0.00 received:0.00 bounced:0.00 rejected:0.00 virus:0.00 spam:0.00 |sent=0.00 received=0.00 bounced=0.00 rejected=0.00 virus=0.00 spam=0.00 Please advise me to solve this issue.
I made a pnp4nagios template which is similar with the one from mailgraph.cgi. Maybe you want to include it in the package. The data is displayed only in two graphs. http://docs.quah.ro/nagios/check_mailstat.php
There was in fact a PNP4Nagios template with check_mailstat.pl v0.9.1. However, I only updated it in my blog, and forgot to upload it here, sorry for that.
You must be logged in to submit a review.
To:
From: