Postfix monitoring with David Schweikert's Mailgraph?
Moderators: Developers, Moderators
- Instigater
- Cacti User
- Posts: 141
- Joined: Mon Dec 13, 2004 5:14 pm
- Location: Jurmala, Latvia
-
- Posts: 1
- Joined: Thu Feb 02, 2006 12:35 pm
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, ...):
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
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: Select all
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')"
But where could be the error for this behaviour?
Thank you for your hint,
kind regards, Jens
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?
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?
multiple postfix graphs per host
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
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
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.
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.
Re: Cacti Mailgraph totals
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??
Re: Cacti Mailgraph totals
Mheyboer, I think you'll have to add a new line to the graph template and fiddle with the CDEF (math) functions a bit.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??
(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.
Same Problem : No graph !
Hy,
Iv'e got the same problem.
Do you have any Idea ?
Thanks a lot.
Vincent
Iv'e got the same problem.
Do you have any Idea ?
Thanks a lot.
Vincent
Re: Cacti Mailgraph totals
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).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??
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
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
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 :
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 ...
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 :
Why ?? When i add apache, they work, but never for postfix, where is the problem?RRDTool Says:
ERROR: opening '/var/www/cacti/rra/soez_be_virus_39.rrd': No such file or directory
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 ...
correction for debian user
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
(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
mailgraph.pl not updating
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
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
Who is online
Users browsing this forum: No registered users and 1 guest