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 Previous  1, 2, 3, 4, 5, 6, 7  Next
 
Post new topic   Reply to topic    Cacti Forum Index -> Scripts and Templates
Author Message
jpingle



Joined: 09 May 2005
Posts: 37

PostPosted: Fri May 20, 2005 10:51 pm    Post subject: Reply with quote

Unless it actually logs a line into /var/log/maillog, then mailgraph won't pick it up. Are you sure there also isn't a line in maillog when it catches a virus?

If it really doesn't log to maillog, then you'd have to get the count some other way...
Back to top
aboyz
Guest





PostPosted: Fri May 20, 2005 11:10 pm    Post subject: yeah. Reply with quote

yeah..

how do i go about doing that? which file do i change? will this work.. can edit clamd.conf to log the log file into /var/log/maillog?

I mean can both program log to the same files? or will it be a conflict??

do you know..
Back to top
aboyz
Guest





PostPosted: Sat May 21, 2005 5:38 pm    Post subject: hi Reply with quote

hi,

Ok i got clanav to log ito /var/log/maillog

so am i all set or do i still need to change something?

This is what is in the clanav log. in maillog

SelfCheck: Database status OK.
stream: Worm.Mytob.BT FOUND
stream: Worm.Mytob.BT FOUND
stream: Worm.Mytob.T-2 FOUND
stream: Worm.Mytob.BR FOUND
stream: Worm.Bagle.Gen-zippwd FOUND
stream: Worm.SomeFool.P FOUND
stream: Worm.Mytob.BT FOUND
stream: Worm.Mytob.BT FOUND
stream: Worm.Mytob.BT FOUND
stream: Worm.Mytob.BR FOUND
stream: Worm.SomeFool.P FOUND
stream: Worm.Mytob.BR FOUND
stream: Worm.Mytob.T-2 FOUND
stream: Worm.SomeFool.Gen-1 FOUND
stream: Worm.Mytob.BR FOUND


So will it pick up virus now?
Back to top
PChott



Joined: 16 Jun 2005
Posts: 1

PostPosted: Thu Jun 16, 2005 3:33 am    Post subject: New boy between cacti Reply with quote

Hi, guys

I'm new with using Cacti and also snmpd. Im try to use this help for postfix statistic, but i don't have much luck.

My OS is debian. I downloaded "Mailgraph.zip" and use that INSTALL help, to install it.

AND, i'm not geting any results. on graph. But i can see an empty graph. Can anyone tell me what i did wrong?
Back to top
lucky
Cacti User


Joined: 30 Sep 2002
Posts: 62
Location: Germany

PostPosted: Mon Jul 04, 2005 10:08 am    Post subject: Reply with quote

hi!

can somebody help me with monitoring postfix on my gentoo box.

a little step by step documentation?

cacti 0.8.6e

thanks
Back to top
diego



Joined: 05 Aug 2005
Posts: 1

PostPosted: Fri Aug 05, 2005 3:22 am    Post subject: Reply with quote

I had to patch the JJP script to get it work on my fedora 2 system.

mailgraph.pl
--------------

line 293 #use RRDs;

why:: remove dependency on perl RRD lib...

line 690 #return 1 if $m == $this_minute;
line 691 #return 0 if $m < $this_minute;

why:: if you don't, the stats will not update after it gets zeroed...

Comment the 3 lines out...the line number might be slightly off due to my other customization...
Back to top
deuce868



Joined: 12 Sep 2005
Posts: 6

PostPosted: Mon Sep 12, 2005 8:47 am    Post subject: Reply with quote

Ok, I've been trying to get this to work as it looks great. I am getting nan for all my graphs and when I try to manually run postfixstats.sh I get the following:

'ostfixstats.sh: line 2: syntax error near unexpected token `
'ostfixstats.sh: line 2: `for i in sent received rejected bounced spam virus;

Now I've tried this loop without the ; which then gets me an unexpected end of file error. I've checked for any line breaks or speaces and nadda. I took out all of the spaces/tabs and no luck.

Any idea what's up with this?


EDIT:
ok, I had a bunch of bad end of line characters that weren't visible in vi I had to clean out.

The script runs now.
Back to top
deuce868



Joined: 12 Sep 2005
Posts: 6

PostPosted: Mon Sep 12, 2005 12:35 pm    Post subject: Reply with quote

Ok, I am missing something simple. I have everything going all the way to postfixcheck.pl giving out the response:
sent
received
rejected
bounced
spam
virus
sent:143 received:228 rejected:217 bounced:70 spam:42 virus:0

I am getting the graph, but all results are nan. I am thinking it's some permission problem, but I can't seem to find out which files it is. I tried changing the resultant /var/tmp/mail* files to be owned by www-data with no luck.

Any ideas what I need to check? All the scripts seem to be working, but I'm not getting the data in the graphs.

Thanks for the help.
Back to top
jpingle



Joined: 09 May 2005
Posts: 37

PostPosted: Mon Sep 12, 2005 12:43 pm    Post subject: Reply with quote

The output of that script should *only* be:

Code:
sent:143 received:228 rejected:217 bounced:70 spam:42 virus:0


Anything before or after that line will throw off the parsing on the cacti side of things.

And was that a typo, or did you rewrite that as a perl script? It was originally a bash shell script.
Back to top
deuce868



Joined: 12 Sep 2005
Posts: 6

PostPosted: Mon Sep 12, 2005 12:49 pm    Post subject: Reply with quote

jpingle wrote:
The output of that script should *only* be:

Code:
sent:143 received:228 rejected:217 bounced:70 spam:42 virus:0


Anything before or after that line will throw off the parsing on the cacti side of things.

And was that a typo, or did you rewrite that as a perl script? It was originally a bash shell script.


Ok, it was my mistake. When I was having problems with the script I had added a echo $i line. I took that out.

The I was running the perl scipt which is the one in the cacti/scipts directory. It was calling the postfixstats.sh

Is there some clearing out I need to do because I am still getting nan.
Back to top
jpingle



Joined: 09 May 2005
Posts: 37

PostPosted: Mon Sep 12, 2005 12:55 pm    Post subject: Reply with quote

Ah, ok. Well after you get a successful run of that script output, it will take a couple runs of the poller to pick up data. If you can run the perl script and it gets the output fine, then it should work inside of cacti. The biggest hurdle is getting that script output back to the cacti input script.

You might try deleting the graph and recreating it, but it may just take some time.
Back to top
deuce868



Joined: 12 Sep 2005
Posts: 6

PostPosted: Mon Sep 12, 2005 1:32 pm    Post subject: Reply with quote

Ok, I had the cacti script in the wrong place. In my debian install it needed to go under /use/share/cacti/site/scripts/

Oops. Well I think it's starting to work now. very very sweet.

thanks!
Back to top
kanada
Cacti User


Joined: 28 Aug 2005
Posts: 125

PostPosted: Wed Oct 19, 2005 6:51 am    Post subject: Problem. Reply with quote

Its possible to do this module remote graphing from other machine ?
Back to top
stickboy2642



Joined: 30 Nov 2005
Posts: 2

PostPosted: Wed Dec 28, 2005 6:06 pm    Post subject: Reply with quote

Hello all. Thank you creating the templates and such to get this working in cacti. I am using this to monitor my postfix machines, and it is working great. I also wanted to make a contribution to the work going on in this thread.

I made some modifications to the mailgraph files to make them more cacti friendly. I rewrote the postfixcheck.pl script so that it pulls host and snmp information from cacti rather than having to edit postfixcheck.pl by hand. This makes it easier to monitor multiple hosts using a single script. The script also accepts the snmp version and handles the data gathering process appropriately. I made a change to the graph template to reflect the change in the script.

I also added a walkthrough to get this running in Gentoo linux and RHEL 3. I included the original documentation from jpingle as well.

Please note that this is the first time I have worked with Perl, so if things in the script look a little sloppy, I apologize. I have been running this on my cacti box and it seems to work great, but if anybody notices anything or has any feedback, please let me know. The template was exported using version 0.8.6g.

There is also a nice walkthrough in this post on the Gentoo Forums for those of you who want to get this working under Gentoo.

http://forums.gentoo.org/viewtopic-t-410694-highlight-cacti.html



mailgraph-cacti.zip
 Description:

Download
 Filename:  mailgraph-cacti.zip
 Filesize:  16.24 KB
 Downloaded:  2159 Time(s)

Back to top
rony
Developer/Forum Admin


Joined: 17 Nov 2003
Posts: 5453
Location: Wisconsin, USA

PostPosted: Wed Dec 28, 2005 6:30 pm    Post subject: Reply with quote

Moved to Scripts and Templates
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 Previous  1, 2, 3, 4, 5, 6, 7  Next
Page 5 of 7

 



Powered by phpBB © 2001, 2005 phpBB Group