monitoring for IO in Nagios

Alexander Harvey alexh19740110 at gmail.com
Mon Oct 16 15:53:23 CEST 2006


That doesn't look like a Solaris script to me but as far as your coding is
concerned, my thoughts are

(i) get yourself a book on the k-shell 'cause it's a lot more powerful that
the bourne (/bin/sh) shell.
(ii) you can say
vmstat -dp | awk '/sda/ {print $2}'
instead of
vmstat -dp | grep sda | awk '{print $2}'
(iii) if you were using bash or ksh your could say
readdiff=$(( $currreads - $prevreads ))
instead of
readdiff=$(expr $currreads - $prevreads)
(iv) for security you ought to use full paths to all of your binaries:
i.e.
/usr/bin/echo
instead of
echo

Otherwise I guess it'll work in Nagios (although most Nagios plugins can
give warnings or critical alerts by exiting with exit codes 0 for OK, or 1
for WARNING, or 2 for CRITICAL.

Have fun,
Alex


On 10/16/06, August Simonelli <augusts at gmail.com> wrote:
>
> Hi Alexander and list folks,
>
> I set up two little shell scripts for disk i/o calculations for mrtg which
> i hope to use for nagios down the track. I'm still learning shell scripting
> /nagios / etc so i welcome corrections to my logic, coding, anything! :-)
>
> It's not really fancy, just uses vmstat to get disk reads and writes,
> stores it, then compares that the next time.
>
> As i said, it's just for mrtg now so dunno if it will work for nagios, but
> soon i'll play with it and find out.
>
> August
>
>
>
> On 10/15/06, Alexander Harvey <alexh19740110 at gmail.com> wrote:
>
> > Hi All,
> >
> > I wonder if anyone out there is using Nagios to monitor disk I/O on UNIX
> > servers and if so I'm curious as to how they're doing it, what plugins
> > they're using, are they calling iostat from a shell script? What options of
> > iostat are they calling etc?
> >
> > Many thanks in advance,
> >
> > Alex Harvey
> > UNIX Administrator
> > Sydney, Australia
> >
> >
> > -------------------------------------------------------------------------
> > Using Tomcat but need to do more? Need to support web services,
> > security?
> > Get stuff done quickly with pre-integrated technology to make your job
> > easier
> > Download IBM WebSphere Application Server v.1.0.1 based on Apache
> > Geronimo
> > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> >
> > _______________________________________________
> > Nagios-users mailing list
> > Nagios-users at lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/nagios-users
> > ::: Please include Nagios version, plugin version (-v) and OS when
> > reporting any issue.
> > ::: Messages without supporting info will risk being sent to /dev/null
> >
> >
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/users/attachments/20061016/3413471e/attachment.html>
-------------- next part --------------
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
-------------- next part --------------
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null


More information about the Users mailing list