Cacti (home)ForumsRepositoryDocumentation
Cacti: offical forums and support  

 FAQFAQ   SearchSearch   MemberlistMemberlist    RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in    


Upgraded: snmpdiskio 0.9.6 (Disk I/O statistics on Linux)
Goto page Previous  1, 2, 3, 4, 5, 6, 7  Next
 
Post new topic   Reply to topic    Cacti Forum Index -> Scripts and Templates
Author Message
gpetme



Joined: 28 Mar 2007
Posts: 22

PostPosted: Tue Mar 18, 2008 9:33 am    Post subject: Reply with quote

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

PostPosted: Tue Mar 18, 2008 9:41 am    Post subject: Reply with quote

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

PostPosted: Tue Mar 18, 2008 10:35 am    Post subject: Reply with quote

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

PostPosted: Tue Mar 18, 2008 10:48 am    Post subject: Reply with quote

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

PostPosted: Fri Mar 28, 2008 9:40 pm    Post subject: Reply with quote

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

PostPosted: Sun Apr 06, 2008 10:00 am    Post subject: Reply with quote

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).



partition.xml
 Description:

Download
 Filename:  partition.xml
 Filesize:  1.07 KB
 Downloaded:  519 Time(s)

Back to top
skion



Joined: 29 Nov 2005
Posts: 3

PostPosted: Wed Apr 09, 2008 5:08 am    Post subject: Reply with quote

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

PostPosted: Thu May 01, 2008 1:49 pm    Post subject: question about the verbose query Reply with quote

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

PostPosted: Thu May 15, 2008 8:56 am    Post subject: Results are reversed Reply with quote

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

PostPosted: Fri May 16, 2008 12:57 pm    Post subject: Reply with quote

Nevermind figuired it out

Back to top
sjordan



Joined: 25 Mar 2008
Posts: 10

PostPosted: Mon Jul 07, 2008 2:45 pm    Post subject: Reply with quote

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

PostPosted: Tue Jul 29, 2008 8:56 pm    Post subject: Reply with quote

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

PostPosted: Tue Jul 29, 2008 9:18 pm    Post subject: Reply with quote

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

PostPosted: Wed Aug 27, 2008 12:46 am    Post subject: Reply with quote

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

PostPosted: Wed Aug 27, 2008 1:01 am    Post subject: Reply with quote

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
Display posts from previous:   
Post new topic   Reply to topic    Cacti Forum Index -> Scripts and Templates All times are GMT - 5 Hours
Goto page Previous  1, 2, 3, 4, 5, 6, 7  Next
Page 6 of 7

 



Powered by phpBB © 2001, 2005 phpBB Group