Linux extended iostat template and scripts

Templates, scripts for templates, scripts and requests for templates.

Moderators: Developers, Moderators

locutus233
Posts: 14
Joined: Tue Mar 17, 2009 2:49 pm

Post by locutus233 »

I'm still having issues. Just downloaded v1.4 and uploaded to my centos 4 server...

Here is my snmp walk results:

Code: Select all

[root@wtw-man1 bin]# snmpwalk -v1 -c XxXxX 172.16.2.32 .1.3.6.1.3.1.2
[root@wtw-man1 bin]#
Here is the contents of the iostat.cache file:

Code: Select all

Linux 2.6.9-42.0.3.ELsmp (q1-man1.XxXxX.local)        06/22/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.19 251.72 43.66 39.14  423.04   24.84   211.52    12.42     5.41     0.05    7.65   1.75  14.51
dm-0         0.00   0.00  0.51 19.86    8.48  158.91     4.24    79.45     8.21     0.19    9.39   0.52   1.05
dm-1         0.00   0.00  0.16  0.10    1.27    0.77     0.63     0.39     8.00     0.01   34.77   0.62   0.02
dm-2         0.00   0.00 43.17 270.91  413.22  449.76   206.61   224.88     2.75     0.54    1.66   0.44  13.94
sdc          0.00   0.00  0.00  0.00    0.00    0.00     0.00     0.00    11.02     0.00    6.17   5.70   0.00
sde          0.00   0.00  0.00  0.00    0.00    0.00     0.00     0.00    12.17     0.00   12.53  12.16   0.00
sdb          0.00   1.99  0.00  0.07    0.00   16.54     0.00     8.27   224.67     0.10 1422.49   4.59   0.03
sdd          0.30   0.00  0.04  0.00    0.35    0.00     0.17     0.00     7.94     0.00    0.62   0.62   0.00

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  56.00 11.77 18.00   94.13  604.23    47.07   302.12    23.46     0.24    7.93   2.04   6.08
dm-0         0.00   0.00  0.00  3.90    0.00   31.20     0.00    15.60     8.00     0.00    1.27   0.09   0.04
dm-1         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
dm-2         0.00   0.00 11.77 70.07   94.13  573.03    47.07   286.52     8.15     1.10   13.41   0.74   6.07
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
sde          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
sdb          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
Here is what happens what happens when i run the scripts from the machine locally:

Code: Select all

[root@q1-man1 ~]# /usr/local/bin/iostat.pl
[root@q1-man1 ~]# /usr/local/bin/iostat.pl .1.3.6.1.3.1.2
I'm stuck and not sure what to look at in the perl script. I have CentOS 4.6 and 4.7 and the results are the same. I have also tried 5.2 and 5.3 and the results generally are the same.
alinux
Cacti User
Posts: 56
Joined: Mon Jul 16, 2007 10:02 am

Post by alinux »

Hi
Working great, however all the graphs that contain read info are showing 0 reads.
Any updates on that ?
Thanks
cliles
Posts: 4
Joined: Wed Dec 26, 2007 12:09 pm

Post by cliles »

Thanks so much for all of this, it works out very well as long as you have a small amount of disks.

I've hacked it up to support vxstat for grabbing stats from VxVM volumes and disks.

It's pretty crude, but it works for me on Sol9. Feel free to include it in the official version if you want. I only included 2 types of graphs, IO requests and times. There is 1 more type of graph you could easily make if you wanted to, as the parsing and data query is already setup to pull blocks transferred.


Otherwise YMMV.

--
Chris
Attachments
example_iops.png
example_iops.png (45.07 KiB) Viewed 11858 times
example_servicetimes.png
example_servicetimes.png (19.23 KiB) Viewed 11858 times
vxstat-0.1.tar.gz
(9.64 KiB) Downloaded 486 times
luckenbach
Posts: 31
Joined: Thu May 07, 2009 9:21 am

Post by luckenbach »

Quick lil update,

I have hacked togeather the cronjob to handle a system with EMC multipath devices.

This will only work if you have labeled your disks per emc standard

/dev/emcpower**

set a cron to run the sh file.
Attachments
geniostat.sh
script to gen emc powerpath IO stats.
(266 Bytes) Downloaded 483 times
Tiago Cruz
Posts: 7
Joined: Wed Sep 19, 2007 9:00 am

Post by Tiago Cruz »

locutus233 wrote:I'm still having issues. Just downloaded v1.4 and uploaded to my centos 4 server...

Code: Select all

[root@q1-man1 ~]# /usr/local/bin/iostat.pl
[root@q1-man1 ~]# /usr/local/bin/iostat.pl .1.3.6.1.3.1.2
I have the same problem. RHEL 5.3 x86_64...
The /usr/local/bin/iostat.pl returns nothing.

And the walk:

Code: Select all

# snmpwalk -v2c -c xxx machine-la-1  .1.3.6.1.3.1.2 
SNMPv2-SMI::experimental.1.2 = No Such Instance currently exists at this OID
What can I do?
themattreid
Posts: 2
Joined: Tue Sep 01, 2009 12:00 pm

Post by themattreid »

Same here - CentOS 5.3 and no results with any of those OIDs.
Tried on RHEL5.3 and also no results.
Tiago Cruz wrote:
locutus233 wrote:I'm still having iss
ues. Just downloaded v1.4 and uploaded to my centos 4 server...

Code: Select all

[root@q1-man1 ~]# /usr/local/bin/iostat.pl
[root@q1-man1 ~]# /usr/local/bin/iostat.pl .1.3.6.1.3.1.2
I have the same problem. RHEL 5.3 x86_64...
The /usr/local/bin/iostat.pl returns nothing.

And the walk:

Code: Select all

# snmpwalk -v2c -c xxx machine-la-1  .1.3.6.1.3.1.2 
SNMPv2-SMI::experimental.1.2 = No Such Instance currently exists at this OID
What can I do?
dicktump
Posts: 1
Joined: Thu Jan 07, 2010 10:11 am

Post by dicktump »

If you do not get any output in Cacti (and it works when using snmpwalk on the command line), you could try increasing the SNMP timeout in Cacti. That worked for me.
User avatar
gthe
Cacti User
Posts: 410
Joined: Sat Jul 29, 2006 1:23 pm
Location: RU

Post by gthe »

themattreid wrote:Same here - CentOS 5.3 and no results with any of those OIDs.
Tried on RHEL5.3 and also no results.
Tiago Cruz wrote:
locutus233 wrote:I'm still having iss
ues. Just downloaded v1.4 and uploaded to my centos 4 server...

Code: Select all

[root@q1-man1 ~]# /usr/local/bin/iostat.pl
[root@q1-man1 ~]# /usr/local/bin/iostat.pl .1.3.6.1.3.1.2
I have the same problem. RHEL 5.3 x86_64...
The /usr/local/bin/iostat.pl returns nothing.

And the walk:

Code: Select all

# snmpwalk -v2c -c xxx machine-la-1  .1.3.6.1.3.1.2 
SNMPv2-SMI::experimental.1.2 = No Such Instance currently exists at this OID
What can I do?
All who have problems with Centos - check the logs selinux!
I used audit2allow and created policy file:

Code: Select all

module snmpdpassiostat 1.0;

require {
        type snmpd_t;
        type tmp_t;
        class file { read ioctl getattr };
}

#============= snmpd_t ==============
allow snmpd_t tmp_t:file { read ioctl getattr };

And now everything works !
My cacti plugin -[url=http://forums.cacti.net/viewtopic.php?p=156769#156769]CaMM[/url]
[size=75]Sorry for my English. [/size]
Dark-Star
Posts: 1
Joined: Thu Apr 15, 2010 9:16 am

Post by Dark-Star »

I'm on CentOS 5.4 and I also have trouble getting this to work. SELinux is disabled so that's not the problem.
I can do the following:

Code: Select all

[root@server /]# /usr/local/bin/iostat.pl -g .1.3.6.1.3.1.2.3
.1.3.6.1.3.1.2.3
string
sdb
[root@server /]# 
so the data is getting read and parsed all right. however the following doesn't work:

Code: Select all

[root@server /]# snmpwalk -v1 -c public localhost .1.3.6.1.3.1
End of MIB
In Cacti, I also see "no SNMP data returned" errors (obviously...)

I don't speak perl well enough to fix or even debug the script (except for placing some dummy print statements) and I do know almost nothing about the linux snmpd (I just did "yum install snmpd" and "service snmpd start" after I added the "pass..." line to the snmpd.conf)

Any help would be greatly appreciated
-Michael

*Edit: CentOS 5.4 x64 fully patched, snmpd 5.3.2.2, cacti 0.8.7e*
*Edit2: I modified the SNMP config to allow access from everywhere, now I can browse a whole lot of snmp subtrees ("snmpwalk -v1 -c public localhost .1 | wc -l" says 8523 lines) but the .1.3.6.1.3.1 subtree is not among them*
ddonohue
Cacti User
Posts: 77
Joined: Mon Jul 10, 2006 10:36 am
Contact:

Post by ddonohue »

I'm trying to run this against Solaris 10 Sparc, and it's running from a ubu server 9

Below is the output of a verbose query

+ Running data query [19].
+ Found type = '3' [snmp query].
+ Found data query XML file at '/usr/share/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 '/usr/share/cacti/resource/snmp_queries/iostat-solaris.xml'
+ Found data query XML file at '/usr/share/cacti/resource/snmp_queries/iostat-solaris.xml'
+ Found data query XML file at '/usr/share/cacti/resource/snmp_queries/iostat-solaris.xml'

however when i run a snmpwalk against it, i get the following: Summarized for brevity.

[root@cacti snmp_queries]# snmpwalk -v2c -c xxxxxxx ip_addr .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.1.6 = INTEGER: 6
SNMPv2-SMI::experimental.1.1.7 = INTEGER: 7
SNMPv2-SMI::experimental.1.1.8 = INTEGER: 8
SNMPv2-SMI::experimental.1.1.9 = INTEGER: 9
SNMPv2-SMI::experimental.1.1.10 = INTEGER: 10
SNMPv2-SMI::experimental.1.1.11 = INTEGER: 11
SNMPv2-SMI::experimental.1.1.12 = INTEGER: 12
SNMPv2-SMI::experimental.1.1.13 = INTEGER: 13
SNMPv2-SMI::experimental.1.1.14 = INTEGER: 14
SNMPv2-SMI::experimental.1.1.15 = INTEGER: 15
SNMPv2-SMI::experimental.1.1.16 = INTEGER: 16
SNMPv2-SMI::experimental.1.1.17 = INTEGER: 17
SNMPv2-SMI::experimental.1.1.18 = INTEGER: 18
SNMPv2-SMI::experimental.1.1.19 = INTEGER: 19
SNMPv2-SMI::experimental.1.1.20 = INTEGER: 20
SNMPv2-SMI::experimental.1.1.21 = INTEGER: 21
SNMPv2-SMI::experimental.1.1.22 = INTEGER: 22
SNMPv2-SMI::experimental.1.1.23 = INTEGER: 23
SNMPv2-SMI::experimental.1.1.24 = INTEGER: 24
SNMPv2-SMI::experimental.1.1.25 = INTEGER: 25
SNMPv2-SMI::experimental.1.1.26 = INTEGER: 26
SNMPv2-SMI::experimental.1.1.27 = INTEGER: 27
SNMPv2-SMI::experimental.1.1.28 = INTEGER: 28
SNMPv2-SMI::experimental.1.1.29 = INTEGER: 29
SNMPv2-SMI::experimental.1.1.30 = INTEGER: 30
SNMPv2-SMI::experimental.1.1.31 = INTEGER: 31
SNMPv2-SMI::experimental.1.1.32 = INTEGER: 32
SNMPv2-SMI::experimental.1.1.33 = INTEGER: 33
SNMPv2-SMI::experimental.1.1.34 = INTEGER: 34
SNMPv2-SMI::experimental.1.2.1 = STRING: "md0"
SNMPv2-SMI::experimental.1.2.2 = STRING: "md1"
SNMPv2-SMI::experimental.1.2.3 = STRING: "md2"
SNMPv2-SMI::experimental.1.2.4 = STRING: "md10"
SNMPv2-SMI::experimental.1.2.5 = STRING: "md11"
SNMPv2-SMI::experimental.1.2.6 = STRING: "md12"
SNMPv2-SMI::experimental.1.2.7 = STRING: "md40"
SNMPv2-SMI::experimental.1.2.8 = STRING: "md41"
SNMPv2-SMI::experimental.1.2.9 = STRING: "md42"
SNMPv2-SMI::experimental.1.2.10 = STRING: "md50"
SNMPv2-SMI::experimental.1.2.11 = STRING: "md51"

As far as i can tell it looks ok, but I'm not able to get anything from the gui. Any input would be helpful

One thing i just noticed in addition is this.

snmpwalk -v2c -c xxxxxx host_addr .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: "0"
SNMPv2-SMI::experimental.1.11.5 = STRING: "0"
SNMPv2-SMI::experimental.1.11.6 = STRING: "0"
SNMPv2-SMI::experimental.1.11.7 = STRING: "1"
SNMPv2-SMI::experimental.1.11.8 = STRING: "1"
SNMPv2-SMI::experimental.1.11.9 = STRING: "0"
SNMPv2-SMI::experimental.1.11.10 = STRING: "0"
SNMPv2-SMI::experimental.1.11.11 = STRING: "0"
SNMPv2-SMI::experimental.1.11.12 = STRING: "0"
SNMPv2-SMI::experimental.1.11.13 = STRING: "0"
SNMPv2-SMI::experimental.1.11.14 = STRING: "0"
SNMPv2-SMI::experimental.1.11.15 = STRING: "0"
SNMPv2-SMI::experimental.1.11.16 = STRING: "0"
SNMPv2-SMI::experimental.1.11.17 = STRING: "1"
SNMPv2-SMI::experimental.1.11.18 = STRING: "1"
SNMPv2-SMI::experimental.1.11.19 = STRING: "0"
SNMPv2-SMI::experimental.1.11.20 = STRING: "0"
SNMPv2-SMI::experimental.1.11.21 = STRING: "9"
SNMPv2-SMI::experimental.1.11.22 = STRING: "0"
SNMPv2-SMI::experimental.1.11.23 = STRING: "4"
SNMPv2-SMI::experimental.1.11.24 = STRING: "0"
SNMPv2-SMI::experimental.1.11.25 = STRING: "4"
SNMPv2-SMI::experimental.1.11.26 = STRING: "9"
SNMPv2-SMI::experimental.1.11.27 = STRING: "9"
SNMPv2-SMI::experimental.1.11.28 = STRING: "8"
SNMPv2-SMI::experimental.1.11.29 = STRING: "0"
SNMPv2-SMI::experimental.1.11.30 = STRING: "0"
SNMPv2-SMI::experimental.1.11.31 = STRING: "0"
SNMPv2-SMI::experimental.1.11.32 = STRING: "0"
SNMPv2-SMI::experimental.1.11.33 = STRING: "0"
SNMPv2-SMI::experimental.1.11.34 = STRING: "0"
Timeout: No Response from x.x.x.x
mofekka
Posts: 2
Joined: Fri Jul 02, 2010 6:35 pm

Post by mofekka »

when i attempt to create the iostat graphs in cacti I get this:

+ 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:

Timeout: No Response from <host>


iostat.pl seems to run and I have output in /tmp/iostat.cache

any ideas how to get this to work?
starfish
Posts: 15
Joined: Thu May 27, 2010 4:46 am

iostat query does not delivers results

Post by starfish »

Hi,

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. I have spent some time on debugging and searching for advice, but so far without success.

On the Cacti web gui, verbose query (e.g. for "iostat - kBytes/sec") 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


If I hit the green circle next to the data query or click the link to run the verbose query, I can see on the target server that a lot of snmp requests are received and answered (tcpdump output). I can see the corresponding traffic on the Cacti server, therefor my *guess* is, that data is received but not interpreted.

So what can be the reason for cacti telling me that no data is available? How can I find out what's wrong?

Thanks!
in2deep
Posts: 22
Joined: Thu Jan 13, 2011 9:39 pm

Re: Linux extended iostat template and scripts

Post by in2deep »

It's possible to use this template to monitor nfs mount points? When we execute iostat, it only give me the local devices. Btw, I also tried to execute with -n option, but iostat command doesn't support -n option on my os. Thanks inadvance for your suggestions/comments.

Red Hat Enterprise Linux AS release 4 (Nahant Update 5)
cacti 8.7g
snmp 5.1.2

Tho
Operating System:Linux version 2.6.18-164.el5
Webserver: Apache/2.2.17
Cacti:8.7g
Spine:rpm 8.7g
MySQL:Server version: 5.5.8
PHP: 5.3.5
RRDTool (Cygwin or Win32 version): 1.4.4
Net-SNMP: 5.3
Plugin Architecture: 2.8
fher98
Posts: 5
Joined: Wed Feb 09, 2011 11:39 pm

Re: Linux extended iostat template and scripts

Post by fher98 »

Are the scripts on the first post still the latest?
fher98
Posts: 5
Joined: Wed Feb 09, 2011 11:39 pm

Re: Linux extended iostat template and scripts

Post by fher98 »

Install version 1.4 of the iostats.. and after running

snmpwalk -v1 -c public MYSERVER .1.3.6.1.3.1.2

I get nothing... just a new line.

Help please.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest