QueueStats -- Graph Qmail Local and Remote queue sizes

Templates, scripts for templates, scripts and requests for templates.

Moderators: Developers, Moderators

Post Reply
andrew2
Cacti User
Posts: 64
Joined: Mon Jul 26, 2004 2:50 pm
Location: Cincinnati, OH
Contact:

QueueStats -- Graph Qmail Local and Remote queue sizes

Post by andrew2 »

An important part of maintaining the health of a Qmail server is to keep an eye on the size of the local and remote queues.
Messages piling up in the queues are a sure sign that something is wrong. Having historical graphs of queue size can help
for capacity planning as well. With that in mind, I set out to create a way to graph the queue size in Qmail using Cacti.

This is the very first version of this so bug reports/fixes and feature requests are more than welcome.

Andrew
Attachments
queuestats-0.1.tar.gz
(4.08 KiB) Downloaded 2389 times
stoopinc
Posts: 11
Joined: Wed Apr 14, 2004 9:27 pm
Location: Boulder, CO

Post by stoopinc »

I am having trouble getting the exec line in the Qmail server's Snmpd.conf to work. I am running ucd-snmpd on a Red Hat 7.3 system. Any suggestions? SNMP seems to be working correctly for everything else.
andrew2
Cacti User
Posts: 64
Joined: Mon Jul 26, 2004 2:50 pm
Location: Cincinnati, OH
Contact:

Post by andrew2 »

Just in case, did you make sure to restart snmpd after making changes to the config file?

If so, what happens if you use snmpwalk to poll that data?

snmpwalk -Oav -v2c -c communityname serverip .1.3.6.1.4.1.2021.51.101.1

(Obviously replacing communityname and serverip with your SNMP community name and the IP of your qmail server.)

Also be sure that whatever user snmpd runs as has execute permission on queuesize.pl.

Andrew
stoopinc
Posts: 11
Joined: Wed Apr 14, 2004 9:27 pm
Location: Boulder, CO

Post by stoopinc »

andrew2 wrote: snmpwalk -Oav -v2c -c communityname serverip .1.3.6.1.4.1.2021.51.101.1
Andrew
Looks like I just messed up the snmpwalk command. I was using:
snmpwalk -Oav -v2c -c [yoursnmpcommunityname] [mailserverip] .1.3.6.4.1.2021.51

from the readme in the tarball. When I executed :
snmpwalk -Oav -v2c -c communityname serverip .1.3.6.1.4.1.2021.51.101.1

I received:
STRING: "Remote:152 Local:0"
User avatar
SCaRaBaeuS
Posts: 22
Joined: Tue Mar 30, 2004 9:42 am

Post by SCaRaBaeuS »

i am getting the following error:
[root@www snmp]# snmpwalk -Oav -v2c -c public localhost .1.3.6.4.1.2021.51
Timeout: No Response from localhost
[root@www snmp]# snmpwalk -Oav -v2c -c public localhost .1.3.6.4.1.2021.1
Timeout: No Response from localhost
[root@www snmp]# snmpwalk -Oav -v2c -c public 82.192.84.1 .1.3.6.4.1.2021.1
Timeout: No Response from 82.192.84.1
[root@www snmp]#
maybe my firewall? but dont think so.. :)
andrew2
Cacti User
Posts: 64
Joined: Mon Jul 26, 2004 2:50 pm
Location: Cincinnati, OH
Contact:

Post by andrew2 »

Try:

snmpwalk -Oav -v2c -c communityname serverip .1.3.6.1.4.1.2021.51.101.1

(Provided that's what you've entered into your snmp configuration on the target server.)

Andrew
andrew2
Cacti User
Posts: 64
Joined: Mon Jul 26, 2004 2:50 pm
Location: Cincinnati, OH
Contact:

Post by andrew2 »

Looks like I had a typo in the README file...here is the updated package with the correct README.

Andrew
Attachments
queuestats.tar.gz
(4.08 KiB) Downloaded 2053 times
User avatar
Onkel_Tom
Posts: 16
Joined: Sat Apr 23, 2005 7:48 pm
Location: Germany

Post by Onkel_Tom »

thanks for this script!
works fine for me.

Just a hint:
the snmp community name is harcoded in the file queuecheck.pl and also not standard "public" :wink:
after changing this the script works fine for server localhost.
mike776
Posts: 8
Joined: Sat May 29, 2004 10:35 am

Post by mike776 »

Hello guys,
I am getting some weird error when I run this:
snmpwalk -Oav -v2c -c commstring serverIP .1.3.6.1.4.1.2021.51.101.1
this is the error:
No more variables left in this MIB View (It is past the end of the MIB tree)

Please help
Mike
gavinlew
Posts: 1
Joined: Thu Jun 12, 2008 3:58 pm

Post by gavinlew »

Hi All,

This script seems perfect for what I need, I have had to make a few modifications to queuesize.pl to get the correct output from the queue.

When I run it from the command line I get ;

$ /usr/bin/perl /usr/local/bin/queuesize.pl
Remote:25 Local:0

However, when I snmpwalk , I get the following ;

$ snmpwalk -Oav -v2c -c XXXX XXX.XX.XXX.XXX .1.3.6.1.4.1.2021.51
INTEGER: 1
STRING: "/usr/bin/perl"
STRING: "/usr/local/bin/queuesize.pl"
INTEGER: 0
STRING: "Remote:0 Local:0"
INTEGER: 0
""

As you can see the values are different?

Is this script still being worked on, or is there an alternative I should be using?

Thanks, Gavin
DougWare
Posts: 4
Joined: Wed Nov 12, 2008 2:58 pm

Post by DougWare »

I realize this script is old, but I'm only getting "NaN" for the values.
The script works when run manually from the Cacti folder.
The query is setup correctly and points to the correct script location.

Can someone help me resolve this?

Thanks!

Doug
DougWare
Posts: 4
Joined: Wed Nov 12, 2008 2:58 pm

Post by DougWare »

I've narrowed it down to Cacti not including the hostname or IP address, even though it's specified.

03/17/2010 11:39:16 AM - SPINE: Poller[0] Host[7] ERROR: Empty result [WEB01]: '/usr/bin/perl /var/www/cacti/scripts/queuecheck.pl '
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests