Home Directory

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

Directory

konstantin

Reviews(2)
bykonstantin, May 14, 2012
Hi,

I want to add 2 Hints. The Expression from comma to point is not needed. Just export LANG=C in the script. Then the output of iostat will be dotted.

The second is that I would suggest to use #!/bin/bash as interpreter due to the fact that /bin/sh is linked to /bin/dash in newer distributions. And this script will not work without it.
bykonstantin, May 7, 2012
Iostat - check_tps
/usr/bin/iostat -d /dev/sda -t 58 2 | awk 'NR==9{print $2}' > /var/lib/nagios/iostat/tps.tmp && mv /var/lib/nagios/iostat/tps.tmp /var/lib/nagios/iostat/tps

ich have changed the cronjob like this using one awk to get the right value. And I also used other log locations due to linux FHS.

May be this is better... or not... just wanted to post ;-)