Upgraded: snmpdiskio 0.9.6 (Disk I/O statistics on Linux)
Moderators: Developers, Moderators
- gandalf
- Developer
- Posts: 22383
- Joined: Thu Dec 02, 2004 2:46 am
- Location: Muenster, Germany
- Contact:
Please run a dos2unix on file snmpdiskio. Where's your bash located?Chaosratt wrote:Getting an error on this as installed by the current directions in the first post.
Everything works without error except for the snmpdiskio script:
Code: Select all
pandora:/usr/local/bin # ./snmpdiskio bash: ./snmpdiskio: /bin/bash^M: bad interpreter: No such file or directory
Reinhard
gandalf wrote:Please run a dos2unix on file snmpdiskio. Where's your bash located?Chaosratt wrote:Getting an error on this as installed by the current directions in the first post.
Everything works without error except for the snmpdiskio script:
Code: Select all
pandora:/usr/local/bin # ./snmpdiskio bash: ./snmpdiskio: /bin/bash^M: bad interpreter: No such file or directory
Reinhard
Ok, thats solved that issue, now a new one. I see in the above posts that I am not alone in snmp walking the .55 OID and not getting any data.
Code: Select all
pandora:/usr/local/bin # ./snmpdiskio hdNum
21
pandora:/usr/local/bin # snmpwalk -c secret -v 1 localhost .1.3.6.1.4.1.2021.55
pandora:/usr/local/bin #
+ Running data query [14].
+ Found type = '3' [snmp query].
+ Found data query XML file at '/home/xaos/public_html/cacti/resource/snmp_queries/partition.xml'
+ XML file parsed ok.
+ Executing SNMP walk for list of indexes @ '.1.3.6.1.4.1.2021.55.101'
+ No SNMP data returned
+ Found data query XML file at '/home/xaos/public_html/cacti/resource/snmp_queries/partition.xml'
+ Found data query XML file at '/home/xaos/public_html/cacti/resource/snmp_queries/partition.xml'
+ Found data query XML file at '/home/xaos/public_html/cacti/resource/snmp_queries/partition.xml'
That worked wonders for my problemselgoretto wrote:I don't know if this is really useful, but I made a version of the partition.xml file which is "net-snmp diskio enabled" compliant. I just corrected the OIDs.
It seems to work with my Cacti 0.8.6j on Gentoo.
I tried to keep a pure net-snmp setup, because at first I didn't manage to get the snmpdiskio shellscript working (maybe some wrong execute rights after all).Code: Select all
<interface> <name>Get SNMP Partitions</name> <description>Queries a host for a list of monitorable partitions</description> <oid_index>.1.3.6.1.4.1.2021.13.15</oid_index> <index_order>hdDescr:hdName:hdIndex</index_order> <index_order_type>numeric</index_order_type> <index_title_format>|chosen_order_field|</index_title_format> <fields> <hdIndex> <name>Index</name> <method>walk</method> <source>value</source> <direction>input</direction> <oid>.1.3.6.1.4.1.2021.13.15.1.1.1</oid> </hdIndex> <hdDescr> <name>Description</name> <method>walk</method> <source>value</source> <direction>input</direction> <oid>.1.3.6.1.4.1.2021.13.15.1.1.2</oid> </hdDescr> <hdInBlocks> <name>Bytes Written</name> <method>walk</method> <source>value</source> <direction>output</direction> <oid>.1.3.6.1.4.1.2021.13.15.1.1.3</oid> </hdInBlocks> <hdOutBlocks> <name>Bytes Read</name> <method>walk</method> <source>value</source> <direction>output</direction> <oid>.1.3.6.1.4.1.2021.13.15.1.1.4</oid> </hdOutBlocks> </fields> </interface>
Ok I've reinstalled a brand new 0.8.7b cacti, and my contribution to partition.xml is still valid.
With this method, you can get rid of the snmpio script (no need to maintain it anymore) and no need to have a specific snmp.conf setup (but you still need to add diskIO feature at net-snmp compilation time).
With this method, you can get rid of the snmpio script (no need to maintain it anymore) and no need to have a specific snmp.conf setup (but you still need to add diskIO feature at net-snmp compilation time).
- Attachments
-
- partition.xml
- (1.07 KiB) Downloaded 1681 times
Thanks elgoretto, this works like a charm!elgoretto wrote:Ok I've reinstalled a brand new 0.8.7b cacti, and my contribution to partition.xml is still valid.
With this method, you can get rid of the snmpio script (no need to maintain it anymore) and no need to have a specific snmp.conf setup (but you still need to add diskIO feature at net-snmp compilation time).
For the record, what i did was:
- import the two cacti templates from the original post
- copy elgoretto's partitions file to /usr/share/cacti/resource/snmp_queries/partition.xml
- in cacti, add the SNMP disk statistics data query to the hosts you want
- in cacti, add some graphs
- voila, nothing else needed
- Skion
-
- Posts: 18
- Joined: Wed Mar 19, 2008 2:42 pm
question about the verbose query
should I see the hdInBlocks, hdOutBlocks data return. mine stops at
+ Found item [hdDescr='sdcd1'] index: 189 [from value]
+ Found item [hdDescr='sdce'] index: 190 [from value]
+ Found item [hdDescr='sdce1'] index: 191 [from value]
+ Found item [hdDescr='sdcf'] index: 192 [from value]
+ Found item [hdDescr='sdcf1'] index: 193 [from value]
+ Found item [hdDescr='psdctl'] index: 194 [from value]
+ Found item [hdDescr='rpsdctl'] index: 195 [from value]
+ Found item [hdDescr='psv'] index: 196 [from value]
+ Found data query XML file at '/var/www/html/resource/snmp_queries/partition.xml'
+ Found data query XML file at '/var/www/html/resource/snmp_queries/partition.xml'
+ Found data query XML file at '/var/www/html/resource/snmp_queries/partition.xml'
1) SNMP - Disk Statistics (Verbose Query) Uptime Goes Backwards Success [479 Items, 283 Rows]
+ Found item [hdDescr='sdcd1'] index: 189 [from value]
+ Found item [hdDescr='sdce'] index: 190 [from value]
+ Found item [hdDescr='sdce1'] index: 191 [from value]
+ Found item [hdDescr='sdcf'] index: 192 [from value]
+ Found item [hdDescr='sdcf1'] index: 193 [from value]
+ Found item [hdDescr='psdctl'] index: 194 [from value]
+ Found item [hdDescr='rpsdctl'] index: 195 [from value]
+ Found item [hdDescr='psv'] index: 196 [from value]
+ Found data query XML file at '/var/www/html/resource/snmp_queries/partition.xml'
+ Found data query XML file at '/var/www/html/resource/snmp_queries/partition.xml'
+ Found data query XML file at '/var/www/html/resource/snmp_queries/partition.xml'
1) SNMP - Disk Statistics (Verbose Query) Uptime Goes Backwards Success [479 Items, 283 Rows]
Results are reversed
I'm sorry if this is rehash of an old issue but my graphs are not showing me the correct results.
The reads and the writes seem to be reversed according to iostat
I am running CentOS, 2.6 kernel
And have installed snmpdiskio-0.9.6 with original templates.
Any ideas as to why I seem to be reverse
Any help GREATLY appreciated
Ken
The reads and the writes seem to be reversed according to iostat
I am running CentOS, 2.6 kernel
And have installed snmpdiskio-0.9.6 with original templates.
Any ideas as to why I seem to be reverse
Any help GREATLY appreciated
Ken
I have some hosts that return nothing when I run the Verbose query. I get 0 items and 0 rows. However when I log into that machine and run: ./snmpdiskio hdNum
I get a value back.
I also have this added to the snmp.conf:
Any idea of what would cause this? Here is what comes out of verbose query under snmp disk statistics:
I get a value back.
I also have this added to the snmp.conf:
Code: Select all
exec .1.3.6.1.4.1.2021.54 hdNum /usr/local/bin/snmpdiskio hdNum
exec .1.3.6.1.4.1.2021.55 hdIndex /usr/local/bin/snmpdiskio hdIndex
exec .1.3.6.1.4.1.2021.56 hdDescr /usr/local/bin/snmpdiskio hdDescr
exec .1.3.6.1.4.1.2021.57 hdInBlocks /usr/local/bin/snmpdiskio hdInBlocks
exec .1.3.6.1.4.1.2021.58 hdOutBlocks /usr/local/bin/snmpdiskio hdOutBlocks
Code: Select all
+ Running data query [11].
+ Found type = '3' [snmp query].
+ Found data query XML file at '/var/www/html/resource/snmp_queries/partition.xml'
+ XML file parsed ok.
+ Executing SNMP walk for list of indexes @ '.1.3.6.1.4.1.2021.55.101'
+ Located input field 'hdIndex' [walk]
+ Executing SNMP walk for data @ '.1.3.6.1.4.1.2021.55.101'
+ Located input field 'hdDescr' [walk]
+ Executing SNMP walk for data @ '.1.3.6.1.4.1.2021.56.101'
+ Found data query XML file at '/var/www/html/resource/snmp_queries/partition.xml'
+ Found data query XML file at '/var/www/html/resource/snmp_queries/partition.xml'
+ Found data query XML file at '/var/www/html/resource/snmp_queries/partition.xml'
I think the I and O are reversed in this partition.xml.elgoretto wrote:Ok I've reinstalled a brand new 0.8.7b cacti, and my contribution to partition.xml is still valid.
With this method, you can get rid of the snmpio script (no need to maintain it anymore) and no need to have a specific snmp.conf setup (but you still need to add diskIO feature at net-snmp compilation time).
Shouldn't hdInBlocks be "Bytes Read" and hdOutBlocks be "Bytes Written"?
.1.3.6.1.4.1.2021.13.15.1.1.4 = UCD-DISKIO-MIB::diskIONWritten
.1.3.6.1.4.1.2021.13.15.1.1.3 = UCD-DISKIO-MIB::diskIONRead
-
- Cacti User
- Posts: 175
- Joined: Sun May 27, 2007 5:42 pm
I have both scripts of this one and "ucd/net snmp Device (Disk) I/O templates - Updated - v2"
{ http://forums.cacti.net/viewtopic.php?t ... sc&start=0 }
running on the same system. When I compare the graph on both, it looks like this script is in reverse to the "ucd/net snmp Device (Disk) I/O templates - Updated - v2". The read become write and write become read.
Which one is correct, i cannot confirm.
SH
{ http://forums.cacti.net/viewtopic.php?t ... sc&start=0 }
running on the same system. When I compare the graph on both, it looks like this script is in reverse to the "ucd/net snmp Device (Disk) I/O templates - Updated - v2". The read become write and write become read.
Which one is correct, i cannot confirm.
SH
I'm pretty sure originally it was wrong. I have a machine running apache web server with awstats processing logs at a certain time of day. Originally cacti was reporting it was reading from disk all the time and when awstats kicks in, writes spike. That didn't make sense at all. Most of what the web server is reading should be in file system cache so it doesn't need to actually read from disk but it should be writing to disk all the time for apache logs. And when awstats kicks in, it should be reading the logs from disk far much more than writing processed data to disk.super-hornet wrote:I have both scripts of this one and "ucd/net snmp Device (Disk) I/O templates - Updated - v2"
{ http://forums.cacti.net/viewtopic.php?t ... sc&start=0 }
running on the same system. When I compare the graph on both, it looks like this script is in reverse to the "ucd/net snmp Device (Disk) I/O templates - Updated - v2". The read become write and write become read.
Which one is correct, i cannot confirm.
SH
Who is online
Users browsing this forum: No registered users and 3 guests