|
|
| Author |
Message |
valec
Joined: 23 Aug 2006 Posts: 5 Location: New Zealand
|
|
| Back to top |
|
 |
masdani
Joined: 11 Oct 2006 Posts: 1 Location: Indonesia
|
Posted: Wed Oct 11, 2006 3:58 am Post subject: |
|
|
after try, i have problem. the graphic show nan, and manual running snmpwalk give info :
bash-3.00# snmpwalk -v1 -c gagak localhost .1.3.6.1.4.1.2021.53.101.0
UCD-SNMP-MIB::ucdavis.53.101.0.1.1 = INTEGER: 1
UCD-SNMP-MIB::ucdavis.53.101.0.2.1 = STRING: "mailq"
UCD-SNMP-MIB::ucdavis.53.101.0.3.1 = STRING: "/usr/local/bin/getmailq.sh"
UCD-SNMP-MIB::ucdavis.53.101.0.100.1 = INTEGER: 0
UCD-SNMP-MIB::ucdavis.53.101.0.101.1 = STRING: "/usr/local/bin/getmailq.sh: line 12: qshape: command not found"
UCD-SNMP-MIB::ucdavis.53.101.0.101.2 = STRING: "incoming: /usr/local/bin/getmailq.sh: line 12: qshape: command not found"
UCD-SNMP-MIB::ucdavis.53.101.0.101.3 = STRING: "active: /usr/local/bin/getmailq.sh: line 12: qshape: command not found"
UCD-SNMP-MIB::ucdavis.53.101.0.101.4 = STRING: "deferred: /usr/local/bin/getmailq.sh: line 12: qshape: command not found"
UCD-SNMP-MIB::ucdavis.53.101.0.101.5 = STRING: "hold: "
UCD-SNMP-MIB::ucdavis.53.101.0.102.1 = INTEGER: 0
UCD-SNMP-MIB::ucdavis.53.101.0.103.1 = ""
and after run in command line, i have error like this :
./getmailq.sh
./getmailq.sh: line 12: qshape: command not found
incoming: ./getmailq.sh: line 12: qshape: command not found
active: ./getmailq.sh: line 12: qshape: command not found
deferred: ./getmailq.sh: line 12: qshape: command not found
i have running postfix postfix-2.2.10 in freebsd box
|
|
| Back to top |
|
 |
Keene44 Cacti User
Joined: 17 Aug 2006 Posts: 52
|
Posted: Fri Oct 13, 2006 8:43 am Post subject: |
|
|
Looks like you don't have qshape installed on your postfix server.
I believe it comes installed in most postfix versions. It's just a perl file that you can find on the net.
|
|
| Back to top |
|
 |
sloop
Joined: 17 Oct 2006 Posts: 14
|
Posted: Tue Oct 17, 2006 10:11 am Post subject: |
|
|
The data input method includes:
| Code: | | /bin/bash <path_cacti>/scripts/postfixqueues.sh <Host_IP> |
Can you please include this script? thanks
|
|
| Back to top |
|
 |
valec
Joined: 23 Aug 2006 Posts: 5 Location: New Zealand
|
Posted: Thu Oct 19, 2006 5:11 pm Post subject: |
|
|
| Ahh yeah, whoops. I'll do so now.
|
|
| Back to top |
|
 |
cscott
Joined: 26 Oct 2006 Posts: 2
|
Posted: Thu Oct 26, 2006 6:21 pm Post subject: What version |
|
|
| I am getting a "Error: XML: Hash version does not exist." when importing the graph template. What version of Cacti was this exported from? I am using 0.8.6i-1.
|
|
| Back to top |
|
 |
mdvz0r
Joined: 27 Oct 2006 Posts: 1
|
Posted: Fri Oct 27, 2006 9:03 am Post subject: |
|
|
Seems like this is not going to work for me.
Problem is that the snmp deamon (running as user snmp) doesn't have access to the /var/spool/postfix/.. directories. So qshape will generate errors. How did you guys solve this?
|
|
| Back to top |
|
 |
cscott
Joined: 26 Oct 2006 Posts: 2
|
Posted: Fri Oct 27, 2006 1:45 pm Post subject: postfix permissions |
|
|
| What is snmpd running as on your machine? Can't you fix it by using group permissions?
|
|
| Back to top |
|
 |
cviebrock
Joined: 06 Dec 2006 Posts: 3
|
Posted: Wed Dec 06, 2006 11:14 pm Post subject: |
|
|
I've got this problem too:
| Code: | # snmpwalk -v 1 -c public localhost .1.3.6.1.4.1.2021.53.101.0
UCD-SNMP-MIB::ucdavis.53.101.0.1.1 = INTEGER: 1
UCD-SNMP-MIB::ucdavis.53.101.0.2.1 = STRING: "mailq"
UCD-SNMP-MIB::ucdavis.53.101.0.3.1 = STRING: "/usr/local/bin/getmailq.sh"
UCD-SNMP-MIB::ucdavis.53.101.0.100.1 = INTEGER: 0
UCD-SNMP-MIB::ucdavis.53.101.0.101.1 = STRING: "Can't cd to incoming: Permission denied"
UCD-SNMP-MIB::ucdavis.53.101.0.101.2 = STRING: " at /usr/sbin/qshape line 286"
UCD-SNMP-MIB::ucdavis.53.101.0.101.3 = STRING: "incoming:0 Can't cd to active: Permission denied"
UCD-SNMP-MIB::ucdavis.53.101.0.101.4 = STRING: " at /usr/sbin/qshape line 286"
UCD-SNMP-MIB::ucdavis.53.101.0.101.5 = STRING: "active:0 Can't cd to deferred: Permission denied"
UCD-SNMP-MIB::ucdavis.53.101.0.101.6 = STRING: " at /usr/sbin/qshape line 286"
UCD-SNMP-MIB::ucdavis.53.101.0.101.7 = STRING: "deferred:0 Can't cd to hold: Permission denied"
UCD-SNMP-MIB::ucdavis.53.101.0.101.8 = STRING: " at /usr/sbin/qshape line 286"
UCD-SNMP-MIB::ucdavis.53.101.0.101.9 = STRING: "hold:0 "
UCD-SNMP-MIB::ucdavis.53.101.0.102.1 = INTEGER: 0
UCD-SNMP-MIB::ucdavis.53.101.0.103.1 = ""
|
I tried adding the "snmp" user to the "postfix", the "adm" and even the "root" group, with no success.
The directories have the following perms:
| Code: | xxx:/var/spool/postfix/deferred# ls -las
total 72
4 drwx------ 18 postfix root 4096 2006-07-20 00:09 .
4 drwxr-xr-x 19 root root 4096 2006-11-08 11:33 ..
4 drwx------ 2 postfix postfix 4096 2006-12-06 22:59 0
4 drwx------ 2 postfix postfix 4096 2006-12-06 22:59 1
etc.
|
Any suggestions?[/code]
|
|
| Back to top |
|
 |
MoreDakka
Joined: 04 Jul 2007 Posts: 31
|
Posted: Wed Jul 18, 2007 11:17 am Post subject: |
|
|
| I am also having a problem with this script. If I enter the information in manually it works no problem and I've narrowed it down to "syzygy". I have no idea what that is. If it's a place holder is there any way to have the script grab the community from cacti rather than manually enter it?
|
|
| Back to top |
|
 |
zoemdoef
Joined: 24 Jul 2007 Posts: 1
|
Posted: Tue Jul 24, 2007 4:34 am Post subject: |
|
|
| MoreDakka wrote: | | I am also having a problem with this script. If I enter the information in manually it works no problem and I've narrowed it down to "syzygy". I have no idea what that is. If it's a place holder is there any way to have the script grab the community from cacti rather than manually enter it? |
syzygy is the snmp community name.
I am also stuggling with the permissions. Added user:snmp to postfix and root groups. When i run the getmailq.sh script it returns 0 values. When running the same script under root it works fine.
|
|
| Back to top |
|
 |
pologtijaune
Joined: 17 Sep 2007 Posts: 1
|
Posted: Mon Sep 17, 2007 2:15 pm Post subject: |
|
|
Hi
I have somme problems with this scripts :
| Code: |
# /usr/bin/snmpwalk -v2c -c COMUNITY IPADDRESS .1.3.6.1.4.1.2021.53.101.0
UCD-SNMP-MIB::ucdavis.53.101.0.1.1 = INTEGER: 1
UCD-SNMP-MIB::ucdavis.53.101.0.2.1 = STRING: "mailq"
UCD-SNMP-MIB::ucdavis.53.101.0.3.1 = STRING: "/usr/local/bin/postfix_mailq.sh"
UCD-SNMP-MIB::ucdavis.53.101.0.100.1 = INTEGER: 0
Timeout: No Response from IPADDRESS
|
On the postfix server :
| Code: |
# time /usr/local/bin/postfix_mailq.sh
incoming:0 active:34 deferred:2530 hold:0
real 0m4.431s
user 0m1.265s
sys 0m3.368s
|
What is the problem ?
|
|
| Back to top |
|
 |
pheezy Cacti User
Joined: 26 Oct 2006 Posts: 54
|
Posted: Mon Sep 24, 2007 4:24 pm Post subject: |
|
|
| You need to prepend your entry in snmpd.conf with /bin/sh
|
|
| Back to top |
|
 |
jerome
Joined: 29 Oct 2007 Posts: 5
|
Posted: Fri Nov 02, 2007 9:50 am Post subject: |
|
|
[edit]
Hi,
I've just added this script to my cacti system. The client side works fine. The postfixqueues.sh on cacti server give me correct results but result in cacti are false :
| Code: | ./postfixqueues.sh mail_host
incoming:1 active:8 deferred:19564 hold:0
|
I'm using Cacti 0.8.6i on Debian Etch.
Any idea ?
Thanks
Jerome
| Description: |
|
| Filesize: |
25.21 KB |
| Viewed: |
18367 Time(s) |

|
|
|
| Back to top |
|
 |
monachus
Joined: 06 Sep 2004 Posts: 30 Location: New York, NY
|
Posted: Mon Nov 05, 2007 9:37 pm Post subject: |
|
|
if using newer versions of net-snmp, you should use the extend directive instead of the exec directive, which will require some changes to the scripts:
in snmpd.conf:
| Code: |
extend mailq /usr/local/bin/getmailq.sh
|
in postfixqueues.sh:
| Code: |
/usr/bin/snmpget -Oqav -v2c -c<community> -t30 $1 'NET-SNMP-EXTEND-MIB::nsExtendOutLine."mailq".1' | cut -d '"' -f 2
|
also, in newer versions of postfix, "qshape" has become "qshape.pl." check on your system for the updated version.
|
|
| Back to top |
|
 |
|