Postfix monitoring with David Schweikert's Mailgraph?
Moderators: Developers, Moderators
good work!!
excellent work on the install readme also!! this explain it more on how everything is operated!!! I'll try this on one of my postfix box and see how it runs..
thank you all for the good addon..
thank you all for the good addon..
I don't see /usr/local/bin/allstat.sh?
Hi,
In the code.. where you add in the. cat append_to_snmpd.conf.txt >> /usr/local/share/snmp/snmpd.conf
exec mailcount /usr/local/bin/allstat.sh
I don't see a file called allstat.sh? did you forgot to upload it?
thanks
In the code.. where you add in the. cat append_to_snmpd.conf.txt >> /usr/local/share/snmp/snmpd.conf
exec mailcount /usr/local/bin/allstat.sh
I don't see a file called allstat.sh? did you forgot to upload it?
thanks
I'm getting error when running mailgraph.pl
This is what I get when I run mailgraph.pl
mail08# ./mailgraph.sh start
Starting mailgraph.
mesg: /dev/ttyp0: Operation not permitted
Global symbol "$counttype" requires explicit package name at /usr/local/sbin/mailgraph.pl line 696.
Global symbol "$counttype" requires explicit package name at /usr/local/sbin/mailgraph.pl line 697.
Global symbol "$counttype" requires explicit package name at /usr/local/sbin/mailgraph.pl line 698.
Global symbol "$counttype" requires explicit package name at /usr/local/sbin/mailgraph.pl line 700.
Execution of /usr/local/sbin/mailgraph.pl aborted due to compilation errors.
This is what is on my mailgraph.pl line 696-700
open (CTF, "+< " . $file_path . $counttype) or next; # Skip if file isn't there
$sum{$counttype} += <CTF>; # Read & Add
seek (CTF, 0, 0); # Rewind file
print CTF $sum{$counttype} . "\n"; # Write new info
. Anyone know what is wrong? I'm running
freebsd 4.11
net-snmp 5.2.1
mailgraph 1.10
I follow the instruction as it is. i copy the mailgraph.pl that came with the zip file and replaced it on mailgraph.pl
Anyone know what that error mean? and how do i fix it
thanks
mail08# ./mailgraph.sh start
Starting mailgraph.
mesg: /dev/ttyp0: Operation not permitted
Global symbol "$counttype" requires explicit package name at /usr/local/sbin/mailgraph.pl line 696.
Global symbol "$counttype" requires explicit package name at /usr/local/sbin/mailgraph.pl line 697.
Global symbol "$counttype" requires explicit package name at /usr/local/sbin/mailgraph.pl line 698.
Global symbol "$counttype" requires explicit package name at /usr/local/sbin/mailgraph.pl line 700.
Execution of /usr/local/sbin/mailgraph.pl aborted due to compilation errors.
This is what is on my mailgraph.pl line 696-700
open (CTF, "+< " . $file_path . $counttype) or next; # Skip if file isn't there
$sum{$counttype} += <CTF>; # Read & Add
seek (CTF, 0, 0); # Rewind file
print CTF $sum{$counttype} . "\n"; # Write new info
. Anyone know what is wrong? I'm running
freebsd 4.11
net-snmp 5.2.1
mailgraph 1.10
I follow the instruction as it is. i copy the mailgraph.pl that came with the zip file and replaced it on mailgraph.pl
Anyone know what that error mean? and how do i fix it
thanks
This is probably a perl issue... What version of Perl are you using? (Try perl -v at a prompt) I'm using 5.8.0
(Note the added "my" in there...)
Or you could add a line that says:
Directly above the foreach line.
Let me know if that helps.
That usually doesn't happen for loop variables, but you can try changing line 695 to:Global symbol "$counttype" requires explicit package name at /usr/local/sbin/mailgraph.pl line 696.
Code: Select all
foreach my $counttype (keys(%sum)) {
Or you could add a line that says:
Code: Select all
my $counttype;
Let me know if that helps.
Code: Select all
Ok.
yeah that fixed it
I was using a older version of perl. 5.6.1
What about this file I don't have it. its the append file to be added in snmpd.sh I can't find anywhere on my system the allstat.sh
exec mailcount /usr/local/bin/allstat.sh
after starting snmpd.sh i get this
mail08# ./snmpd.sh restart
Stopping snmpd.
Waiting for PIDS: 12257.
exec: mailcount: not found
Starting snmpd.
exec: mailcount: not found
exec: mailcount: not found
I was using a older version of perl. 5.6.1
What about this file I don't have it. its the append file to be added in snmpd.sh I can't find anywhere on my system the allstat.sh
exec mailcount /usr/local/bin/allstat.sh
after starting snmpd.sh i get this
mail08# ./snmpd.sh restart
Stopping snmpd.
Waiting for PIDS: 12257.
exec: mailcount: not found
Starting snmpd.
exec: mailcount: not found
exec: mailcount: not found
can i see what you got in your snmpd.conf
Hi,
can I see what you got in your snmpd.conf.
thank you for all the help..
can I see what you got in your snmpd.conf.
thank you for all the help..
The only special contents of my snmpd.conf file are the one line from the text file in the zip:
Code: Select all
exec mailcount /usr/local/bin/postfixstats.sh
why does it give me error.
I try to run that scripts from
/usr/local/bin/postfixstats.sh
and it return this.
mail08# ./postfixstats.sh
sent:0 received:0 rejected:0 bounced:0 spam:0 virus:0
What can be wrong?
/usr/local/bin/postfixstats.sh
and it return this.
mail08# ./postfixstats.sh
sent:0 received:0 rejected:0 bounced:0 spam:0 virus:0
What can be wrong?
can someone help me.
Hi,
I'm still getting
mesg: /dev/ttyp0: Operation not permitted
when i run ./mailgraph.sh
anyone know what this mean? why it say operation not permitted?
I'm still getting
mesg: /dev/ttyp0: Operation not permitted
when i run ./mailgraph.sh
anyone know what this mean? why it say operation not permitted?
Are you running mailgraph as root?
Usually you'll get errors if it's not being run as root.
Try running this before running it again:
Check the permissions of /var/log/maillog
And check the permissions of /dev/ttyp0
You might also try not starting the script as ./mailgraph.sh, but start it like so:
You can also check /var/log/messages to see if there are any other errors.
Usually you'll get errors if it's not being run as root.
Try running this before running it again:
Code: Select all
mesg y
Code: Select all
-rw-r----- 1 root wheel 64638461 May 17 14:26 /var/log/maillog
Code: Select all
crw--w---- 1 <your username> tty 5, 0 May 17 14:28 /dev/ttyp0
Code: Select all
/usr/local/etc/rc.d/mailgraph.sh start
Who is online
Users browsing this forum: No registered users and 3 guests