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
Instigater
Cacti User


Joined: 13 Dec 2004
Posts: 94
Location: Jurmala, Latvia

PostPosted: Thu Dec 29, 2005 2:43 am    Post subject: Reply with quote

There is an alternative too
http://forums.cacti.net/viewtopic.php?p=51584#51584
Back to top
Earl_Mobilee



Joined: 02 Feb 2006
Posts: 1

PostPosted: Thu Feb 02, 2006 12:41 pm    Post subject: Reply with quote

Hello everybody,

I work with cacti too. bit I can't it at a mailserver.
I can't always use cgi and snmp.

So how can I use postfix+mailgraph?

mailgraph.pl has created the rrd. But I can't they evaluate.

regards torsten
Back to top
jmeyerdo



Joined: 02 May 2005
Posts: 26
Location: Dortmund, Germany

PostPosted: Wed Feb 15, 2006 4:27 pm    Post subject: Reply with quote

After running cacti for "standard"-tasks since several weeks I am trying to use this great tool for some more special tasks for a small private project of mine. Unfortunately there are some small problems...

I installed files from "Rübenrotze" (page 2 in this thread) and followed his short installation-guide.
mailgraph is running fine - so the files /var/tmp/mail* are changing regularly.

But the graph is still empty/zero.
In debug-mode I can see the following message (for every mail-count: sent, recv, ...):

Code:

02/15/2006 10:20:03 PM - CMDPHP: Poller[0] Host[3] DS[54] WARNING: Result from SNMP not valid.  Partial Result:
02/15/2006 10:20:03 PM - CMDPHP: Poller[0] Host[3] DS[54] SNMP: v1: server.hooge.ejeb.de, dsname: bounced, oid: , output: U
02/15/2006 10:20:03 PM - CMDPHP: Poller[0] DEBUG: SQL Exec: "insert into poller_output (local_data_id,rrd_name,time,output) values (54,'bounced','2006-02-15 22:20:02','U')"


I think, the output "U" is not correct.
But where could be the error for this behaviour?

Thank you for your hint,
kind regards, Jens
Back to top
Giorgio



Joined: 21 Jun 2006
Posts: 21

PostPosted: Mon Jun 26, 2006 9:05 am    Post subject: Reply with quote

Hi guys,

Before beginning i want to apologize for my poor english.

I have a big problem with postfix- mailgraph so i hope that you'll help me.

So i follow the "HOW TO" to install mailgraph. Everything works. My cacti's request works too. i don't have any problem in my cacti server but the information that mailgraph gathers aren't good.

I have to manage postfix in a server on production (Trustix 2.2). So i decide, to test it in an environment test.

Cacti is install on a Fedora Core 4 and mailgraph - postfix host on a Fedora Core 4 too

- Fedora Core 4
- cacti 0.8h
- perl 5-8-6
- net-snmp 5-2-1
- rrdtool 1-2-11
- mailgraph ( i suppose version 1-4 according to the mailgraph-init file)

To test mailgraph i edit manually the log file /var/log/maillog i insert some lines with the status "sent" and "bounced".

The problem is that when i collect informations the number of this specific status aren't accurate.

When i look in the file /var/tmp/mailbounced (etc) i notice the number increase and after decrease just 1 seconde after etc.. and the numbers aren't good.

I have no problem when i start mailgraph by /etc/ini.d/mailgraph start:

[root@test bin]# /etc/init.d/mailgraph start
Starting mail statistics grapher: mailgraph


but when i try to launch mailgraph script by /usr/bin/mailgraph i have 1 error.

[root@test bin]# mailgraph
Error opening /var/log/syslog: Aucun fichier ou répertoire de ce type at /usr/bin/mailgraph line 299


I don't have this file.


Any idea?
Back to top
scubabri



Joined: 13 Jul 2006
Posts: 32

PostPosted: Sat Jul 15, 2006 9:09 am    Post subject: multiple postfix graphs per host Reply with quote

I want to be able to split up rejected and sent/recieved into two seperate graphs.

I create the graphs and then deselect the graph item fields for the stuff I don't want.

The graphs are never generated, anyone else having this problem, or am I doing something wrong.

I'd like them seperate because we reject about 2000 mails per interval

sb
Back to top
jpingle



Joined: 09 May 2005
Posts: 37

PostPosted: Sat Jul 15, 2006 10:31 am    Post subject: Reply with quote

It's probably not getting any data because the numbers reset once they are read. There are a couple solutions, though:

Option 1: Clone the graph template and make one without the rejected values, and one with only the rejected values.
Create the first graph as normal with the 'non-rejected' graph template, and then when it comes time to add the second graph, don't add it as usual - Add it from the 'graph management' screen by clicking Add, and then select the data source created by the first graph, and the rejected-only template. This should make sure the data is only gathered once, and they all pull from the same data source.

Option 2 (What I do): Switch the graph type to use Logarithmic Auto Scaling, that way the high values for rejected don't have as much impact, and it's still easy to read once you get used to how the graph values are represented on the graph -- 1-10, 11-100, 101-1000, 1001-10000 etc.
Back to top
scubabri



Joined: 13 Jul 2006
Posts: 32

PostPosted: Sat Jul 15, 2006 12:01 pm    Post subject: Reply with quote

Thanks, option 2 works for me.

sb
Back to top
mheyboer



Joined: 03 Aug 2006
Posts: 1

PostPosted: Mon Aug 14, 2006 4:57 pm    Post subject: Re: Cacti Mailgraph totals Reply with quote

I am using jpingle's mailgraph template for Cacti, and it is working great. I would like to add the ability (in addition to average and current) a 'total' - which keeps track of all reject/spam/bounce/viruses received during that 24 hour period. How can this be done? I know its possible as the rrdgraph has the total in and total out values right on the graph. Any suggestions??
Back to top
kokkers



Joined: 16 Feb 2006
Posts: 16

PostPosted: Tue Sep 12, 2006 6:57 am    Post subject: Re: Cacti Mailgraph totals Reply with quote

mheyboer wrote:
I am using jpingle's mailgraph template for Cacti, and it is working great. I would like to add the ability (in addition to average and current) a 'total' - which keeps track of all reject/spam/bounce/viruses received during that 24 hour period. How can this be done? I know its possible as the rrdgraph has the total in and total out values right on the graph. Any suggestions??


Mheyboer, I think you'll have to add a new line to the graph template and fiddle with the CDEF (math) functions a bit.
(Totall all data sources function for example)

I was hoping 'jpingle' still hangs out here or somebody else who can help me.

I am trying to read and graph Postfix stats from a remote server through SNMP. I was able to set up jpingle's scripts just fine but I get stuck on the Cacti side.

After adding the necessary templates to cacti and creating the graph after a polling cycle the graph and RRD are created.

However, no data gets inserted into the .RRD.

Cacti.log shows:

09/12/2006 01:40:20 PM - CACTID: Poller[0] Host[19] ERROR: Empty result [192.168.1.2]: '/usr/bin/perl /var/www/cacti/scripts/postfixcheck.pl 192.168.1.2'
09/12/2006 01:40:20 PM - CACTID: Poller[0] Host[19] DS[2692] WARNING: Result from SCRIPT not valid. Partial Result: ...

On my graphing server I can run the postfixcheck.pl script without any problems. It'll read the SNMP data and output the correct string:

'/usr/bin/perl /var/www/cacti/scripts/postfixcheck.pl 192.168.1.2' returns:

sent:270 received:313 bounced:4 rejected:89 spam:268 virus:11


The command listed in Cacti log as failed runs okay when copy/pasted to the commandline.

Data source debug:

Data Source Debug
/usr/local/rrd/bin/rrdtool create \
/var/www/cacti/rra/smtp1_virus_2692.rrd \
--step 300 \
DS:bounced:GAUGE:600:0:1000000 \
DS:sent:GAUGE:600:0:1000000 \
DS:virus:GAUGE:600:0:1000000 \
DS:received:GAUGE:600:0:1000000 \
DS:reject:GAUGE:600:0:1000000 \
DS:spam:GAUGE:600:0:1000000 \
RRA:AVERAGE:0.5:1:600 \
RRA:AVERAGE:0.5:6:700 \
RRA:AVERAGE:0.5:24:775 \
RRA:AVERAGE:0.5:288:797 \
RRA:MAX:0.5:1:600 \
RRA:MAX:0.5:6:700 \
RRA:MAX:0.5:24:775 \
RRA:MAX:0.5:288:797 \
RRA:LAST:0.5:1:600 \
RRA:LAST:0.5:6:700 \
RRA:LAST:0.5:24:775 \
RRA:LAST:0.5:288:797 \

From what I understand Cacti should parse this string in the output of the script and store them in the RRD I mentioned above.

sent:270 received:313 bounced:4 rejected:89 spam:268 virus:11

What more could I check?
I dont have much experience with input scripts but I am ready to pull my hair out .

Any help is appreciated.
Back to top
vchouet



Joined: 12 Dec 2007
Posts: 4

PostPosted: Mon Jan 28, 2008 10:20 am    Post subject: Same Problem : No graph ! Reply with quote

Hy,

Iv'e got the same problem.
Do you have any Idea ?

Thanks a lot.

Vincent
Back to top
Tolien



Joined: 31 May 2005
Posts: 4

PostPosted: Tue Jul 08, 2008 7:16 am    Post subject: Re: Cacti Mailgraph totals Reply with quote

mheyboer wrote:
I am using jpingle's mailgraph template for Cacti, and it is working great. I would like to add the ability (in addition to average and current) a 'total' - which keeps track of all reject/spam/bounce/viruses received during that 24 hour period. How can this be done? I know its possible as the rrdgraph has the total in and total out values right on the graph. Any suggestions??


The best I've got so far is to create a comment, with "Total: |sum:0:current:4:auto|". The problem is that it gives values that are too big (by about a factor of 300).
Back to top
tyson



Joined: 14 Mar 2008
Posts: 4

PostPosted: Fri Aug 22, 2008 1:35 pm    Post subject: Reply with quote

I understand that this thread is quite old, but it's information still appears very valid...

Unfortunately, I am trying to follow the instructions presented here, however I am unable to get the local snmpd to respond with the correct values from mailgraph.

I can see that the daemon is properly running and returning values to the /var/tmp directory, however when I try to query those values from /var/tmp, I constantly get an error:

WARNING: Result from SNMP not valid. Partial Result: No Such Object avail

When I query the SNMP Trap directly, I get the following...
UCD-SNMP-MIB::extOutput.8 = No more variables left in this MIB View (It is past the end of the MIB tree)

I assume that this is something that I have entered incorrectly into my /etc/snmp/snmp.conf file, however I followed the instructions presented exactly, and they stated to simply add the following line to this file.

exec mailcount /usr/bin/postfixstats.sh

Could someone please assist me to get this system working?
Thank you very much for your assistance.

~Tyson Edwards
Back to top
Number



Joined: 21 Aug 2008
Posts: 6

PostPosted: Mon Aug 25, 2008 2:22 pm    Post subject: Reply with quote

I'm really don't understand, i have all my graph working (process,mem,ping,...)

I have add without problem ws_apache_stats and they work..

But when i try to add a graph for postfix, i always have the same error :

Quote:
RRDTool Says:

ERROR: opening '/var/www/cacti/rra/soez_be_virus_39.rrd': No such file or directory


Why ?? When i add apache, they work, but never for postfix, where is the problem?

I test with Pingle template, and everything work (postfixstats.pl work, mailgraph work..)
But, cacti never créate rrd file..

Why ?

Thanks for your help and to any reply..
i'm sorry, i'm a french, and i'm speak better french ...
Back to top
rsuinux



Joined: 06 Oct 2008
Posts: 7
Location: Limoges

PostPosted: Tue Oct 07, 2008 4:16 am    Post subject: correction for debian user Reply with quote

hello all
(sorry for my very poor english)
I use mailgraph, and i modified the initscript mailgrph for use in my debian stable

http://linuxette.suinot.org/tmp/mailgraph

And, in the parameter for mailgraph, the log file is not
/var/log/maillog
but
/var/log/mail.log
Back to top
fitzb0z0



Joined: 14 Oct 2008
Posts: 1

PostPosted: Tue Oct 14, 2008 5:11 pm    Post subject: mailgraph.pl not updating Reply with quote

Hi All,

I am using the modified mailgraph.pl that updates files in /var/tmp instead of updated the rrd files.

I start mailgraph with the init script and it updates the files as expected.

[someuser@somebox /var/tmp] /usr/local/bin/postfixstats.sh
sent:400 received:334 bounced:21 rejected:299 spam:138 virus:0

Then cacti comes long and runs postfixstats.sh via snmpd, which works fine and zeros out the files in /var/tmp.

The problem is the files are never updated again by mailgraph.pl even though the daemon continues to run.

Anyone else experience this behavior?

Thanks,
Sean
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 6 of 7

 



Powered by phpBB © 2001, 2005 phpBB Group