Cacti (home)ForumsDocumentation
Cacti: offical forums and support
It is currently Tue Sep 25, 2018 8:22 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: My working sendmail mailstats template / script
PostPosted: Wed Jun 21, 2006 10:17 am 
Offline
Cacti User
User avatar

Joined: Tue Jan 06, 2004 7:47 pm
Posts: 204
Location: US-Dallas, TX
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:
File comment: example graph output
sendmail_graph.png
sendmail_graph.png [ 25.65 KiB | Viewed 26424 times ]
File comment: shell script to parse sendmail mailstats output into a cacti readable format.
sendmail-mailstats.txt [506 Bytes]
Downloaded 3346 times
File comment: graph template.
cacti_graph_template_unix_sendmail_statistics.xml [17.52 KiB]
Downloaded 2570 times
Top
 Profile  
 
 Post subject:
PostPosted: Wed Sep 27, 2006 5:46 am 
Offline

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

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

Took a while to figure that one out.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Sep 27, 2006 11:40 pm 
Offline
Cacti User

Joined: Sun May 29, 2005 7:34 pm
Posts: 173
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. :)


Top
 Profile  
 
 Post subject:
PostPosted: Thu Sep 28, 2006 12:46 am 
Offline
Cacti User
User avatar

Joined: Mon Nov 04, 2002 9:15 am
Posts: 110
Location: ACEH
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?


Top
 Profile  
 
 Post subject: Data template?
PostPosted: Thu Oct 05, 2006 10:08 am 
Offline

Joined: Thu Aug 31, 2006 8:37 am
Posts: 16
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!


Top
 Profile  
 
 Post subject:
PostPosted: Fri Sep 19, 2008 2:02 pm 
Offline

Joined: Wed Sep 17, 2008 2:56 pm
Posts: 5
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.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 14 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group