dilindam
10.08.10, 20:22
Hallo,
ich versuche schon die ganze Zeit die mailqueue von postfix im cacti graph
darzustellen. Leider ohne Erfolg. Habe die zwei Threads im cacti Forum durch.
Bringt aber nichts. Wollte mal hier fragen ob das jemand am laufen hat.
Also eingerichtet ist alles, kann mit cacti andere Sachen vom mailserver abfragen.
Hier mal meine Installation:
mail:~/script# vi /etc/snmp/snmpd.conf
extend .1.3.6.1.4.1.2021.53.101.0.101.1 mailq /root/script/getmailq.pl
mail:~/script# vi getmailq.pl
#!/usr/bin/perl -w
use strict;
my $mailqbin = '/usr/bin/mailq';
open(MAILQ, "$mailqbin|");
while (<MAILQ>) {
if ($_ =~ m/^.*Kbytes.*Requests.*$/) {
my @temp = split(/ /, $_);
print $temp[4];
}
}
moni:/usr/share/cacti/site/scripts# vi postfixqueues.sh
#!/bin/bash
#/usr/share/cacti/site/scripts/postfixqueues.sh
output=`/usr/bin/snmpwalk -Oav -v2c -c community $1 1.3.6.1.4.1.2021.53.101.0.101.1 | cut -d '"' -f 2`
printf "$output"
echo
Dann noch das graphtemplate aus dem cacti forum importiert.
Die Graphen bleiben aber leer.
moni:/usr/share/cacti/site/scripts# ./postfixqueues.sh <mailserverIP>
INTEGER: 1
/root/script/getmailq.pl
INTEGER: 5
INTEGER: 1
INTEGER: 1
INTEGER: 4
INTEGER: 1
191
191
INTEGER: 1
INTEGER: 0
191
Jemand n Idee was ich falsch mache?
ich versuche schon die ganze Zeit die mailqueue von postfix im cacti graph
darzustellen. Leider ohne Erfolg. Habe die zwei Threads im cacti Forum durch.
Bringt aber nichts. Wollte mal hier fragen ob das jemand am laufen hat.
Also eingerichtet ist alles, kann mit cacti andere Sachen vom mailserver abfragen.
Hier mal meine Installation:
mail:~/script# vi /etc/snmp/snmpd.conf
extend .1.3.6.1.4.1.2021.53.101.0.101.1 mailq /root/script/getmailq.pl
mail:~/script# vi getmailq.pl
#!/usr/bin/perl -w
use strict;
my $mailqbin = '/usr/bin/mailq';
open(MAILQ, "$mailqbin|");
while (<MAILQ>) {
if ($_ =~ m/^.*Kbytes.*Requests.*$/) {
my @temp = split(/ /, $_);
print $temp[4];
}
}
moni:/usr/share/cacti/site/scripts# vi postfixqueues.sh
#!/bin/bash
#/usr/share/cacti/site/scripts/postfixqueues.sh
output=`/usr/bin/snmpwalk -Oav -v2c -c community $1 1.3.6.1.4.1.2021.53.101.0.101.1 | cut -d '"' -f 2`
printf "$output"
echo
Dann noch das graphtemplate aus dem cacti forum importiert.
Die Graphen bleiben aber leer.
moni:/usr/share/cacti/site/scripts# ./postfixqueues.sh <mailserverIP>
INTEGER: 1
/root/script/getmailq.pl
INTEGER: 5
INTEGER: 1
INTEGER: 1
INTEGER: 4
INTEGER: 1
191
191
INTEGER: 1
INTEGER: 0
191
Jemand n Idee was ich falsch mache?