Closed akai0211 closed 8 years ago
Monitorix uses your environment variable $PATH
to find the tool pflogsumm
or pflogsumm.pl
.
This is the command that Monitorix uses to get Postfix statistics:
pflogsumm -d today -h 0 -u 0 --smtpd_stats --no_bounce_detail --no_deferral_detail --no_reject_detail --no_no_msg_size --no_smtpd_warnings <mail_log>
So please, make sure the option mail_log
is correctly configured and it points to the right log file.
Thanks for your reply, I've tried out the paths for mai_log such as var/log/maillog and var/log/zimbra.log (The Zimbra syslog details the activities of the Zimbra MTA (Postfix, amavisd, antispam, antivirus), Logger, Authentication (cyrus-sasl), and Directory (OpenLDAP)), but the result doesn't change.
Have you tried to execute the command line I showed you in my previous post?
I've tried that, this is the result
pflogsumm.pl: "no_bounce_detail" is depreciated, use "bounce_detail=0" instead
pflogsumm.pl: "no_deferral_detail" is depreciated, use "deferral_detail=0" instead
pflogsumm.pl: "no_reject_detail" is depreciated, use "reject_detail=0" instead
pflogsumm.pl: "no_smtpd_warnings" is depreciated, use "smtpd_warning_detail=0" instead
Postfix log summaries for Oct 6
Grand Totals
------------
messages
24 received
75 delivered
0 forwarded
0 deferred
0 bounced
0 rejected (0%)
0 reject warnings
0 held
0 discarded (0%)
153836 bytes received
498224 bytes delivered
4 senders
4 sending hosts/domains
3 recipients
2 recipient hosts/domains
smtpd
25 connections
3 hosts/domains
0 avg. connect time (seconds)
0:00:08 total connect time
Per-Hour Traffic Summary
------------------------
time received delivered deferred bounced rejected
--------------------------------------------------------------------
0000-0100 0 0 0 0 0
0100-0200 0 0 0 0 0
0200-0300 0 0 0 0 0
0300-0400 0 0 0 0 0
0400-0500 0 0 0 0 0
0500-0600 0 0 0 0 0
0600-0700 0 0 0 0 0
0700-0800 0 0 0 0 0
0800-0900 8 24 0 0 0
0900-1000 0 0 0 0 0
1000-1100 4 12 0 0 0
1100-1200 2 9 0 0 0
1200-1300 0 0 0 0 0
1300-1400 0 0 0 0 0
1400-1500 10 30 0 0 0
1500-1600 0 0 0 0 0
1600-1700 0 0 0 0 0
1700-1800 0 0 0 0 0
1800-1900 0 0 0 0 0
1900-2000 0 0 0 0 0
2000-2100 0 0 0 0 0
2100-2200 0 0 0 0 0
2200-2300 0 0 0 0 0
2300-2400 0 0 0 0 0
Per-Hour SMTPD Connection Summary
---------------------------------
hour connections time conn. avg./conn. max. time
--------------------------------------------------------------------
0800-0900 8 0:00:02 0s 1s
1000-1100 4 0:00:01 0s 1s
1100-1200 3 0:00:00 0s 0s
1400-1500 10 0:00:05 1s 1s
smtp delivery failures: none
Fatal Errors
------------
master (total: 2)
1 bind 0.0.0.0 port 25: Address already in use
1 daemon initialization failure
postqueue (total: 13)
13 Queue report unavailable - mail system is down
Panics: none
Master daemon messages
----------------------
3 daemon started -- version 2.11.1, configuration /opt/zimbra/postfix-2.11.1.2z/conf
1 terminating on signal 15
I'd say that for an unknown reason the path of your pflogsumm
is not in the $PATH
of Monitorix. Where it's located?
I placed it on usr/local/bin
Can you, please, create a symbolic link of it into /usr/bin
?
I'm so sorry when bothering you, i'll try myself to fix this problem
Does this mean that it worked once you created such symbolic link?
Nope, it's still that error, anw thanks for your enthusiasm
Well, I think you have not installed pflogsumm
correctly in your CentOS 7. It looks like you have not used the package management yum
, and that's why you have pflogsumm
installed in /usr/local/bin
. Probably a manual installation, which is always bad.
Look at this:
# rpm -qlp postfix-perl-scripts-2.10.1-6.el7.x86_64.rpm
warning: postfix-perl-scripts-2.10.1-6.el7.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID f4a80eb5: NOKEY
/usr/sbin/pflogsumm
/usr/sbin/qshape
/usr/share/doc/postfix-2.10.1/pflogsumm-faq.txt
/usr/share/man/man1/pflogsumm.1.gz
/usr/share/man/man1/qshape.1.gz
As you can see, the official CentOS 7 package postfix-perl-scripts-2.10.1-6.el7.x86_64.rpm
will place pflogsumm
in the /usr/sbin
directory.
So please, use yum
to install (official) packages in your system, otherwise you might experiment strange behaviour.
it run perfectly, thank you so much :+1:
I'm using Monitorix on CentOS 7. Everything seems to be okay but mail graph can't show the statistics. This is what I see from Monitorix log although I had pflogsumm. Can monitorix automatically recognize pflogsumm or we must place in exact folder, could anyone clarify this?
Thu Oct 6 10:46:00 2016 - mail::mail_update: 'pflogsumm' returned empty data. Is it really installed? ntpq: read: Connection refused