QueueStats -- Graph Qmail Local and Remote queue sizes

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

Moderators: Moderators, Developers

Post Reply
Author
Message
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

#1 Post by andrew2 » Wed Jul 28, 2004 5:31 pm

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 2301 times

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

#2 Post by stoopinc » Fri Sep 10, 2004 5:49 pm

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:

#3 Post by andrew2 » Mon Sep 13, 2004 12:35 pm

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

#4 Post by stoopinc » Sun Sep 19, 2004 12:55 pm

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

#5 Post by SCaRaBaeuS » Wed Oct 20, 2004 6:17 am

i am getting the following error:
[[email protected] snmp]# snmpwalk -Oav -v2c -c public localhost .1.3.6.4.1.2021.51
Timeout: No Response from localhost
[[email protected] snmp]# snmpwalk -Oav -v2c -c public localhost .1.3.6.4.1.2021.1
Timeout: No Response from localhost
[[email protected] 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
[[email protected] 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:

#6 Post by andrew2 » Fri Oct 22, 2004 9:56 am

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:

#7 Post by andrew2 » Fri Oct 22, 2004 4:42 pm

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 1965 times

Onkel_Tom
Posts: 12
Joined: Sat Apr 23, 2005 7:48 pm

#8 Post by Onkel_Tom » Sat Oct 21, 2006 1:05 pm

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

#9 Post by mike776 » Mon Mar 26, 2007 3:24 pm

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

#10 Post by gavinlew » Thu Jun 12, 2008 4:00 pm

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

#11 Post by DougWare » Wed Mar 17, 2010 8:15 am

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

#12 Post by DougWare » Wed Mar 17, 2010 10:43 am

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