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
31994
Files:
FileDescription
check_disk_io_statsv 1.01 -- fixed a bug
Network Monitoring Software - Download Nagios XI
Log Management Software - Nagios Log Server - Download
Netflow Analysis Software - Nagios Network Analyzer - Download
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