My working sendmail mailstats template / script

Templates, scripts for templates, scripts and requests for templates.

Moderators: Moderators, Developers

Post Reply
Author
Message
User avatar
rcaston
Cacti User
Posts: 204
Joined: Tue Jan 06, 2004 7:47 pm
Location: US-Dallas, TX
Contact:

My working sendmail mailstats template / script

#1 Post by rcaston » Wed Jun 21, 2006 10:17 am

I thought I would contribute the template and script I made for graphing the sendmail mailstats output.

the shell script outputs the following data when ran;

[[email protected] scripts]# ./sendmail-mailstats.sh
msgsfrom:438 msgsto:116 msgsreject:7 msgsdiscard:1 msgsquran:0 bytes_from:4721K bytes_to:4336K


each field name is tied to the corresponding mailstats output; so it should be easy to follow.

from there; just make the data input method that references whichever fields you want from above and use the supplied graph template to get going.

Currently my script outputs the bytes_to and bytes_from but the attach graph template does not, I dont have a need to display them but I felt I might as well store the values all in one RRA for later use if needed.

If this is flawed or you have any improvements, suggestions, or general comments on this setup - then please post them here.

Enjoy,
-rcaston
Attachments
sendmail_graph.png
example graph output
sendmail_graph.png (25.65 KiB) Viewed 26856 times
cacti_graph_template_unix_sendmail_statistics.xml
graph template.
(17.52 KiB) Downloaded 2609 times
sendmail-mailstats.txt
shell script to parse sendmail mailstats output into a cacti readable format.
(506 Bytes) Downloaded 3418 times

tiainte
Posts: 1
Joined: Wed Sep 27, 2006 5:45 am

#2 Post by tiainte » Wed Sep 27, 2006 5:46 am

Suggestion:

walktrough how to monitor remote sendmail-servers with same script.

Took a while to figure that one out.

warnesj
Cacti User
Posts: 173
Joined: Sun May 29, 2005 7:34 pm

#3 Post by warnesj » Wed Sep 27, 2006 11:40 pm

tiainte wrote:Suggestion:

walktrough how to monitor remote sendmail-servers with same script.
I would probably send the output of the script through Net-SNMP. If you create a custom OID and use the pass function. I do something similar for my Sendmail and MailScanner scripts (http://forums.cacti.net/viewtopic.php?t=15651).

But nice work on the script tiainte. It's simple and elegant. :)

User avatar
sizulku
Cacti User
Posts: 110
Joined: Mon Nov 04, 2002 9:15 am
Location: ACEH
Contact:

#4 Post by sizulku » Thu Sep 28, 2006 12:46 am

Thanks for the script. It would be great if we also could monitor bytes_from and bytes_to. Could you add this to your graph template?

rhaskins
Posts: 16
Joined: Thu Aug 31, 2006 8:37 am

Data template?

#5 Post by rhaskins » Thu Oct 05, 2006 10:08 am

Can anyone point me at an example data template or instructions that can parse the individual msgsfrom, msgsto, etc. values from the SNMP query? I have looked and looked, and tried to do this myself with no success.

Thanks!

rubence
Posts: 5
Joined: Wed Sep 17, 2008 2:56 pm

#6 Post by rubence » Fri Sep 19, 2008 2:02 pm

thanks ! its working with my sendmail . but its not ploting rejected mail that is being rejected by my sendmail.mc FEATURE ('dnsbl'....... BlackListDatabase). and i m wondering the rejected mail through my dnsbl option in my sendmail.mc is also being considered as recieved mail.

Post Reply