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    


Postfix monitoring with David Schweikert's Mailgraph?
Goto page 1, 2, 3, 4, 5, 6  Next
 
Post new topic   Reply to topic    Cacti Forum Index -> Scripts and Templates
Author Message
amb_



Joined: 06 Apr 2003
Posts: 1
Location: Canada

PostPosted: Sun Apr 06, 2003 7:29 pm    Post subject: Postfix monitoring with David Schweikert's Mailgraph? Reply with quote

Hello,

David Schweikert has maintained a very handy comprehensive Postfix monitoring frontend for RRDtool called Mailgraph. It takes the form of a daemon Perl and a CGI to generate the graphs via the web. It can be found at http://people.ee.ethz.ch/~dws/software/mailgraph/.

Has anyone successfully adapted this to Cacti? I am about to attempt to do so myself but would like to avoid readapting the wheel, if at all possible.

Should no one in this community have already done the above, I will be sure to post my reworked Mailgraph in the User Contributions forum once I am through.

Many thanks to Ian Berry et al for a fantastic piece of software. Keep up the great work!

Chris Slothouber
Threshold Internet Solutions
Back to top
Xanatos
Guest





PostPosted: Sun Apr 06, 2003 7:51 pm    Post subject: Reply with quote

I would LOVE to see this. Hell I didn't even know there was any monitoring solutions for Postfix. I moved over about 5 months ago from Qmail and LOVE IT. Definately the best MTA I've used. Have it integrated with MySQL, Courier, and SpamAssassin and it flys.

It would be nice seeing this adapted to cacti.
Back to top
zachf
Guest





PostPosted: Wed May 14, 2003 8:50 pm    Post subject: Reply with quote

any luck with this yet?

would be awesome to see it working...
Back to top
klavs



Joined: 01 Oct 2002
Posts: 18

PostPosted: Tue Sep 16, 2003 3:36 am    Post subject: Reply with quote

I've got mailgraph running - and cacti makes graphs from the rrd's - only the numbers aren't exactly correct - I'm working on getting the calculations that mailgraph.cgi does into cacti - but I don't know how?

How far have you gotten ? - what I need to get of calculations (CDEF's) are these:

"CDEF:rsent=sent,60,*",
"CDEF:rrecv=recv,60,*",
"CDEF:rmsent=msent,60,*",
"CDEF:rmrecv=mrecv,60,*",
they are done - now easy.

Here's the kickers I can't solve:

"CDEF:dsent=sent,UN,0,sent,IF,$step,*",
"CDEF:ssent=PREV,UN,dsent,PREV,IF,dsent,+",
"CDEF:drecv=recv,UN,0,recv,IF,$step,*",
"CDEF:srecv=PREV,UN,drecv,PREV,IF,drecv,+",

How do I get that into Cacti? any ideas?
Back to top
cpdans



Joined: 28 Oct 2002
Posts: 43

PostPosted: Fri Dec 19, 2003 12:56 pm    Post subject: Reply with quote

Hello,

Has anyone gotten any closer to this? I too have been running mailgraph and would love to get the graphs into Cacti. Any help with this would be great.

Dan
Back to top
Guest






PostPosted: Tue Feb 03, 2004 12:48 pm    Post subject: Reply with quote

Any updates with this?
Back to top
travisll



Joined: 08 Jul 2002
Posts: 7

PostPosted: Tue Feb 03, 2004 2:56 pm    Post subject: I almost have it Reply with quote

I ave not been able to get all the DEFS correct yet but this is what I have so far.



/usr/bin/rrdtool graph - \
--imgformat=PNG \
--start=-86400 \
--end=-60 \
--title="SA Messages" \
--base=1000 \
--height=150 \
--width=540 \
--alt-autoscale-max \
--lower-limit=0 \
--vertical-label="msgs/sec" \
DEF:a="/usr/local/apache/htdocs/cacti/rra/mailgraph.rrd":sent:AVERAGE \
DEF:b="/usr/local/apache/htdocs/cacti/rra/mailgraph.rrd":recv:AVERAGE \
CDEF:cdefa=a,60,* \
CDEF:cdefb=a,UN,0,a,IF,480,* \
CDEF:cdefc=PREV,UN,cdefb,PREV,IF,cdefb,+ \
CDEF:cdeff=b,60,* \
CDEF:cdefg=b,UN,0,b,IF,480,* \
CDEF:cdefh=PREV,UN,cdefg,PREV,IF,cdefg,+ \
AREA:cdefa#4123A1:"Sent" \
COMMENT:"" \
GPRINT:cdefc:MAX:" total\:%8.0lf" \
GPRINT:cdefa:AVERAGE:"average\: %.2lf msgs/min" \
GPRINT:cdefa:MAX:"max\: %.0lf msgs/min\n" \
LINE2:cdeff#009900:"Recieved" \
COMMENT:"" \
GPRINT:cdefh:MAX:"total\:%8.0lf" \
GPRINT:cdeff:AVERAGE:"average\: %.2lf msgs/min" \
GPRINT:cdeff:MAX:"max\: %.0lf msgs/min\n" \
HRULE:0#000000:"" \
COMMENT:"\s" \
COMMENT:"graph created on Tue 03 Feb 13:46:05 CST 2004 \r"

The graph is as follows. Notice the nax: msgs/min are goofed up. That is all I lack for the first graph.



sa_graph.png
 Description:
 Filesize:  54.27 KB
 Viewed:  47087 Time(s)

sa_graph.png


Back to top
dgman



Joined: 12 Nov 2003
Posts: 16

PostPosted: Fri Feb 13, 2004 3:02 pm    Post subject: mailgraph templates. Reply with quote

i got some templates from the master. feel free to email/pm me for it.


or aim tchmnkyz


--jeremy
Back to top
maenu
Cacti User


Joined: 17 Jul 2003
Posts: 57
Location: Switzerland

PostPosted: Thu Apr 01, 2004 7:13 am    Post subject: postfix-stuff Reply with quote

Hi there

is anyone having templates for postfix?

it would be very nice, if someone would post them..

thanx

mänu
Back to top
Speedster



Joined: 11 Feb 2004
Posts: 27
Location: Perth, Australia

PostPosted: Fri Apr 02, 2004 2:55 am    Post subject: Reply with quote

I modified the perl script for mailgraph to output the values to text files rather than create an RRD, then extended the net-snmp agent to include those files. Then I just pull the values with an snmp query and let cacti create it's own RRD files.

snmpd.conf:
Code:
exec   mailcount_sent           /bin/cat /var/tmp/mailsent
exec   mailcount_recv           /bin/cat /var/tmp/mailrecv
exec   mailcount_reject         /bin/cat /var/tmp/mailrejected
exec   mailcount_bounced        /bin/cat /var/tmp/mailbounced
exec   mailcount_spam           /bin/cat /var/tmp/mailspam
exec   mailcount_virus          /bin/cat /var/tmp/mailvirus


I've attached the modified mailgraph.pl.



postfix_graph.png
 Description:
Postfix graph
 Filesize:  11.44 KB
 Viewed:  46869 Time(s)

postfix_graph.png



mailgraph.pl.gz
 Description:
updated mailgraph

Download
 Filename:  mailgraph.pl.gz
 Filesize:  4.83 KB
 Downloaded:  5622 Time(s)

Back to top
..::BFS::..
Cacti User


Joined: 12 Mar 2004
Posts: 52
Location: Beusichem

PostPosted: Fri Apr 02, 2004 4:02 am    Post subject: Reply with quote

Is it possible to use this for Win32 environments to? So to port it to Exchange or Mdeamon?
Back to top
maenu
Cacti User


Joined: 17 Jul 2003
Posts: 57
Location: Switzerland

PostPosted: Fri Apr 02, 2004 7:07 am    Post subject: Reply with quote

veeery cool!!

thank you very much..

in addition, you have to add the following perl-moduls to run the script:
Time::HiRes (needed by Time::Local)
Time::Local
File::Tail
Getopt::Long

@Speedster:
Thanx for posting the script!!
it would be very nice, if you'd export the data-template and graph-template..

@BFS
this script is almost useless for mdaemon and exchange.
it parses the specific logfile of Postfix..
other MTA's like exchange have diffrent logfile-formats.

Exchange isn't a big problem.. (I hope so.. ) because there's a Performance MIB for the windows-integrated SNMP-Service.

I plan to realize the exchange-solution, in the next few weeks.
I'll post it here..

regards,
Mänu
Back to top
..::BFS::..
Cacti User


Joined: 12 Mar 2004
Posts: 52
Location: Beusichem

PostPosted: Fri Apr 02, 2004 8:43 am    Post subject: Reply with quote

maenu wrote:


@BFS
this script is almost useless for mdaemon and exchange.
it parses the specific logfile of Postfix..
other MTA's like exchange have diffrent logfile-formats.

Exchange isn't a big problem.. (I hope so.. ) because there's a Performance MIB for the windows-integrated SNMP-Service.

I plan to realize the exchange-solution, in the next few weeks.
I'll post it here..

regards,
Mänu


Great! I'll check this the next few weeks. This would be a great enhancement for my server monitoring.
Back to top
Enforcer



Joined: 08 Apr 2004
Posts: 10

PostPosted: Thu Apr 08, 2004 1:10 pm    Post subject: Reply with quote

Hi,

i saw what you did here. I liked it a lot but well i also had to create all the templates.
All that clicking and adjustment took me some time so i decided to make it public.

So here we go. That templates are working if you have the exec stuff in the snmpd at the top or the postfix stats entry’s are the only one.

Thx for that idea and script.



cacti_graph_template_postfix_stats.xml
 Description:
Data and Graph Template

Download
 Filename:  cacti_graph_template_postfix_stats.xml
 Filesize:  32.77 KB
 Downloaded:  5948 Time(s)

Back to top
Speedster



Joined: 11 Feb 2004
Posts: 27
Location: Perth, Australia

PostPosted: Mon Apr 12, 2004 10:01 am    Post subject: Reply with quote

Nice work enforcer

Sorry for not getting around to posting my templates! The data templates were just straight "Get SNMP Query" data sources (one for each type of data) so I'm not sure they could have helped anyone. It was one of the first things I did in Cacti and because the OID is different on each server I couldn't template it!
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
Goto page 1, 2, 3, 4, 5, 6  Next
Page 1 of 6

 



Powered by phpBB © 2001, 2005 phpBB Group