Cacti (home)ForumsDocumentation
Cacti: offical forums and support
It is currently Thu Jun 27, 2019 5:53 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 108 posts ]  Go to page 1, 2, 3, 4, 5 ... 8  Next
Author Message
 Post subject: Postfix monitoring with David Schweikert's Mailgraph?
PostPosted: Sun Apr 06, 2003 7:29 pm 
Offline

Joined: Sun Apr 06, 2003 7:15 pm
Posts: 1
Location: Canada
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


Top
 Profile  
 
 Post subject:
PostPosted: Sun Apr 06, 2003 7:51 pm 
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.


Top
  
 
 Post subject:
PostPosted: Wed May 14, 2003 8:50 pm 
any luck with this yet?

would be awesome to see it working... :)


Top
  
 
 Post subject:
PostPosted: Tue Sep 16, 2003 3:36 am 
Offline

Joined: Tue Oct 01, 2002 8:36 am
Posts: 18
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?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Dec 19, 2003 12:56 pm 
Offline

Joined: Mon Oct 28, 2002 7:59 am
Posts: 43
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


Top
 Profile  
 
 Post subject:
PostPosted: Tue Feb 03, 2004 12:48 pm 
Any updates with this?


Top
  
 
 Post subject: I almost have it
PostPosted: Tue Feb 03, 2004 2:56 pm 
Offline

Joined: Mon Jul 08, 2002 12:59 pm
Posts: 7
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.


Attachments:
sa_graph.png
sa_graph.png [ 54.27 KiB | Viewed 108368 times ]
Top
 Profile  
 
 Post subject: mailgraph templates.
PostPosted: Fri Feb 13, 2004 3:02 pm 
Offline

Joined: Wed Nov 12, 2003 12:30 pm
Posts: 19
i got some templates from the master. feel free to email/pm me for it.


or aim tchmnkyz


--jeremy


Top
 Profile  
 
 Post subject: postfix-stuff
PostPosted: Thu Apr 01, 2004 7:13 am 
Offline
Cacti User

Joined: Thu Jul 17, 2003 8:55 am
Posts: 57
Location: Switzerland
Hi there

is anyone having templates for postfix?

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

thanx

mänu

_________________
To know recursion, you must first know recursion.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Apr 02, 2004 2:55 am 
Offline

Joined: Wed Feb 11, 2004 7:53 pm
Posts: 27
Location: Perth, Australia
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.


Attachments:
File comment: updated mailgraph
mailgraph.pl.gz [4.83 KiB]
Downloaded 10439 times
File comment: Postfix graph
postfix_graph.png
postfix_graph.png [ 11.44 KiB | Viewed 108150 times ]
Top
 Profile  
 
 Post subject:
PostPosted: Fri Apr 02, 2004 4:02 am 
Offline
Cacti User

Joined: Fri Mar 12, 2004 3:01 am
Posts: 52
Location: Beusichem
Is it possible to use this for Win32 environments to? So to port it to Exchange or Mdeamon?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Apr 02, 2004 7:07 am 
Offline
Cacti User

Joined: Thu Jul 17, 2003 8:55 am
Posts: 57
Location: Switzerland
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

_________________
To know recursion, you must first know recursion.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Apr 02, 2004 8:43 am 
Offline
Cacti User

Joined: Fri Mar 12, 2004 3:01 am
Posts: 52
Location: Beusichem
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.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Apr 08, 2004 1:10 pm 
Offline

Joined: Thu Apr 08, 2004 1:06 pm
Posts: 10
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.


Attachments:
File comment: Data and Graph Template
cacti_graph_template_postfix_stats.xml [32.77 KiB]
Downloaded 10170 times
Top
 Profile  
 
 Post subject:
PostPosted: Mon Apr 12, 2004 10:01 am 
Offline

Joined: Wed Feb 11, 2004 7:53 pm
Posts: 27
Location: Perth, Australia
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!


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 108 posts ]  Go to page 1, 2, 3, 4, 5 ... 8  Next

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 3 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