Search Exchange

Search All Sites

Nagios Live Webinars

Let our experts show you how Nagios can help your organization.

Contact Us

Phone: 1-888-NAGIOS-1
Email: sales@nagios.com

Login

Remember Me

Directory Tree

check_disk_io_stats

Current Version
1.01
Last Release Date
2013-10-25
Compatible With
  • Nagios 3.x
License
GPL
Hits
32507
Files:
FileDescription
check_disk_io_statsv 1.01 -- fixed a bug
Nagios CSP

Meet The New Nagios Core Services Platform

Built on over 25 years of monitoring experience, the Nagios Core Services Platform provides insightful monitoring dashboards, time-saving monitoring wizards, and unmatched ease of use. Use it for free indefinitely.

Monitoring Made Magically Better

  • Nagios Core on Overdrive
  • Powerful Monitoring Dashboards
  • Time-Saving Configuration Wizards
  • Open Source Powered Monitoring On Steroids
  • And So Much More!
Check IO and IOPS for a device on a linux system. This check uses the /sys/block/device/stat file to calculate disk stats during a given period of time. Provides perfdata so it can be graphed.
This is a python rewrite of a few shell and perl versionns that I found in the exchange. I think it is simpler than the perl and more robust than the shell ones. There are ample comments in the script, but here is what it looks like when you run it with the verbose option.

[nagios@stage-ha1-db01 libexec]$ ./check_disk_io_stats --help
Usage: check_disk_io_stats [options]

Calculate disk io statistics based on /sys/block//stat.

Options:
--version show program's version number and exit
-h, --help show this help message and exit
-d DEVICE device name listed under /sys/block
-s STATS_TYPE type of disk statistic to check, valid values are io and iops
-f STATS_FILE path to the file containing historical statistics
-w WARN warn threshold
-c CRITICAL critical threshold
-v print verbose output


[nagios@stage-ha1-db01 libexec]$ ./check_disk_io_stats -d drbd0 -f /tmp/drbd_io_stat.tmp -s io -w 500 -c 1000 -v
[User Arguments]
critical 1000
device drbd0
stats_file /tmp/drbd_io_stat.tmp
stats_type io
verbose True
warn 500

[Stats File]
write 0
read 0
epoch 1380145289
offset na
device drbd0
total na
stats_type io
tstamp Sep-25-2013 02:41 PM

[Device File]
write 0
read 0
epoch 1380145315
offset na
device drbd0
total na
stats_type io
tstamp Sep-25-2013 02:41 PM

[Delta]
write 0
read 0
epoch 1380145315
offset 26
device drbd0
total 0
stats_type io
tstamp Sep-25-2013 02:41 PM

OK - device: drbd0, interval: 26sec, read(mb)/write(mb)/total(mb): 0/0/0 warn/critical: 500/1000|readio=0, writeio=0, totalio=0