Cacti (home)ForumsRepositoryDocumentation
Cacti: offical forums and support  

 FAQFAQ   SearchSearch   MemberlistMemberlist    RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in    


My working sendmail mailstats template / script

 
Post new topic   Reply to topic    Cacti Forum Index -> Scripts and Templates
Author Message
rcaston
Cacti User


Joined: 06 Jan 2004
Posts: 199
Location: US-Dallas, TX

PostPosted: Wed Jun 21, 2006 10:17 am    Post subject: My working sendmail mailstats template / script Reply with quote

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;

[rcaston@derivative 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



sendmail_graph.png
 Description:
example graph output
 Filesize:  25.65 KB
 Viewed:  7389 Time(s)

sendmail_graph.png



sendmail-mailstats.txt
 Description:
shell script to parse sendmail mailstats output into a cacti readable format.

Download
 Filename:  sendmail-mailstats.txt
 Filesize:  506 Bytes
 Downloaded:  1164 Time(s)


cacti_graph_template_unix_sendmail_statistics.xml
 Description:
graph template.

Download
 Filename:  cacti_graph_template_unix_sendmail_statistics.xml
 Filesize:  17.52 KB
 Downloaded:  970 Time(s)

Back to top
tiainte



Joined: 27 Sep 2006
Posts: 1

PostPosted: Wed Sep 27, 2006 5:46 am    Post subject: Reply with quote

Suggestion:

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

Took a while to figure that one out.
Back to top
warnesj
Cacti User


Joined: 29 May 2005
Posts: 146

PostPosted: Wed Sep 27, 2006 11:40 pm    Post subject: Reply with quote

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.
Back to top
sizulku
Cacti User


Joined: 04 Nov 2002
Posts: 101
Location: ACEH

PostPosted: Thu Sep 28, 2006 12:46 am    Post subject: Reply with quote

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?
Back to top
rhaskins



Joined: 31 Aug 2006
Posts: 14

PostPosted: Thu Oct 05, 2006 10:08 am    Post subject: Data template? Reply with quote

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!
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Cacti Forum Index -> Scripts and Templates All times are GMT - 5 Hours
Page 1 of 1

 



Powered by phpBB © 2001, 2005 phpBB Group