Cacti (home)ForumsDocumentation
Cacti: offical forums and support
It is currently Tue Jun 25, 2019 12:41 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 12 posts ] 
Author Message
 Post subject: Mapping disk usage
PostPosted: Mon Nov 15, 2004 8:08 pm 
I need to trend the amount of IO that is coming in and out of the disks on my server (so I can know if I am banging the hell out of my disks). There does not seem to be a standard SNMP OID for this type of statistic, but i want to incorporate it into Cacti.

Was wondering if anyone out there does trending for disk io. Does anyone know the best way of grabbing the information from the server? I was thinking about:
A) Somehow creating my own SNMP OID and funnelling info from iostat into it
B) Getting a iostat number from a script that runs via ssh

This is a rather common request to get (I would imagine), so I was wondering if anyone found an elegant approach.


Top
  
 
 Post subject: is iostat reliable?
PostPosted: Tue Nov 16, 2004 12:15 pm 
Offline

Joined: Tue Mar 16, 2004 3:03 pm
Posts: 6
This sounds like a good idea; one comment on iostat however - at least on Solaris, the first output from iostat is meaningless. So to get anything meaningful from it, you have to run it continuously with an interval, and ignore the first line. I don't know if linux' iostat works the same way or not.

In any case, my point is that if you were to try to tie a script that ran iostat to a custom OID in SNMP (certainly doable), you'd have to account for this odd behavor somehow. (You can't just grab the "instantaneous IO load" in one shot.)

Another issue is how representative do you want the data - do you really only want a single 5-second average (for example) every 5 minutes? I guess this is always the problem with data collection - how much sampling is "enough" in order to characterize the real IO load?

Is there some other way to get the info - sar perhaps?


Top
 Profile  
 
 Post subject: Mapping disk usage
PostPosted: Tue Nov 16, 2004 4:53 pm 
> Is there some other way to get the info - sar perhaps?
I am not sure, I'm new to the whole SNMP thing. I just know of iostat. SNMP doesn't have a way to measure disk io does it? Is there any way to have a script run and feed it to a SNMP OID value?


Top
  
 
 Post subject: I am an idiot
PostPosted: Tue Nov 16, 2004 5:39 pm 
Offline

Joined: Tue Mar 16, 2004 3:03 pm
Posts: 6
I just checked into this again, and I realize now that I am an idiot. That whole strange behavior I just described is for vmstat, not iostat.

So yes, with net-snmp on your server you can associate a "script" like this:

Code:
iostat -xtc | grep "sd0"


with an OID and then snmpget it from elsewhere. Whenever you do the 'get', it will run the script I believe. (The relevant directive for the snmpd.conf file is 'exec' -- the man page says that the results of running the script will wind up in "1.3.6.1.4.1.2021.8.1.101".)

Sorry for confusing everything!


Top
 Profile  
 
 Post subject:
PostPosted: Wed Nov 24, 2004 9:00 am 
Offline
Cacti User

Joined: Thu Oct 14, 2004 4:14 pm
Posts: 97
dent, can you elaborate on the steps to get this working. I'm really keen to get some diskio stats out of Solaris, but I'm not a Solaris expert.

How do you 'associate' the script and link it to the SNMP get command. I assume to schedule the script via cron, but then what? If I can get the results into an OID, I should be able to poll and graph it in Cacti :-)

Cheers


Top
 Profile  
 
 Post subject: Re: I am an idiot
PostPosted: Fri Dec 03, 2004 3:56 am 
Offline
Cacti User

Joined: Tue Nov 16, 2004 10:33 am
Posts: 60
Location: Spain
dent wrote:
So yes, with net-snmp on your server you can associate a "script" like this:

Code:
iostat -xtc | grep "sd0"


Sorry for confusing everything!


Be careful, at least in Solaris.

From the iostat man page:

"The first line of output is for all time since boot; each subsequent line is for the prior interval only."


Top
 Profile  
 
 Post subject: Solaris monitoring
PostPosted: Fri Dec 03, 2004 4:03 am 
Offline
Cacti User

Joined: Tue Nov 16, 2004 10:33 am
Posts: 60
Location: Spain
tman wrote:
I'm really keen to get some diskio stats out of Solaris, but I'm not a Solaris expert.


I'm developing input data methods, data queries and templates for Solaris monitoring.

In my first version I'm going to use commands like iostat, sar, etc.

I think I could have this first version in 4-5 weeks.

Regards,

zanaguara


Top
 Profile  
 
 Post subject: Re: Solaris monitoring
PostPosted: Wed Jan 05, 2005 2:11 pm 
zanaguara wrote:
tman wrote:
I'm really keen to get some diskio stats out of Solaris, but I'm not a Solaris expert.


I'm developing input data methods, data queries and templates for Solaris monitoring.

In my first version I'm going to use commands like iostat, sar, etc.

I think I could have this first version in 4-5 weeks.

Regards,

zanaguara



I did this by using ucd-snmp that I recompiled with the ucd-diskio mib added to it. It's listed as experimental and not compiled into net-snmp by default. It provides counters of read / write transactions and bytes since boot since boot, and graphs those variables similar to the way network interfaces are graphed.

You just have to define a data template based on snmp queries in /cacti/resource/snmp_queries. attached is the xml file i created for this...

from there you need to define data sources and graph templates for it, then add the graph templates to your host templat for ucd/net-snmp host


Attachments:
File comment: disk io data template for ucd-snmp
disk_io.xml [2.22 KiB]
Downloaded 3099 times
Top
  
 
 Post subject:
PostPosted: Thu Jan 06, 2005 4:17 am 
Offline
Cacti Guru User
User avatar

Joined: Fri Sep 19, 2003 8:36 am
Posts: 2326
Location: Sophia-Antipolis, France
Hi
Quote:
You just have to define a data template based on snmp queries in /cacti/resource/snmp_queries. attached is the xml file i created for this...

from there you need to define data sources and graph templates for it, then add the graph templates to your host templat for ucd/net-snmp host

Could please post here your data & graph templates ?
Thanks in advance...

Regards,

Frédéric Mangeant


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jan 07, 2005 11:36 am 
Offline

Joined: Wed Jan 05, 2005 2:22 pm
Posts: 1
Here they are

fmangeant wrote:
Hi
Quote:
You just have to define a data template based on snmp queries in /cacti/resource/snmp_queries. attached is the xml file i created for this...

from there you need to define data sources and graph templates for it, then add the graph templates to your host templat for ucd/net-snmp host

Could please post here your data & graph templates ?
Thanks in advance...

Regards,

Frédéric Mangeant


Attachments:
cacti_diskio.zip [10.84 KiB]
Downloaded 2664 times
Top
 Profile  
 
 Post subject:
PostPosted: Thu Feb 10, 2005 11:10 am 
Offline
Cacti User
User avatar

Joined: Tue Feb 10, 2004 10:08 am
Posts: 199
Location: Esslingen, Germany
Hi,

I just tried to get the diskio templates to work. I get the following debug output.

+ Running data query [10].
+ Found type = '3' [snmp query].
+ Found data query XML file at '/var/www/html/cacti-0.8.6c/resource/snmp_queries/disk_io.xml'
+ XML file parsed ok.
+ Executing SNMP walk for list of indexes @ '.1.3.6.1.4.1.2021.13.15.1.1.1'
+ No SNMP data returned
+ Found data query XML file at '/var/www/html/cacti-0.8.6c/resource/snmp_queries/disk_io.xml'
+ Found data query XML file at '/var/www/html/cacti-0.8.6c/resource/snmp_queries/disk_io.xml'
+ Found data query XML file at '/var/www/html/cacti-0.8.6c/resource/snmp_queries/disk_io.xml'

I have problems to do a snmpwalk on the diskio oids. snmptable is working fine.

snmpget -Ov -v1 -c mycomstring servername .1.3.6.1.4.1.2021.13.15.1.1.1
Error in packet
Reason: (noSuchName) There is no such variable name in this MIB.
Failed object: UCD-SNMP-MIB::ucdExperimental.15.1.1.1

snmptable -v 1 -c mycomstring servername UCD-DISKIO-MIB:diskIOTable
SNMP table: UCD-DISKIO-MIB::diskIOTable

diskIOIndex diskIODevice diskIONRead diskIONWritten diskIOReads diskIOWrites
1 ssd1 242527744 3775527936 570428 3570101
2 ssd2 244698624 3041034752 570436 2138971
3 md1 242442240 1225071104 569801 2069265
4 md2 244635136 1223353344 569801 2069266
5 md0 487077376 1244760576 1139602 2071624
6 md11 8192 1817649152 1 13976
7 md12 8192 1817649152 1 13976
8 md10 16384 1817657344 2 13977
....


What is wrong with the snmpwalk and the cacti template? I would love to see this working.

Ralf


Top
 Profile  
 
 Post subject:
PostPosted: Thu Feb 10, 2005 11:57 am 
Offline
Cacti User
User avatar

Joined: Tue Feb 10, 2004 10:08 am
Posts: 199
Location: Esslingen, Germany
Ok, I found my problem.

I've to do a snmpwalk on .1.3.6.1.4.1.2021.13.15.1.1.1 to get the indexes. My second fault was, that I was not quering the solaris machine with DISKIO enabled at compile time, instead I polled a SEL 8.0, without that exp. feature...

Stupid me.

Ralf


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 12 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 6 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group