
You are connected using IPv4. The logo above will turn green when you connect using IPv6.
Ask your ISP about IPv6 connectivity, and check your status here.
Archives
Quicksearch
Syndicate This Blog
Linux, Solaris and FreeBSD iostat monitoring with Cacti
I've been looking for ages for a tool to parse the output from "iostat" on Linux, and graph it in Cacti. I found a few scripts and templates that did some of what I was looking for (disk I/O etc.), but nothing that gave me the full set of statistics such as queue length, utilisation, service time etc. I finally got round to writing my own set of templates and a data gathering script to provide this information, and it seems to work very well. So that others can benefit, I've posted the package archive and a brief description over on the Cacti forums (click Continue Reading for a download link to an updated version - the one on the Cacti forums has a bug so that it won't work with all versions of sysstat). Below are a couple of sample graphs to give you an idea of what it can do - there's also a few more samples posted in the Cacti forums thread :


Installation is a simple matter of creating a cron job to gather iostat data, extending your snmpd.conf to call the included iostat.pl script, and then importing the templates. Full instructions are included in the README within the archive (click the Continue Reading link to see them), but if you have any comments, suggestions or problems please let me know!
Update : Thanks to a patch from Viktor Sokolov, the iostat.pl script should now work with older sysstat versions, including the one that shipped with Debian Etch. I tried to update my original post over on the Cacti forums, but kept getting hit with a wonderful error message ("Mistake! Your message is sent to hell. Try still times who knows - can it will turn out?")
Update 2 : The package now supports Solaris.
Update 3 : The package now supports FreeBSD! The trinity is complete ![]()
Update 4 : If you have trouble with the script (it returns no data in Cacti, graphs remain blank), try increasing the SNMP timeout setting for the device in Cacti. Some people have reported increasing this from 500ms to 10000ms works...
Update 5 : There is now a much improved persistent version of the script included - see below for comments from "acq"
Update 6 : The package is now being maintained at GitHub. This means you can now grab the latest version by running
git clone https://github.com/markround/Cacti-iostat-templates.gitHopefully, this will mean that I'll be able to incorporate patches more easily, as well as open up development to anyone who wants to fork their own versions. You can also download the latest tarball or ZIP archive from https://github.com/markround/Cacti-iostat-templates.
In the meantime, you can grab the old tarball here if you don't have git installed.: cacti-iostat-1.6.tar.gz
Below is the full text from the included README :
OVERVIEW
--------
This is a collection of scripts and Cacti templates to graph the output from
the "iostat" command. At the moment, it supports Linux and Solaris iostat.
This release was put together by myself (Mark Round), and the iostat.pl script
was based heavily on the fantastic bind9 stats Cacti plugin, written by Cory
Powers. The iostat command used on Linux is "iostat -xkd", which requires a 2.5
or newer kernel. Solaris uses "iostat -dx" which should work on just about any
version of Solaris.
The Solaris modifications were made by Marwan Shaher and Eric Schoeller - many
thanks to you two
The Linux templates have all been exported from Cacti 0.8.7b, and the Solaris
templates were exported from Cacti 0.8.7d. Importing into newer versions of
Cacti should work, but importing into previous versions of Cacti will probably
not work - if you have problems with the templates, please try upgrading first
before reporting a bug.
The OID used by this script (.1.3.6.1.3.1) is marked as being reserved for
"experimental" usage. While it will work out of the box, this range may not be
unique across your organisation. If you decide to change this, you will need to
adjust the instructions below to reflect this.
CHANGES
-------
18/07/2009 - Version 1.5 - Added FreeBSD distribution from Boogie Shafer
22/06/2009 - Version 1.4 - Added FreeBSD license
19/03/2009 - Version 1.3 - Added patch from Marwan Shaher and Eric Schoeller
to support Solaris
16/03/2009 - Version 1.2 - Changed instructions for cron job, so that commas
get substituted with period (.) characters on
older iostat versions
10/03/2009 - Version 1.1 - Added patch from Viktor Sokolov to work with older
sysstat found on Debian Etch and other distros.
14/10/2008 - Version 1.0 - Initial release
FREEBSD NOTES
-------------
Thanks to the awesome work of Boogie Shafer, there is now a FreeBSD port
of these scripts. I have included the modified tarball that was sent to me,
this is inside the archive as the following file :
cacti-iostat-1.x-boogie_freebsd_linux_changes.tar.gz
FreeBSD users should unpack this archive and follow the instructions inside.
I have not had time to go through and merge these changes into one unified
distribution yet, but as people were asking for the FreeBSD port, here it
is!
The next release of these scripts should see the scripts and templates
etc. merged in, much the same as the Solaris modifications by
Marwan Shaher and Eric Schoeller.
INSTALLATION
------------
1.) CRON JOB
On the server to be monitored, copy scripts/iostat.pl to /usr/local/bin.
Then, define a cron job that creates the iostat.cache file. For example, on
most Linux systems, you should be able to create a file called
/etc/cron.d/iostat with the following contents :
* * * * * root cd /tmp && iostat -xkd 30 2 | sed 's/,/\./g' > io.tmp && mv io.tmp iostat.cache
And on Solaris, you'll need to edit a suitable crontab (root or sys would be the
obvious choices) with the following :
* * * * * cd /tmp && iostat -dx 30 2 > io.tmp && mv io.tmp iostat.cache
This will create the cache file once every minute, and will sample for 30
seconds. You can adjust this figure as necessary, but avoid the trap of setting
it to sample for 60 seconds - as the command will take slightly longer than 1
minute to run, you'll end up with multiple processes running.
2.) SNMPD MODIFICATION
Edit your NET-SNMPD snmpd.conf file to include the following (adjusting the OID
if necessary, see above) :
pass .1.3.6.1.3.1 /usr/bin/perl /usr/local/bin/iostat.pl
There is also a much improved persistent script which involves a lot less forking,
and also a caching mechanism. If you would like to use this version (recommended),
add it to your snmpd.conf with the following instead :
pass_persist .1.3.6.1.3.1 /usr/bin/perl /usr/local/bin/iostat-persist.pl
Only use one of these - don't enable both!
Then restart your snmpd process. After the cron job has run (check for the
existence of the /tmp/iostat.cache file), you should be able to test the script
returns data, using a snmpwalk command similar to the following :
snmpwalk -v1 -c community_string your_host_ip .1.3.6.1.3.1.2
You should get a list of devices on the server returned, which will look similar
to the following on Linux :
SNMPv2-SMI::experimental.1.2.1 = STRING: "sda"
SNMPv2-SMI::experimental.1.2.2 = STRING: "dm-1"
SNMPv2-SMI::experimental.1.2.3 = STRING: "sdb"
SNMPv2-SMI::experimental.1.2.4 = STRING: "dm-2"
Or on Solaris :
SNMPv2-SMI::experimental.1.2.1 = STRING: "cmdk0"
SNMPv2-SMI::experimental.1.2.2 = STRING: "cmdk1"
SNMPv2-SMI::experimental.1.2.3 = STRING: "md0"
SNMPv2-SMI::experimental.1.2.4 = STRING: "md1"
If you get no output, go back and double check the previous two steps.
3.) CACTI INSTALLATION
For Linux, copy snmp_queries/linux/iostat.xml to your Cacti server, and place it
under <cacti_path>/resource/snmp_queries. Under Debian, this is
/usr/share/cacti/resource/snmp_queries , but may be different for other systems.
For Solaris, the process is the same, but the file in this archive is
snmp_queries/solaris/solaris-iostat.xml
If you've decided to change the OID, you'll also need to modify these files.
Next, log into your Cacti web interface, and click on "Import Templates". Import
all of the templates under the templates directory for your OS.
You should then be able to go to the host device you want to monitor, and add
the new data queries. Then, click on "Create Graphs for this Host", and
select the devices you want to graph.
FEEDBACK
--------
Any comments, criticism, bug reports, suggestions, fixes, etc. all appreciated!
Drop me a line at cacti@markround.com, and I'll do my best to reply


















Thursday, October 23. 2008 at 17:30 (Reply)
Where could I be having my problem?
Monday, October 27. 2008 at 14:35 (Reply)
Also, what happens when you do a SNMP walk for one of the data columns - for instance .1.3.6.1.3.1.13 for the utilisation ?
Monday, October 27. 2008 at 15:16 (Reply)
No, I'm not getting far enough to generate an RRD.
When I add the query to the device ir shows:
1) iostat - Queue size (Verbose Query) Uptime Goes Backwards Success [0 Items, 0 Rows]
I just added the Queue Size one first to see if it worked at all.
A verbose query execution returns:
"+ Running data query [22].
+ Found type = '3' [snmp query].
+ Found data query XML file at '/proj/cacti/cacti-0.8.7b/resource/snmp_queries/iostat.xml'
+ XML file parsed ok.
+ Executing SNMP walk for list of indexes @ '.1.3.6.1.3.1'
+ Located input field 'ioIndex' [walk]
+ Executing SNMP walk for data @ '.1.3.6.1.3.1.1'
+ Located input field 'ioDescr' [walk]
+ Executing SNMP walk for data @ '.1.3.6.1.3.1.2'
+ Found data query XML file at '/proj/cacti/cacti-0.8.7b/resource/snmp_queries/iostat.xml'
+ Found data query XML file at '/proj/cacti/cacti-0.8.7b/resource/snmp_queries/iostat.xml'
+ Found data query XML file at '/proj/cacti/cacti-0.8.7b/resource/snmp_queries/iostat.xml'
"
The snmpwalk you asked for returns valid data:
root@mivl02:/tmp > snmpwalk -v 2c -c CENSOR miux77 .1.3.6.1.3.1.13
SNMPv2-SMI::experimental.1.13.1 = STRING: "0.34"
SNMPv2-SMI::experimental.1.13.2 = STRING: "0.00"
SNMPv2-SMI::experimental.1.13.3 = STRING: "0.00"
SNMPv2-SMI::experimental.1.13.4 = STRING: "0.00"
SNMPv2-SMI::experimental.1.13.5 = STRING: "0.00"
SNMPv2-SMI::experimental.1.13.6 = STRING: "0.00"
SNMPv2-SMI::experimental.1.13.7 = STRING: "0.00"
SNMPv2-SMI::experimental.1.13.8 = STRING: "0.00"
SNMPv2-SMI::experimental.1.13.9 = STRING: "0.00"
SNMPv2-SMI::experimental.1.13.10 = STRING: "0.00"
SNMPv2-SMI::experimental.1.13.11 = STRING: "0.00"
SNMPv2-SMI::experimental.1.13.12 = STRING: "0.00"
SNMPv2-SMI::experimental.1.13.13 = STRING: "0.50"
SNMPv2-SMI::experimental.1.13.14 = STRING: "0.70"
SNMPv2-SMI::experimental.1.13.15 = STRING: "0.00"
SNMPv2-SMI::experimental.1.13.16 = STRING: "0.00"
SNMPv2-SMI::experimental.1.13.17 = STRING: "0.00"
SNMPv2-SMI::experimental.1.13.18 = STRING: "0.00"
SNMPv2-SMI::experimental.1.13.19 = STRING: "0.00"
SNMPv2-SMI::experimental.1.13.20 = STRING: "0.00"
SNMPv2-SMI::experimental.1.13.21 = STRING: "0.00"
SNMPv2-SMI::experimental.1.13.22 = STRING: "0.00"
SNMPv2-SMI::experimental.1.13.23 = STRING: "0.00"
Monday, October 27. 2008 at 15:44 (Reply)
The verbose query (and the "Success [0 Items, 0 Rows]" bit) makes it appear as though no valid data is coming back.
You should have a list of indexes and descriptions in the verbose query, e.g.
+ Executing SNMP walk for data @ '.1.3.6.1.3.1.1'
+ Found item [ioIndex='1'] index: 1 [from value]
+ Found item [ioIndex='2'] index: 2 [from value]
+ Found item [ioIndex='3'] index: 3 [from value]
+ Found item [ioIndex='4'] index: 4 [from value]
+ Found item [ioIndex='5'] index: 5 [from value]
+ Found item [ioIndex='6'] index: 6 [from value]
+ Found item [ioIndex='7'] index: 7 [from value]
+ Found item [ioIndex='8'] index: 8 [from value]
...
... and so on...
...
But you say a SNMP walk provides valid data ? Are there perhaps any strange characters in your device names ? How many devices are there that you're trying to poll ?
Monday, October 27. 2008 at 17:34 (Reply)
Monday, October 27. 2008 at 17:44 (Reply)
Your scripts won't work well on a enterprise class host with many redundant path's, et al.
It works just fine returning results on smaller hosts.
How could you modify this script to return only valid paths and exclude disks with no valid partition tables?
IE: fdisk on dm-176 may return
Disk /dev/dm-176 doesn't contain a valid partition table
Monday, October 27. 2008 at 22:02 (Reply)
Typically, my hosts only have around 10-20 multipathed devices from the SAN.
I'll put some test cases together with this (and play with different partition table types etc.), and see what I can come up with. Thanks again for the comments!
Tuesday, December 16. 2008 at 04:04 (Reply)
+ Running data query [10].
+ Found type = '3' [snmp query].
+ Found data query XML file at '/var/www/cacti/resource/snmp_queries/iostat.xml'
+ XML file parsed ok.
+ Executing SNMP walk for list of indexes @ '.1.3.6.1.3.1'
+ No SNMP data returned
+ Found data query XML file at '/var/www/cacti/resource/snmp_queries/iostat.xml'
+ Found data query XML file at '/var/www/cacti/resource/snmp_queries/iostat.xml'
+ Found data query XML file at '/var/www/cacti/resource/snmp_queries/iostat.xml'
Any hints?
Thursday, March 12. 2009 at 15:22 (Reply)
I have attempted to set up iostat graphing with little luck. I am very sure it has to do with indexed data source.
Basically, I have the cron, snmp and iostat.pl script working. I also have a working cacti. From the cacti log, it does poll successfully.
Problem lies on this field Index Value on the data source. Using the existing OID, what is supposed to go in this field?
Thanks for hep in advance
Regards
Monday, March 16. 2009 at 15:43 (Link) (Reply)
Monday, March 16. 2009 at 21:01 (Reply)
Hey, think the script is formatting the data correctly as you can see below. I wonder however if you can point me further on what I am not doing correctly. Here is a snmpwalk output
SNMPv2-SMI::experimental.1.1.1 = INTEGER: 1
SNMPv2-SMI::experimental.1.2.1 = STRING: "xvda"
SNMPv2-SMI::experimental.1.3.1 = STRING: "0.00"
SNMPv2-SMI::experimental.1.4.1 = STRING: "2.07"
SNMPv2-SMI::experimental.1.5.1 = STRING: "0.00"
SNMPv2-SMI::experimental.1.6.1 = STRING: "0.83"
I have imported all the 7 templates successfully, created a host and added associated data queries related to the iostat.
However, it I attempt to click on create host on the device page, I get an error
"Data Query [iostat - kBytes/sec]"
"Error in data query."
I have also attempted to create the graphs manually. I then have to provide Index Value, a field that have no idea what is expected on it. After typing in the first OID, I gut an error and therefore this message.
Would you mind assisting please, a pointer for example of what Index value is expected for example would be enough
Wednesday, April 1. 2009 at 12:28 (Reply)
I am getting the following error when I try to import the templates
Error: XML: Hash version does not exist.
Can you please assist
Regards,
Eric
Wednesday, April 1. 2009 at 12:42 (Reply)
Wednesday, April 1. 2009 at 12:57 (Reply)
Wednesday, April 1. 2009 at 13:14 (Reply)
Saturday, June 13. 2009 at 00:26 (Reply)
Hi Mark,
Having some issues here, none of the graphs are generating any data.
snmpwalk -v1 -c public 127.0.0.1 .1.3.6.1.3.1.13
SNMPv2-SMI::experimental.1.13.1 = STRING: "0.00"
SNMPv2-SMI::experimental.1.13.2 = STRING: "0.00"
SNMPv2-SMI::experimental.1.13.3 = STRING: "0.00"
SNMPv2-SMI::experimental.1.13.4 = STRING: "0.00"
SNMPv2-SMI::experimental.1.13.5 = STRING: "0.00"
SNMPv2-SMI::experimental.1.13.6 = STRING: "0.00"
SNMPv2-SMI::experimental.1.13.7 = STRING: "0.00"
SNMPv2-SMI::experimental.1.13.8 = STRING: "0.00"
SNMPv2-SMI::experimental.1.13.9 = STRING: "0.00"
SNMPv2-SMI::experimental.1.13.10 = STRING: "0.00"
SNMPv2-SMI::experimental.1.13.11 = STRING: "0.00"
SNMPv2-SMI::experimental.1.13.12 = STRING: "0.00"
An iostat provides the following
Device: tps Blk_read/s Blk_wrtn/s Blk_read Blk_wrtn
sda 1.16 2.24 42.31 186060 3510968
sda1 0.00 0.00 0.00 378 200
sda2 0.00 0.00 0.00 400 0
sda3 1.16 2.22 42.31 184306 3510768
sdb 2.48 14.32 46.61 1188238 3867120
sdb1 1.12 2.06 25.51 171034 2116624
sdb2 0.82 7.16 12.85 593746 1066048
sdb3 0.54 5.09 8.25 422322 684448
sdc 0.03 0.88 0.30 73346 24816
sdc1 0.03 0.88 0.30 73042 24816
sdd 0.13 0.56 0.98 46698 81664
sdd1 0.13 0.56 0.98 46322 81664
Running query in debug mode on cacti returns
+ Running data query [15].
+ Found type = '3' [snmp query].
+ Found data query XML file at '/var/www/html/cacti/resource/snmp_queries/iostat.xml'
+ XML file parsed ok.
+ Executing SNMP walk for list of indexes @ '.1.3.6.1.3.1'
+ No SNMP data returned
+ Found data query XML file at '/var/www/html/cacti/resource/snmp_queries/iostat.xml'
+ Found data query XML file at '/var/www/html/cacti/resource/snmp_queries/iostat.xml'
+ Found data query XML file at '/var/www/html/cacti/resource/snmp_queries/iostat.xml'
Any ideas, thanks.
Monday, June 15. 2009 at 10:48 (Reply)
Monday, June 15. 2009 at 17:43 (Reply)
SELinux is not enabled. Here is the output in the iostat.cache file. Thanks.
Linux 2.4.21-47.0.1.ELcustom_oct_27_2006 (xtropicalis) 06/15/09
Device: rrqm/s wrqm/s r/s w/s rsec/s wsec/s rkB/s wkB/s avgrq-sz avgqu-sz await svctm %util
sda 0.03 3.17 0.11 0.82 1.09 32.09 0.54 16.05 35.68 0.00 1.26 0.80 0.07
sda1 0.00 0.00 0.00 0.00 0.01 0.00 0.00 0.00 13.90 0.00 7.82 5.13 0.00
sda2 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 12.31 0.00 4.10 4.10 0.00
sda3 0.03 3.17 0.10 0.82 1.08 32.09 0.54 16.05 35.72 0.00 1.25 0.80 0.07
sdb 0.69 3.52 0.52 1.59 8.33 40.87 4.16 20.44 23.28 0.01 2.99 1.38 0.29
sdb1 0.13 2.09 0.05 1.08 1.10 25.31 0.55 12.65 23.54 0.00 1.12 0.54 0.06
sdb2 0.29 1.17 0.24 0.34 4.08 12.10 2.04 6.05 27.79 0.00 4.17 2.32 0.14
sdb3 0.27 0.26 0.23 0.18 3.14 3.47 1.57 1.73 16.15 0.00 6.44 2.83 0.12
sdc 0.11 0.01 0.00 0.03 0.56 0.31 0.28 0.15 27.08 0.00 3.18 1.73 0.01
sdc1 0.11 0.01 0.00 0.03 0.56 0.31 0.28 0.15 27.21 0.00 3.19 1.73 0.01
sdd 0.02 0.06 0.04 0.04 0.33 0.57 0.16 0.29 11.97 0.01 89.02 1.91 0.01
sdd1 0.02 0.06 0.04 0.04 0.33 0.57 0.16 0.29 11.97 0.01 89.27 1.92 0.01
Device: rrqm/s wrqm/s r/s w/s rsec/s wsec/s rkB/s wkB/s avgrq-sz avgqu-sz await svctm %util
sda 0.00 3.17 0.00 0.70 0.00 30.93 0.00 15.47 44.19 0.00 0.00 0.00 0.00
sda1 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
sda2 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
sda3 0.00 3.17 0.00 0.70 0.00 30.93 0.00 15.47 44.19 0.00 0.00 0.00 0.00
sdb 0.00 2.87 0.00 1.07 0.00 31.47 0.00 15.73 29.50 0.00 0.00 0.00 0.00
sdb1 0.00 1.80 0.00 0.73 0.00 20.27 0.00 10.13 27.64 0.00 0.00 0.00 0.00
sdb2 0.00 1.00 0.00 0.20 0.00 9.60 0.00 4.80 48.00 0.00 0.00 0.00 0.00
sdb3 0.00 0.07 0.00 0.13 0.00 1.60 0.00 0.80 12.00 0.00 0.00 0.00 0.00
sdc 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
sdc1 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
sdd 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
sdd1 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
Tuesday, June 16. 2009 at 10:04 (Reply)
From the README :
"The iostat command used on Linux is "iostat -xkd", which requires a 2.5 or newer kernel."
Although, it might work on a patched 2.4 series system. It looks like you have a couple of extra columns in your output - you have :
Device
rrqm/s
wrqm/s
r/s
w/s
rsec/s
wsec/s
rkB/s
wkB/s
avgrq-sz
avgqu-sz
await
svctm
%util
Whereas I have :
Device
rrqm/s
wrqm/s
r/s
w/s
rkB/s
wkB/s
avgrq-sz
avgqu-sz
await
svctm
%util
So, assuming your statistics are getting reported correctly, you could always try modifying the regex inside the perl script to include those columns (add a couple more \s+(\d+\.\d+) blocks, so it might read :
/^([a-z0-9\-\/]+)\s+(\d+\.\d+)\s+(\d+\.\d+)\s+(\d+\.\d+)\s+(\d+\.\d+)\s+(\d+\.\d+)\s+(\d+\.\d+)\s+(\d+\.\d+)\s+(\d+\.\d+)\s+(\d+\.\d+)\s+(\d+\.\d+)\s+(\d+\.\d+)\s+(\d+\.\d+)\s+(\d+\.\d+)/;
Hrm. I really should optimise that into using repeating groups!
And then altering the $stats assignment below it, so that rkB/s and everything else past it gets bumped up two places - e.g.
$stats{"$base_oid.7.$devices"} = $8; # rkB/s
$stats{"$base_oid.8.$devices"} = $9; # wkB/s
$stats{"$base_oid.9.$devices"} = $10; # avgrq-sz
$stats{"$base_oid.10.$devices"} = $11; # avgqu-sz
$stats{"$base_oid.11.$devices"} = $12; # await
$stats{"$base_oid.12.$devices"} = $13; # svctm
$stats{"$base_oid.13.$devices"} = $14; # %util
Does that help ?
Tuesday, June 16. 2009 at 18:09 (Reply)
Thanks for the help. I tried to add the regex and stats for the additional columns but the queries still report no SNMP Data reported. The iostat command does seem to be returning valid results.
Any other hints as to why its not working.
Thanks very much.
Sunday, June 21. 2009 at 19:26 (Reply)
I have a question though : Cacti is basically probing every 5 minutes and your "iostat.pl" script runs every minute, why not running it every five minutes to have a more "average" value?
Regards,
Tuesday, June 23. 2009 at 15:45 (Reply)
But yes, you are right, you could easily modify it to run every 5 minutes, and sample data for, say, 285 seconds to allow for 15 seconds gap before the next process kicks off.
Tuesday, June 23. 2009 at 15:35 (Reply)
I like the script alot. However, all the graphs that contain read info. Display read as 0.
Any updates on that ?
Thanks
Friday, July 10. 2009 at 04:32 (Reply)
+ Running data query [10].
+ Found type = '3' [snmp query].
+ Found data query XML file at '/opt/csw/apache2/share/htdocs/cacti-0.8.7d/resource/snmp_queries/iostat-solaris.xml'
+ XML file parsed ok.
+ Executing SNMP walk for list of indexes @ '.1.3.6.1.3.1'
+ No SNMP data returned
+ Found data query XML file at '/opt/csw/apache2/share/htdocs/cacti-0.8.7d/resource/snmp_queries/iostat-solaris.xml'
+ Found data query XML file at '/opt/csw/apache2/share/htdocs/cacti-0.8.7d/resource/snmp_queries/iostat-solaris.xml'
+ Found data query XML file at '/opt/csw/apache2/share/htdocs/cacti-0.8.7d/resource/snmp_queries/iostat-solaris.xml
while from the caci host, on the command line,
bash-3.00# /usr/sfw/bin/snmpwalk -v2c -c public krakon.central.sun.com .1.3.6.1.3.1
SNMPv2-SMI::experimental.1.1.1 = INTEGER: 1
SNMPv2-SMI::experimental.1.1.2 = INTEGER: 2
...
...
(ending after a while with a)
SNMPv2-SMI::experimental.1.11.8 = STRING: "0"
SNMPv2-SMI::experimental.1.11.9 = STRING: "0"
SNMPv2-SMI::experimental.1.11.10 = STRING: "0"
Timeout: No Response from krakon.central.sun.com
I'm assuming that the ending with a timeout is OK.
any tips on where to take troubleshooting next?
Friday, July 10. 2009 at 15:04 (Reply)
What about if you use SNMP v1 ?
Friday, July 10. 2009 at 17:47 (Reply)
bash-3.00# /usr/sfw/bin/snmpwalk -v2c -c public krakon.central.sun.com .1.3.6.1.3.1
it comes back quickly, with a LARGE amount of data... (the elipses ... ... is the excluded content, up to my comment of ending after a while and the last few lines).
The test you have requested returns (quickly)
bash-3.00# /usr/sfw/bin/snmpwalk -v2c -c public krakon.central.sun.com .1.3.6.1.3.1.2
SNMPv2-SMI::experimental.1.2.1 = STRING: "sd0"
SNMPv2-SMI::experimental.1.2.2 = STRING: "sd3"
SNMPv2-SMI::experimental.1.2.3 = STRING: "nfs1"
SNMPv2-SMI::experimental.1.2.4 = STRING: "nfs2"
SNMPv2-SMI::experimental.1.2.5 = STRING: "nfs3"
SNMPv2-SMI::experimental.1.2.6 = STRING: "nfs8"
SNMPv2-SMI::experimental.1.2.7 = STRING: "nfs12"
SNMPv2-SMI::experimental.1.2.8 = STRING: "nfs13"
SNMPv2-SMI::experimental.1.2.9 = STRING: "nfs27"
SNMPv2-SMI::experimental.1.2.10 = STRING: "nfs28"
I'm concerned about the pass line of using the perl command line via the snmpd.conf. Can you go into the requirements you have "met" in your perl install to support this?
This line from the snmpd.conf
pass .1.3.6.1.3.1 /opt/csw/bin/perl /opt/bots/bin/iostat.pl
at the same time, attempting to the host from cacti
+ Running data query [10].
+ Found type = '3' [snmp query].
+ Found data query XML file at '/opt/csw/apache2/share/htdocs/cacti-0.8.7d/resource/snmp_queries/iostat-solaris.xml'
+ XML file parsed ok.
+ Executing SNMP walk for list of indexes @ '.1.3.6.1.3.1'
+ No SNMP data returned
+ Found data query XML file at '/opt/csw/apache2/share/htdocs/cacti-0.8.7d/resource/snmp_queries/iostat-solaris.xml'
+ Found data query XML file at '/opt/csw/apache2/share/htdocs/cacti-0.8.7d/resource/snmp_queries/iostat-solaris.xml'
+ Found data query XML file at '/opt/csw/apache2/share/htdocs/cacti-0.8.7d/resource/snmp_queries/iostat-solaris.xml'
Friday, July 10. 2009 at 17:53 (Reply)
Friday, July 17. 2009 at 04:45 (Reply)
Thursday, July 30. 2009 at 12:40 (Reply)
Solved the problem by commenting out the "dlmod seaProxy" and "dlmod seaExtensions" in snmpd.conf.
The problem was that these did not load due some errors, and it did not seem to affect anything except this. So check you snmpd.log for errors and and fix them if you have any. Hope it helps.
Tuesday, August 11. 2009 at 05:49 (Reply)
Tuesday, August 11. 2009 at 07:03 (Reply)
Friday, August 27. 2010 at 10:36 (Reply)
+ Executing SNMP walk for list of indexes @ '.1.3.6.1.3.1'
+ No SNMP data returned
time snmpwalk -v 2c -c hidden 10.248.45.138 .1.3.6.1.3.1
This took +23seconds (realy slow). But worse ends with:
SNMPv2-SMI::experimental.1.11.15 = STRING: "0"
Timeout: No Response from 10.248.45.138
*there is no 1.11.16 so way timeout?
I gues the net-snmp in Solaris 10 (snmp=v5.0.9) is much better then UCD-SNMP but still crappy.
The same walk against a linux systems takes 2seconds.
Everytime i did the above query there were also six lines in /var/log/snmpd.log stateing:
seaproxy_sendReq: SEA Master Agent not responding
Thanks Gabriel you made my day. The timeout went away by removing the dlmods from snmpd.conf
It´s stil slow but we realy need performance information ons disks these days since the are most of the time a bottleneck.
Monday, August 3. 2009 at 12:33 (Reply)
I'm not sure but I think there are still some errors in iostat.xml:
ioDescr:ioName:ioIndex should be ioDescr:ioIndex because there is no ioName
and should be .1.3.6.1.3.1.1
Wednesday, August 26. 2009 at 22:25 (Link) (Reply)
# iostat.pl
SO : linux
Fetching oid :
My iostat.cache was correctly generated... I'm using RHEL 5.3... any ideas? :/
Monday, September 21. 2009 at 17:07 (Link) (Reply)
Thursday, October 8. 2009 at 13:39 (Reply)
iostat - Bytes/sec
iostat - Queue size
iostat - Request size
iostat - Requests/sec
iostat - Times
iostat - Utilisation
Thursday, October 8. 2009 at 16:33 (Reply)
The output differs depending on a huge number of factors such as the spec of the system, what kind of drive or RAID array is being graphed, what the load is, what the interconnect is...
As a rough rule of thumb though, you're probably wanting to check the requests/s - once the IOPS start to go beyond what your drive or array can provide, then you'll see the service and wait times increase, and therefore the queue size. This is bad - but again, there's no definitive answer.
What's considered "bad" latency for one user with a honking great FC array may be totally acceptable for another user with a single SATA drive.
Friday, October 23. 2009 at 13:48 (Reply)
snmpwalk -v2c -c mistral localhost .1.3.6.1.3.1
SNMPv2-SMI::experimental.1 = No Such Instance currently exists at this OID
all the servers are RHEL 5.4 64bit, NET-SNMP version: 5.3.2.2
I know you say the OID is experimental but i don't understand about changing it
Friday, October 30. 2009 at 18:52 (Reply)
It would be great if this would graph iowait percentages as well. I suppose I could add this functionality myself, but hey, it's your script
Monday, November 16. 2009 at 21:42 (Link) (Reply)
Tuesday, November 17. 2009 at 19:09 (Reply)
There are other cacti templates that provide this information - one of the CPU utilisation graphs definitely does. Can't remember off-hand which one, though as I'm not logged into work right now.
The problem is that on modern multi-core, multi-cpu systems, iowait has become largely meaningless. Sun even removed it from the output of vmstat starting in Solaris 10; it now just returns 0s.
You're probably far better off using the output from vmstat and iostat to identify if you have an IO bottleneck...
-Mark
Saturday, November 7. 2009 at 11:43 (Reply)
you cant use pass in the net-snmp config file when using net-snmp 5.4
Regards
Jocke W
Tuesday, November 17. 2009 at 15:48 (Link) (Reply)
I was just searching for ways to graph disk utilisation in Cacti today and saw your name in the Google results. Interestingly, your blog only came up when I spelled "utilisation" correctly.
This is brilliant work and it worked flawlessly in the setup we have here. (Cacti is installed under /usr/share/cacti/ on CentOS too.)
Thanks for sharing your work,
Dave.
Tuesday, November 17. 2009 at 19:12 (Reply)
Good to hear from you again - I'll be dropping you a line over Facebook or Email soon
Wednesday, November 18. 2009 at 16:21 (Reply)
when do you prognoses FreeBSD patch will be available for download ?
It is important question for me now, and your`s script seems to be best one among what i saw.
Wednesday, November 18. 2009 at 20:07 (Reply)
I haven't had a chance to merge them cleanly into the main distribution, but hope this helps!
Thursday, November 19. 2009 at 18:16 (Reply)
Got a problem mentioned here several times:
+ XML file parsed ok.
+ Executing SNMP walk for list of indexes @ '.1.3.6.1.3.1'
+ No SNMP data returned
does anybody now have a clue ? or any ideas how to figure out this ?
I`m stuck...
Wednesday, January 6. 2010 at 15:56 (Reply)
Monday, January 11. 2010 at 18:56 (Reply)
+ No SNMP data returned
Monday, January 11. 2010 at 21:36 (Reply)
+ No SNMP data returned
when adding data querys, i had to set the snmp timeout from 400ms to 10000ms. my host was returning snmpwalk data but very slowly. once i set it to a timeout of 10,000ms cacti can now get the data and add the query!
Saturday, January 26. 2013 at 01:32 (Link) (Reply)
This solved it for me. It should be noted in the README imho
Saturday, January 16. 2010 at 10:19 (Reply)
Thanks a lot
Saturday, February 13. 2010 at 01:01 (Reply)
I'm running latest cacti 0.8.7a and I can't import any of the templates. Ideas?
Wednesday, March 10. 2010 at 17:05 (Link) (Reply)
These templates were exported from 0.8.7b (or later depending on which OS you are using).
The current version is 0.8.7e. Try upgrading.
Wednesday, March 10. 2010 at 17:14 (Link) (Reply)
http://code.google.com/p/mysql-cacti-templates/
They have some similar IOStat graphs to these ones along with graphs for Apache, Memcached, Nginx and a set of absolutely brilliant MySQL graphs.
Tuesday, June 29. 2010 at 07:16 (Reply)
Thanks for creating these templates. I'm running Cacti 0.8.7b on CentOS release 5.3. I was able to import the Linux templates, but not the Solaris template. Is it simply a matter of the version like the README says?
Regards,
Edward
Thursday, July 1. 2010 at 19:23 (Reply)
I sent you a comment regarding the solaris template a few days ago. I ended up creating my own templates. I'd like to thank you though for creating the xml and iostat.pl. I ended up having to tweak them a bit, but the core remains in tact.
I also ended up writing a couple of scripts to report on a per volume basis; having several hundred solaris devices didn't seem realistic.
Thanks again,
Edward
Saturday, July 3. 2010 at 01:19 (Link) (Reply)
+ Running data query [11].
+ Found type = '3' [snmp query].
+ Found data query XML file at '/var/www/cacti/resource/snmp_queries/iostat.xml'
+ XML file parsed ok.
+ Executing SNMP walk for list of indexes @ '.1.3.6.1.3.1'
+ No SNMP data returned
snmpwalk returns:
SNMPv2-SMI::experimental.1 = No Such Instance currently exists at this OID
iostat.pl seems to run and I have output in /tmp/iostat.cache
any ideas how to get this to work?
Monday, August 2. 2010 at 10:26 (Reply)
Thanks!
Wednesday, August 25. 2010 at 00:50 (Reply)
my other graphs are working/updating.
I am attempting to graph disc I/O for a remote Solaris box.
The crontab and snmp/sma configuration on the remote server was straightforward.
I confirmed disc data is being returned by snmpwalk: I ran snmpwalk on the local cacti server and a listing of the misc disc was returned.
I imported the template for solaris, copied the solaris-iostat.xml file as indicated in the instrctions.
In my admin console I see:
Data Templates:
Solaris - Disk - IOs
Solaris - Disk - Queue
Solaris - Disk - Throughput
Solaris - Disk - Times
Solaris - Disk - Utilisation
Graph Templates
Solaris - Disk - IOs
Solaris - Disk - Queues
Solaris - Disk - Throughput
Solaris - Disk - Times
Solaris - Disk - Utilisation
When I click on New Graphs and select the host I want to add the graph for, the drop down in the Graph Templates section does not contain any of the Graph Templates listed above (Solaris - Disk - IOs, Solaris - Disk - Queues, etc)
Usually I create the graphs for a host and the Data Queries are generated at the same time, automatically.
In addition, I don't understand where or how I specify which disc I'm interested in -- there are 5 on the particular server I'm looking at.
Further:
I imported the other templates and snmp_queries xml files from the linux directory, thinking that the solaris configs had some dependancy.
This did not fix the problem.
P.S. Thanks for all your work.
Thursday, September 23. 2010 at 20:04 (Reply)
pass_persist .1.3.6.1.3.1 /usr/bin/perl /usr/local/bin/iostat-persist.pl
http://pastie.org/1177312
Thursday, September 23. 2010 at 22:51 (Reply)
Thursday, September 23. 2010 at 23:29 (Reply)
Thursday, November 4. 2010 at 12:09 (Reply)
thanks for your nice work! I have installed the files and templates according to your readme file, but now I experience the same problem like some other people: after adding the new data queries to my device, the queries show 0 items and rows. Verbose query says:
+ Running data query [13].
+ Found type = '3' [snmp query].
+ Found data query XML file at '/srv/www/htdocs/cacti/resource/snmp_queries/iostat.xml'
+ XML file parsed ok.
+ Executing SNMP walk for list of indexes @ '.1.3.6.1.3.1'
+ No SNMP data returned
+ Found data query XML file at '/srv/www/htdocs/cacti/resource/snmp_queries/iostat.xml'
+ Found data query XML file at '/srv/www/htdocs/cacti/resource/snmp_queries/iostat.xml'
+ Found data query XML file at '/srv/www/htdocs/cacti/resource/snmp_queries/iostat.xml'
My iostat.cache looks like:
Linux 2.6.16.60-0.60.1-bigsmp (isam-fs2) 11/04/10
Device: rrqm/s wrqm/s r/s w/s rkB/s wkB/s avgrq-sz avgqu-sz await svctm %util
sda 0.28 17.92 2.61 10.75 37.17 118.04 23.24 0.06 4.32 0.54 0.71
sdb 3.28 3.29 2.84 1.58 24.54 19.95 20.13 0.06 13.05 1.06 0.47
dm-0 0.00 0.00 6.14 4.99 24.54 19.95 8.00 0.15 13.56 0.42 0.47
dm-1 0.00 0.00 6.14 4.99 24.54 19.95 8.00 0.15 13.56 0.42 0.47
dm-2 0.00 0.00 6.14 4.99 24.54 19.95 8.00 0.15 13.56 0.42 0.47
Device: rrqm/s wrqm/s r/s w/s rkB/s wkB/s avgrq-sz avgqu-sz await svctm %util
sda 0.00 16.73 0.43 8.50 1.73 102.10 23.25 0.05 5.84 0.37 0.33
sdb 0.03 2.67 0.27 3.73 1.20 25.59 13.40 0.02 5.57 0.87 0.35
dm-0 0.00 0.00 0.30 6.40 1.20 25.59 8.00 0.03 4.04 0.52 0.35
dm-1 0.00 0.00 0.30 6.40 1.20 25.59 8.00 0.03 4.04 0.52 0.35
dm-2 0.00 0.00 0.30 6.40 1.20 25.59 8.00 0.03 4.04 0.52 0.35
And requesting the data from the cacti server via snmpwalk looks good in my opinion:
# snmpwalk -v1 -c public 192.168.250.22 .1.3.6.1.3.1
SNMPv2-SMI::experimental.1.1.1 = INTEGER: 1
SNMPv2-SMI::experimental.1.1.2 = INTEGER: 2
SNMPv2-SMI::experimental.1.1.3 = INTEGER: 3
SNMPv2-SMI::experimental.1.1.4 = INTEGER: 4
SNMPv2-SMI::experimental.1.1.5 = INTEGER: 5
SNMPv2-SMI::experimental.1.2.1 = STRING: "sda"
SNMPv2-SMI::experimental.1.2.2 = STRING: "sdb"
SNMPv2-SMI::experimental.1.2.3 = STRING: "dm-0"
SNMPv2-SMI::experimental.1.2.4 = STRING: "dm-1"
SNMPv2-SMI::experimental.1.2.5 = STRING: "dm-2"
SNMPv2-SMI::experimental.1.3.1 = STRING: "0.00"
SNMPv2-SMI::experimental.1.3.2 = STRING: "0.03"
...
...
SNMPv2-SMI::experimental.1.13.3 = STRING: "0.35"
SNMPv2-SMI::experimental.1.13.4 = STRING: "0.35"
SNMPv2-SMI::experimental.1.13.5 = STRING: "0.35"
End of MIB
So what can be the reason for cacti telling me that no data is available? How can I find out what's wrong?
Thanks!
Thursday, November 4. 2010 at 19:59 (Reply)
Friday, November 5. 2010 at 08:21 (Reply)
And yes, I am using the persistent script (on the target machine, not the cacti server). Because snmpwalk delivers the correct values (called locally or on the cacti server), I guess it's no problem with the script.
Friday, November 5. 2010 at 00:31 (Reply)
My question is more of an iostat related one; why isn't TPS graphed? It seems I could get the number by adding the r/s and w/s which is part of Request/Sec graph.. but why are the global r/s including queued read/write requests more valuable to graph than general TPS? Am I missing something that shows IOPS? I understand it's not necessarily a wonderful stat in all cases as the size of the request can vary but it's good for rough comparing different storage systems/configurations 1:1 I think?
Wednesday, November 10. 2010 at 12:29 (Reply)
However I can't help thinking it would be better to expose the counters from /proc/diskstats directly, instead of getting iostat to average values over 30 seconds.
The manager (e.g. cacti) could then poll at whatever interval it liked, and work out blocks/sec or bytes/sec for itself, just as it does for network interfaces.
See www.kernel.org/doc/Documentation/iostats.txt
Wednesday, November 10. 2010 at 13:05 (Reply)
Wednesday, November 10. 2010 at 12:43 (Reply)
$ snmptable -v2c -c public localhost .1.3.6.1.4.1.2021.13.15.1
Friday, December 3. 2010 at 11:39 (Reply)
Although I picked up one small problem...
It seems like the iostat-solaris.pl script is not returnig the correct value for %b. The value returned seems to be 10% of what it ought to be.
The snmpwalk returns
snmpwalk -v 1 -c public myserver .1.3.6.1.3.1.11
SNMPv2-SMI::experimental.1.11.1 = STRING: "0"
SNMPv2-SMI::experimental.1.11.2 = STRING: "0"
SNMPv2-SMI::experimental.1.11.3 = STRING: "0"
SNMPv2-SMI::experimental.1.11.4 = STRING: "4"
SNMPv2-SMI::experimental.1.11.5 = STRING: "5"
SNMPv2-SMI::experimental.1.11.6 = STRING: "4"
SNMPv2-SMI::experimental.1.11.7 = STRING: "5"
SNMPv2-SMI::experimental.1.11.8 = STRING: "5"
SNMPv2-SMI::experimental.1.11.9 = STRING: "5"
SNMPv2-SMI::experimental.1.11.10 = STRING: "4"
SNMPv2-SMI::experimental.1.11.11 = STRING: "5"
SNMPv2-SMI::experimental.1.11.12 = STRING: "4"
SNMPv2-SMI::experimental.1.11.13 = STRING: "5"
SNMPv2-SMI::experimental.1.11.14 = STRING: "4"
SNMPv2-SMI::experimental.1.11.15 = STRING: "5"
SNMPv2-SMI::experimental.1.11.16 = STRING: "4"
SNMPv2-SMI::experimental.1.11.17 = STRING: "4"
While IO stat returns
iostat -bx 10
device r/s w/s kr/s kw/s wait actv svc_t %w %b
sd0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0 0
sd1 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0 0
sd2 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0 0
sd3 1.5 584.6 96.1 1406.0 0.0 13.8 23.6 1 42
sd4 1.1 666.9 70.5 1302.0 0.0 14.1 21.1 1 43
sd5 1.4 584.3 89.7 1411.3 0.0 12.4 21.2 1 37
sd6 1.5 670.6 96.1 1310.3 0.0 13.9 20.7 1 43
sd7 2.3 586.9 147.4 1410.0 0.0 12.5 21.3 1 38
sd8 1.8 670.2 115.4 1300.8 0.0 14.3 21.2 1 44
sd9 2.1 587.6 134.6 1409.6 0.0 12.6 21.3 1 38
sd10 1.5 672.1 96.1 1303.3 0.0 14.4 21.3 1 45
sd11 1.7 588.3 109.0 1408.1 0.0 11.9 20.2 1 37
sd12 1.8 675.6 115.4 1297.0 0.0 14.3 21.2 1 44
sd13 2.1 591.5 134.6 1403.5 0.0 12.1 20.3 1 37
sd14 1.7 672.5 109.0 1298.4 0.0 14.6 21.6 1 45
sd15 1.8 585.8 115.4 1401.8 0.0 12.1 20.7 1 37
sd16 1.7 667.1 109.0 1298.0 0.0 14.4 21.6 1 43
Unfortunately I'm no scripting guru and still new to snmp, so I'm battling a bit to find the problem
Monday, February 7. 2011 at 21:23 (Reply)
The solaris section of the perl script that ends: (\d)\s+(\d)
That should have a "+" after the "d"'s
Friday, December 17. 2010 at 00:26 (Link) (Reply)
From:
root cd /tmp && iostat -xkd 30 2 | sed 's/,/\./g' > io.tmp && mv io.tmp iostat.cache
To:
root cd /tmp && iostat -xkd 30 2 | sed 's/,/\./g' > io.tmp && chcon system_u:object_r:snmpd_var_lib_t /tmp/io.tmp && mv -f io.tmp iostat.cache
Notice the additional chcon. It is not perfect, but far better than disabling selinux.
Friday, December 31. 2010 at 23:14 (Link) (Reply)
For example, my Cacti log shows this error:
12/31/2010 03:40:01 PM - SPINE: Poller[0] Host[1] ERROR: Problems parsing Multi SNMP OID! (oid: ), Set MAX_OIDS to 1 for this host to isolate bad OID
...
...
12/31/2010 03:40:01 PM - SPINE: Poller[0] Host[1] TH[1] DS[23] SNMP: v1: tcp:127.0.0.1, dsname: iostat_writes, oid: , value: U
As you can see Cacti doesn't have an OID for iostat_writes (like not the others either).
I followed all the steps in the README file for importing templates and setting up the data queries, and getting everything associated with the host, and seeing a verbose query on the iostat data query return full SNMP data, the error persists. I think there is some kind of problem with the XML code for this template. I also noticed other strangeness such as not being able to associate the iostat graphs with the host (they do not show up in the list of available graphs for the host). I can create iostat graphs from the Graph Management area though.
To verify its the OID issue with iostat fields, I set MAX_OID to 1. After the next polling cycle I saw:
12/31/2010 04:45:01 PM - SPINE: Poller[0] Host[1] TH[1] DS[23] SNMP: v1: tcp:127.0.0.1, dsname: iostat_writes, oid: , value: U
12/31/2010 04:45:01 PM - SPINE: Poller[0] Host[1] ERROR: Problems parsing Multi SNMP OID! (oid: ), Set MAX_OIDS to 1 for this host to isolate bad OID
with no separation between the two messages; previously the error showed up after a whole group of snmp requests, so I wasn't sure itw as iostat_writes that was the problem, but this confirms it.
So, how do I debug this? How can I edit the template to properly associate the OIDs for the various iostat queries? I'm guessing that iostat_writes is just the first one that Cacti is trying it fails there, so it doesn't even try the others (such as iostat_rkbs etc.). I would have thought it would try and fail on them all though. Is it possible the template XML is broken in a way that only imports some of the snmp queries? I noticed that when I imported the data query templates, I had to manually go into each one and update the XML path field; the < and > characters are stripped out by PHP somewhere, so on first import the data queries have an XML path of:
path_cacti/resource/snmp_queries/iostat.xml
I had to manually edit (in the Cacti web GUI) to be:
/resource/snmp_queries/iostat.xml
When I look at iostat I/O data template I can see all 11 tabs, everything seems to be filled in. There is no OID specification anywhere though, I don't understand how the linkage is made from this data template to the OID values for things like iostat_writes.
Also, when I look at the actual data query XML files I an see that each data query is referring to the right SNMP field; for example, in the kbytessec query I can see the referneces to snmp_field_name ioReadKbytes and ioWriteKBytes. So the XML looks ok, but still the OIDs are not being assigned in Cacti.
If it helps any, I've included the verbose query output:
Data Query Debug Information
+ Running data query [15].
+ Found type = '3' [snmp query].
+ Found data query XML file at '/home/cacti/cacti-0.8.7g/resource/snmp_queries/iostat.xml'
+ XML file parsed ok.
+ Executing SNMP walk for list of indexes @ '.1.3.6.1.3.1'
+ Index found at OID: '1.3.6.1.3.1.1.1' value: '1'
+ Index found at OID: '1.3.6.1.3.1.1.2' value: '2'
+ Index found at OID: '1.3.6.1.3.1.1.3' value: '3'
+ Index found at OID: '1.3.6.1.3.1.1.4' value: '4'
+ Index found at OID: '1.3.6.1.3.1.1.5' value: '5'
+ Index found at OID: '1.3.6.1.3.1.1.6' value: '6'
+ Index found at OID: '1.3.6.1.3.1.2.1' value: 'sda'
+ Index found at OID: '1.3.6.1.3.1.2.2' value: 'sda1'
+ Index found at OID: '1.3.6.1.3.1.2.3' value: 'sda2'
+ Index found at OID: '1.3.6.1.3.1.2.4' value: 'sda3'
+ Index found at OID: '1.3.6.1.3.1.2.5' value: 'sdb'
+ Index found at OID: '1.3.6.1.3.1.2.6' value: 'sdb1'
+ Index found at OID: '1.3.6.1.3.1.3.1' value: '0.00'
+ Index found at OID: '1.3.6.1.3.1.3.2' value: '0.00'
+ Index found at OID: '1.3.6.1.3.1.3.3' value: '0.00'
+ Index found at OID: '1.3.6.1.3.1.3.4' value: '0.00'
+ Index found at OID: '1.3.6.1.3.1.3.5' value: '0.00'
+ Index found at OID: '1.3.6.1.3.1.3.6' value: '0.00'
+ Index found at OID: '1.3.6.1.3.1.4.1' value: '39.21'
+ Index found at OID: '1.3.6.1.3.1.4.2' value: '0.00'
+ Index found at OID: '1.3.6.1.3.1.4.3' value: '0.00'
+ Index found at OID: '1.3.6.1.3.1.4.4' value: '39.21'
+ Index found at OID: '1.3.6.1.3.1.4.5' value: '0.00'
+ Index found at OID: '1.3.6.1.3.1.4.6' value: '0.00'
+ Index found at OID: '1.3.6.1.3.1.5.1' value: '0.27'
+ Index found at OID: '1.3.6.1.3.1.5.2' value: '0.00'
+ Index found at OID: '1.3.6.1.3.1.5.3' value: '0.00'
+ Index found at OID: '1.3.6.1.3.1.5.4' value: '0.27'
+ Index found at OID: '1.3.6.1.3.1.5.5' value: '0.00'
+ Index found at OID: '1.3.6.1.3.1.5.6' value: '0.00'
+ Index found at OID: '1.3.6.1.3.1.6.1' value: '8.07'
+ Index found at OID: '1.3.6.1.3.1.6.2' value: '0.00'
+ Index found at OID: '1.3.6.1.3.1.6.3' value: '0.00'
+ Index found at OID: '1.3.6.1.3.1.6.4' value: '8.07'
+ Index found at OID: '1.3.6.1.3.1.6.5' value: '0.00'
+ Index found at OID: '1.3.6.1.3.1.6.6' value: '0.00'
+ Index found at OID: '1.3.6.1.3.1.7.1' value: '1.07'
+ Index found at OID: '1.3.6.1.3.1.7.2' value: '0.00'
+ Index found at OID: '1.3.6.1.3.1.7.3' value: '0.00'
+ Index found at OID: '1.3.6.1.3.1.7.4' value: '1.07'
+ Index found at OID: '1.3.6.1.3.1.7.5' value: '0.00'
+ Index found at OID: '1.3.6.1.3.1.7.6' value: '0.00'
+ Index found at OID: '1.3.6.1.3.1.8.1' value: '189.13'
+ Index found at OID: '1.3.6.1.3.1.8.2' value: '0.00'
+ Index found at OID: '1.3.6.1.3.1.8.3' value: '0.00'
+ Index found at OID: '1.3.6.1.3.1.8.4' value: '189.13'
+ Index found at OID: '1.3.6.1.3.1.8.5' value: '0.00'
+ Index found at OID: '1.3.6.1.3.1.8.6' value: '0.00'
+ Index found at OID: '1.3.6.1.3.1.9.1' value: '45.63'
+ Index found at OID: '1.3.6.1.3.1.9.2' value: '0.00'
+ Index found at OID: '1.3.6.1.3.1.9.3' value: '0.00'
+ Index found at OID: '1.3.6.1.3.1.9.4' value: '45.63'
+ Index found at OID: '1.3.6.1.3.1.9.5' value: '0.00'
+ Index found at OID: '1.3.6.1.3.1.9.6' value: '0.00'
+ Index found at OID: '1.3.6.1.3.1.10.1' value: '0.04'
+ Index found at OID: '1.3.6.1.3.1.10.2' value: '0.00'
+ Index found at OID: '1.3.6.1.3.1.10.3' value: '0.00'
+ Index found at OID: '1.3.6.1.3.1.10.4' value: '0.04'
+ Index found at OID: '1.3.6.1.3.1.10.5' value: '0.00'
+ Index found at OID: '1.3.6.1.3.1.10.6' value: '0.00'
+ Index found at OID: '1.3.6.1.3.1.11.1' value: '4.94'
+ Index found at OID: '1.3.6.1.3.1.11.2' value: '0.00'
+ Index found at OID: '1.3.6.1.3.1.11.3' value: '0.00'
+ Index found at OID: '1.3.6.1.3.1.11.4' value: '4.94'
+ Index found at OID: '1.3.6.1.3.1.11.5' value: '0.00'
+ Index found at OID: '1.3.6.1.3.1.11.6' value: '0.00'
+ Index found at OID: '1.3.6.1.3.1.12.1' value: '0.57'
+ Index found at OID: '1.3.6.1.3.1.12.2' value: '0.00'
+ Index found at OID: '1.3.6.1.3.1.12.3' value: '0.00'
+ Index found at OID: '1.3.6.1.3.1.12.4' value: '0.57'
+ Index found at OID: '1.3.6.1.3.1.12.5' value: '0.00'
+ Index found at OID: '1.3.6.1.3.1.12.6' value: '0.00'
+ Index found at OID: '1.3.6.1.3.1.13.1' value: '0.48'
+ Index found at OID: '1.3.6.1.3.1.13.2' value: '0.00'
+ Index found at OID: '1.3.6.1.3.1.13.3' value: '0.00'
+ Index found at OID: '1.3.6.1.3.1.13.4' value: '0.48'
+ Index found at OID: '1.3.6.1.3.1.13.5' value: '0.00'
+ Index found at OID: '1.3.6.1.3.1.13.6' value: '0.00'
+ Located input field 'ioIndex' [walk]
+ Executing SNMP walk for data @ '.1.3.6.1.3.1.1'
+ Found item [ioIndex='1'] index: 1 [from value]
+ Found item [ioIndex='2'] index: 2 [from value]
+ Found item [ioIndex='3'] index: 3 [from value]
+ Found item [ioIndex='4'] index: 4 [from value]
+ Found item [ioIndex='5'] index: 5 [from value]
+ Found item [ioIndex='6'] index: 6 [from value]
+ Located input field 'ioDescr' [walk]
+ Executing SNMP walk for data @ '.1.3.6.1.3.1.2'
+ Found item [ioDescr='sda'] index: 1 [from value]
+ Found item [ioDescr='sda1'] index: 2 [from value]
+ Found item [ioDescr='sda2'] index: 3 [from value]
+ Found item [ioDescr='sda3'] index: 4 [from value]
+ Found item [ioDescr='sdb'] index: 5 [from value]
+ Found item [ioDescr='sdb1'] index: 6 [from value]
+ Found data query XML file at '/home/cacti/cacti-0.8.7g/resource/snmp_queries/iostat.xml'
+ Found data query XML file at '/home/cacti/cacti-0.8.7g/resource/snmp_queries/iostat.xml'
+ Found data query XML file at '/home/cacti/cacti-0.8.7g/resource/snmp_queries/iostat.xml'
Wednesday, March 9. 2011 at 22:32 (Link) (Reply)
Friday, April 1. 2011 at 19:29 (Reply)
Friday, April 15. 2011 at 09:56 (Reply)
Wednesday, April 20. 2011 at 23:47 (Reply)
Friday, April 22. 2011 at 20:54 (Link) (Reply)
Looking through the cacti log I don't see any information for the oid .1.3.6.1.3.1.2 Any ideas?
Thursday, April 28. 2011 at 22:36 (Reply)
Did you walk the OID directly?
Did you add the config in the snmp config?
Sunday, June 26. 2011 at 10:04 (Link) (Reply)
Thanks for your fantastic work. I have an issue about no snmp data returns.
My /tmp/iostat.cache file is :
Linux 2.6.18-194.el5 (n3.db.l99.com) 06/26/11 x86_64 (24 CPU)
Device: rrqm/s wrqm/s r/s w/s rkB/s wkB/s avgrq-sz avgqu-sz await svctm %util
cciss/c0d0 0.08 7.67 0.36 2.41 18.93 51.64 50.87 0.00 0.64 0.25 0.07
dm-0 0.00 0.00 0.44 10.08 18.93 51.64 13.42 0.01 1.09 0.06 0.07
dm-1 0.00 0.00 0.00 0.00 0.00 0.00 8.00 0.00 4.13 0.33 0.00
Device: rrqm/s wrqm/s r/s w/s rkB/s wkB/s avgrq-sz avgqu-sz await svctm %util
cciss/c0d0 0.00 0.90 0.00 1.10 0.00 8.00 14.55 0.00 0.36 0.03 0.00
dm-0 0.00 0.00 0.00 2.00 0.00 8.00 8.00 0.00 0.25 0.02 0.00
dm-1 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
And disabled SELinux , returns when I use snmpwalk command (.1.3.6.1.3.1.2) is below:
SNMPv2-SMI::experimental.1.2.1 = STRING: "cciss/c0d0"
SNMPv2-SMI::experimental.1.2.2 = STRING: "dm-0"
SNMPv2-SMI::experimental.1.2.3 = STRING: "dm-1"
When I add query to my device in Cacti 0.8.7g, I get these debug infos:
+ Running data query [20].
+ Found type = '3' [snmp query].
+ Found data query XML file at '/usr/local/cacti/resource/snmp_queries/iostat.xml'
+ XML file parsed ok.
+ Executing SNMP walk for list of indexes @ '.1.3.6.1.3.1'
+ No SNMP data returned
+ Found data query XML file at '/usr/local/cacti/resource/snmp_queries/iostat.xml'
+ Found data query XML file at '/usr/local/cacti/resource/snmp_queries/iostat.xml'
+ Found data query XML file at '/usr/local/cacti/resource/snmp_queries/iostat.xml'
I'm stuck , plz help me get out of this. Thanks a lot.
Tuesday, August 9. 2011 at 08:28 (Reply)
for i in /path/to/Cacti-iostat-templates/templates/linux/cacti_*.xml
do
php ./import_template.php -filename=$i
done
Sunday, August 28. 2011 at 16:09 (Reply)
You may have already noticed, but in case you didn't....
I've forked your code on GitHub and made a few mods, mainly to suit my own purposes.
regards,
Darren
Wednesday, October 12. 2011 at 17:55 (Reply)
Device: rrqm/s wrqm/s r/s w/s rkB/s wkB/s avgrq-sz avgqu-sz await svctm %util
sda 0.51 95.76 3.71 24.35 122.43 480.47 42.96 0.06 2.28 0.43 1.21
sda1 0.00 0.00 0.00 0.00 0.00 0.00 12.45 0.00 6.39 6.21 0.00
sda2 0.51 95.76 3.71 24.35 122.43 480.47 42.96 0.06 2.28 0.43 1.21
sda3 0.00 0.00 0.00 0.00 0.00 0.00 53.71 0.00 4.60 4.07 0.00
Device: rrqm/s wrqm/s r/s w/s rkB/s wkB/s avgrq-sz avgqu-sz await svctm %util
sda 0.20 72.30 1.03 29.07 38.80 405.47 29.52 0.03 1.06 0.30 0.89
sda1 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
sda2 0.20 72.30 1.03 29.07 38.80 405.47 29.52 0.03 1.06 0.30 0.89
sda3 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
iostat.cache on a broken machine:
Device: rrqm/s wrqm/s r/s w/s rkB/s wkB/s avgrq-sz avgqu-sz await svctm %util
sda 0.10 8.49 0.46 1.42 11.11 39.61 54.10 0.02 8.52 0.33 0.06
sda1 0.00 0.00 0.00 0.00 0.00 0.00 23.25 0.00 2.74 1.80 0.00
sda2 0.09 8.49 0.46 1.42 11.10 39.61 54.10 0.02 8.52 0.33 0.06
sda3 0.00 0.00 0.00 0.00 0.00 0.00 48.97 0.00 6.12 5.73 0.00
Device: rrqm/s wrqm/s r/s w/s rkB/s wkB/s avgrq-sz avgqu-sz await svctm %util
sda 0.00 2.07 0.00 1.83 0.00 15.60 17.02 0.00 0.44 0.05 0.01
sda1 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
sda2 0.00 2.07 0.00 1.83 0.00 15.60 17.02 0.00 0.44 0.05 0.01
sda3 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00
The problem is that snmpwalk on the working machine ends promptly with this:
[root@adm01b log]# snmpwalk -v2c -cpublic web05b .1.3.6.1.3.1 | tail
SNMPv2-SMI::experimental.1.11.3 = STRING: "0.80"
SNMPv2-SMI::experimental.1.11.4 = STRING: "0.00"
SNMPv2-SMI::experimental.1.12.1 = STRING: "0.35"
SNMPv2-SMI::experimental.1.12.2 = STRING: "0.00"
SNMPv2-SMI::experimental.1.12.3 = STRING: "0.35"
SNMPv2-SMI::experimental.1.12.4 = STRING: "0.00"
SNMPv2-SMI::experimental.1.13.1 = STRING: "1.10"
SNMPv2-SMI::experimental.1.13.2 = STRING: "0.00"
SNMPv2-SMI::experimental.1.13.3 = STRING: "1.10"
SNMPv2-SMI::experimental.1.13.4 = STRING: "0.00"
Non-working machine:
[root@adm01b log]# snmpwalk -v2c -cpublic web65b .1.3.6.1.3.1
SNMPv2-SMI::experimental.1.11.3 = STRING: "0.40"
SNMPv2-SMI::experimental.1.11.4 = STRING: "0.00"
SNMPv2-SMI::experimental.1.12.1 = STRING: "0.06"
SNMPv2-SMI::experimental.1.12.2 = STRING: "0.00"
SNMPv2-SMI::experimental.1.12.3 = STRING: "0.06"
SNMPv2-SMI::experimental.1.12.4 = STRING: "0.00"
SNMPv2-SMI::experimental.1.13.1 = STRING: "0.01"
SNMPv2-SMI::experimental.1.13.2 = STRING: "0.00"
SNMPv2-SMI::experimental.1.13.3 = STRING: "0.01"
SNMPv2-SMI::experimental.1.13.4 = STRING: "0.00"
Timeout: No Response from web65b
Running it in debug is where I see the difference in responses on the last MiB:
working:
SNMPv2-SMI::experimental.1.13.4 = STRING: "0.00"
Sending 42 bytes to UDP: [192.168.82.5]:161
0000: 30 28 02 01 01 04 06 70 75 62 6C 69 63 A1 1B 02 0(.....public...
0016: 04 10 47 C3 C5 02 01 00 02 01 00 30 0D 30 0B 06 ..G........0.0..
0032: 07 2B 06 01 03 01 0D 04 05 00 .+........
Received 42 bytes from UDP: [192.168.82.5]:161
0000: 30 28 02 01 01 04 06 70 75 62 6C 69 63 A2 1B 02 0(.....public...
0016: 04 10 47 C3 C5 02 01 00 02 01 00 30 0D 30 0B 06 ..G........0.0..
0032: 06 2B 06 01 03 02 01 41 01 74 .+.....A.t
NON-working:
SNMPv2-SMI::experimental.1.13.4 = STRING: "0.00"
Sending 42 bytes to UDP: [192.168.82.65]:161
0000: 30 28 02 01 01 04 06 70 75 62 6C 69 63 A1 1B 02 0(.....public...
0016: 04 18 0F 5C 3A 02 01 00 02 01 00 30 0D 30 0B 06 ...\:......0.0..
0032: 07 2B 06 01 03 01 0D 04 05 00 .+........
Resending 42 bytes to UDP: [192.168.82.65]:161
0000: 30 28 02 01 01 04 06 70 75 62 6C 69 63 A1 1B 02 0(.....public...
0016: 04 18 0F 5C 3A 02 01 00 02 01 00 30 0D 30 0B 06 ...\:......0.0..
0032: 07 2B 06 01 03 01 0D 04 05 00 .+........
(resends 4x then times out)
Note the lack of response containing ".A.t" from the broken machine.
Do you have any idea what I should do next for troubleshooting?
Thursday, October 13. 2011 at 11:06 (Link) (Reply)
thank you very much for this awesome tool
I experienced some weird error messages while performing an "verbose" snmp-query @cacti.
the error message was:
"+ Invalid field ioDescr:ioName:ioIndex"
"+ Must contain input fields only"
to resolve the issue i've modified the iostat.xml file (as christianha mentioned above).
changed from:
ioDescr:ioName:ioIndex
to:
ioDescr:ioIndex
just wanted to "archive" the error-message, since i didn't find anything via google.
keep up the great work
best regards,
René
Thursday, February 9. 2012 at 03:08 (Link) (Reply)
Monday, November 7. 2011 at 19:00 (Reply)
snmpwalk -c public -v1 localhost .1.3.6.1.3.1 |grep "\.1 "
SNMPv2-SMI::experimental.1.1.1 = INTEGER: 1
SNMPv2-SMI::experimental.1.2.1 = STRING: "sda"
SNMPv2-SMI::experimental.1.3.1 = STRING: "0.00"
SNMPv2-SMI::experimental.1.4.1 = STRING: "149.62"
SNMPv2-SMI::experimental.1.5.1 = STRING: "0.00"
SNMPv2-SMI::experimental.1.6.1 = STRING: "60.65"
SNMPv2-SMI::experimental.1.7.1 = STRING: "0.00"
SNMPv2-SMI::experimental.1.8.1 = STRING: "841.05"
SNMPv2-SMI::experimental.1.9.1 = STRING: "27.74"
SNMPv2-SMI::experimental.1.10.1 = STRING: "0.07"
SNMPv2-SMI::experimental.1.11.1 = STRING: "1.22"
SNMPv2-SMI::experimental.1.12.1 = STRING: "0.46"
SNMPv2-SMI::experimental.1.13.1 = STRING: "2.80"
but Cacti fails with :-
+ Running data query [16].
+ Found type = '3' [snmp query].
+ Found data query XML file at '/var/www/cacti/resource/snmp_queries/iostat.xml'
+ XML file parsed ok.
+ Executing SNMP walk for list of indexes @ '.1.3.6.1.3.1'
+ No SNMP data returned
+ Found data query XML file at '/var/www/cacti/resource/snmp_queries/iostat.xml'
+ Found data query XML file at '/var/www/cacti/resource/snmp_queries/iostat.xml'
+ Found data query XML file at '/var/www/cacti/resource/snmp_queries/iostat.xml'
I've tried tweaking the timeouts, but no joy. Has anyone any suggestions for resolving this?
Monday, February 27. 2012 at 09:47 (Reply)
Please help to solve this problem. I have installed as shown in intallation manual but it is not working properly. In the end of snmpwalk shows folloing output
snmpwalk -c public -v 2c -t 10 10.x.x.x .1.3.6.1.3.1
SNMPv2-SMI::experimental.1.1.1 = INTEGER: 1
SNMPv2-SMI::experimental.1.1.2 = INTEGER: 2
SNMPv2-SMI::experimental.1.1.3 = INTEGER: 3
SNMPv2-SMI::experimental.1.2.1 = STRING: "sd0"
SNMPv2-SMI::experimental.1.2.2 = STRING: "sd2"
SNMPv2-SMI::experimental.1.2.3 = STRING: "nfs1"
SNMPv2-SMI::experimental.1.3.1 = STRING: "0.0"
SNMPv2-SMI::experimental.1.3.2 = STRING: "0.0"
SNMPv2-SMI::experimental.1.3.3 = STRING: "0.0"
SNMPv2-SMI::experimental.1.4.1 = STRING: "0.3"
SNMPv2-SMI::experimental.1.4.2 = STRING: "0.0"
SNMPv2-SMI::experimental.1.4.3 = STRING: "0.0"
SNMPv2-SMI::experimental.1.5.1 = STRING: "0.0"
SNMPv2-SMI::experimental.1.5.2 = STRING: "0.0"
SNMPv2-SMI::experimental.1.5.3 = STRING: "0.0"
SNMPv2-SMI::experimental.1.6.1 = STRING: "2.6"
SNMPv2-SMI::experimental.1.6.2 = STRING: "0.0"
SNMPv2-SMI::experimental.1.6.3 = STRING: "0.0"
SNMPv2-SMI::experimental.1.7.1 = STRING: "0.0"
SNMPv2-SMI::experimental.1.7.2 = STRING: "0.0"
SNMPv2-SMI::experimental.1.7.3 = STRING: "0.0"
SNMPv2-SMI::experimental.1.8.1 = STRING: "0.0"
SNMPv2-SMI::experimental.1.8.2 = STRING: "0.0"
SNMPv2-SMI::experimental.1.8.3 = STRING: "0.0"
SNMPv2-SMI::experimental.1.9.1 = STRING: "10.9"
SNMPv2-SMI::experimental.1.9.2 = STRING: "0.0"
SNMPv2-SMI::experimental.1.9.3 = STRING: "0.0"
SNMPv2-SMI::experimental.1.10.1 = STRING: "0"
SNMPv2-SMI::experimental.1.10.2 = STRING: "0"
SNMPv2-SMI::experimental.1.10.3 = STRING: "0"
SNMPv2-SMI::experimental.1.11.1 = STRING: "0"
SNMPv2-SMI::experimental.1.11.2 = STRING: "0"
SNMPv2-SMI::experimental.1.11.3 = STRING: "0"
Error in packet.
Reason: (genError) A general failure occured
Failed object: SNMPv2-SMI::enterprises.42.2.15.12
This is output of Data Query Debug Information
+ Running data query [22].
+ Found type = '3' [snmp query].
+ Found data query XML file at '/var/www/cacti/resource/snmp_queries/iostat-solaris.xml'
+ XML file parsed ok.
+ Executing SNMP walk for list of indexes @ '.1.3.6.1.3.1'
+ No SNMP data returned
+ Found data query XML file at '/var/www/cacti/resource/snmp_queries/iostat-solaris.xml'
+ Found data query XML file at '/var/www/cacti/resource/snmp_queries/iostat-solaris.xml'
+ Found data query XML file at '/var/www/cacti/resource/snmp_queries/iostat-solaris.xml'
I increse timeout to 15000 but still no good result. Thanks
Friday, March 2. 2012 at 13:32 (Reply)
I've tried uploading the XML file and tried putting it in the snmp_queries folder and clicking import templates. I also tried the CLI option - i dont get any options for these graphs
I can SNMP walk the device and get all the information, just no graph template!
Any advise greatly appreciated, im drawing blanks
Tuesday, August 28. 2012 at 23:24 (Reply)
SNMP pulls values but rra's are not being created
Friday, September 21. 2012 at 10:45 (Reply)
I am running a ZFS filesystem with a big number of disks in raid-z. Is there a way to monitor iostats for the whole zpool, too? At the moment I see iostats on a per-disk base.
Thanks!