|
|
| Author |
Message |
gpetme
Joined: 28 Mar 2007 Posts: 22
|
Posted: Tue Mar 18, 2008 9:33 am Post subject: |
|
|
Try converting it to UNIX format using the unix2dos command. Then verify bash is in the default location on your system:
# grep bash /etc/shells
|
|
| Back to top |
|
 |
gandalf Developer
Joined: 02 Dec 2004 Posts: 12295 Location: Muenster, Germany
|
Posted: Tue Mar 18, 2008 9:41 am Post subject: |
|
|
| 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: |
pandora:/usr/local/bin # ./snmpdiskio
bash: ./snmpdiskio: /bin/bash^M: bad interpreter: No such file or directory
|
| Please run a dos2unix on file snmpdiskio. Where's your bash located?
Reinhard
|
|
| Back to top |
|
 |
Chaosratt
Joined: 28 Oct 2007 Posts: 22 Location: St. Pete, FL
|
Posted: Tue Mar 18, 2008 10:35 am Post subject: |
|
|
| gandalf wrote: | | 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: |
pandora:/usr/local/bin # ./snmpdiskio
bash: ./snmpdiskio: /bin/bash^M: bad interpreter: No such file or directory
|
| Please run a dos2unix on file snmpdiskio. Where's your bash located?
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: |
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'
|
|
|
| Back to top |
|
 |
gandalf Developer
Joined: 02 Dec 2004 Posts: 12295 Location: Muenster, Germany
|
Posted: Tue Mar 18, 2008 10:48 am Post subject: |
|
|
You will have to configure your target's snmpd.conf to answer those snmp requests. Find some basic hints at the first link of my signature. reading the SNMP chapter of Frederic Mangeant
Reinhard
|
|
| Back to top |
|
 |
Findarato
Joined: 06 Feb 2008 Posts: 12
|
Posted: Fri Mar 28, 2008 9:40 pm Post subject: |
|
|
| elgoretto 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.
| Code: | <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> |
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). |
That worked wonders for my problems
|
|
| Back to top |
|
 |
elgoretto
Joined: 03 Sep 2007 Posts: 5
|
Posted: Sun Apr 06, 2008 10:00 am Post subject: |
|
|
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).
| Description: |
|
 Download |
| Filename: |
partition.xml |
| Filesize: |
1.07 KB |
| Downloaded: |
519 Time(s) |
|
|
| Back to top |
|
 |
skion
Joined: 29 Nov 2005 Posts: 3
|
Posted: Wed Apr 09, 2008 5:08 am Post subject: |
|
|
| 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). |
Thanks elgoretto, this works like a charm!
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
|
|
| Back to top |
|
 |
five0.4tluv
Joined: 19 Mar 2008 Posts: 8
|
Posted: Thu May 01, 2008 1:49 pm Post subject: 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]
|
|
| Back to top |
|
 |
kharford
Joined: 07 Jul 2005 Posts: 40 Location: Mass, USA
|
Posted: Thu May 15, 2008 8:56 am Post subject: 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
|
|
| Back to top |
|
 |
kharford
Joined: 07 Jul 2005 Posts: 40 Location: Mass, USA
|
Posted: Fri May 16, 2008 12:57 pm Post subject: |
|
|
Nevermind figuired it out
|
|
| Back to top |
|
 |
sjordan
Joined: 25 Mar 2008 Posts: 10
|
Posted: Mon Jul 07, 2008 2:45 pm Post subject: |
|
|
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:
| Code: |
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
|
Any idea of what would cause this? Here is what comes out of verbose query under snmp disk statistics:
| Code: |
+ 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'
|
|
|
| Back to top |
|
 |
calbear
Joined: 29 Jul 2008 Posts: 5
|
Posted: Tue Jul 29, 2008 8:56 pm Post subject: |
|
|
| 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). |
I think the I and O are reversed in this partition.xml.
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
|
|
| Back to top |
|
 |
calbear
Joined: 29 Jul 2008 Posts: 5
|
Posted: Tue Jul 29, 2008 9:18 pm Post subject: |
|
|
| It seems that cacti_graph_template_disk_io_bytessec.xml and cacti_data_query_snmp_disk_statistics.xml have READ and WRITE reversed too, or am I completely mistaken??
|
|
| Back to top |
|
 |
super-hornet Cacti User
Joined: 27 May 2007 Posts: 144
|
Posted: Wed Aug 27, 2008 12:46 am Post subject: |
|
|
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=8777&postdays=0&postorder=asc&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
|
|
| Back to top |
|
 |
calbear
Joined: 29 Jul 2008 Posts: 5
|
Posted: Wed Aug 27, 2008 1:01 am Post subject: |
|
|
| 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=8777&postdays=0&postorder=asc&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.
|
|
| Back to top |
|
 |
|