Monitoring in a Heterogeneous Environment [was Re: [Nagios-users] check_memory]
John Warburton
j.warburton at unsw.edu.au
Wed Feb 2 07:46:57 CET 2005
Hi All
I would like to point out that whilst Nagios is "designed to run under
Linux" (http://www.nagios.org/about.php), that many people use Nagios to
monitor other variants of Unix.
I think I am like a few others here, who have come from a Big Brother
monitoring background. The mind set of the plugin developers at BB is
that the plugins would work under many different operating systems. OS
specific stuff is flagged.
I come over to Nagios to see mainly Linux specific stuff that is not
flagged as being Linux specific. For example, the contrib memory
checking plugins (contrib/check_mem.pl and
contrib/tarballs/check_memory.tgz) are Linux specific. The C code is
obvious and won't compile anywhere else, but the perl script and the
script submitted by Trevor below have problems:
1. They ignore the man page for vmstat which says "The first report
produced gives averages since the last reboot." i.e. You need to look at
a second sample from vmstat (e.g. vmstat 1 2) to get a valid result.
2. Linux (2.4.26 for me http://www.rt.com/man/vmstat.8.html), AIX
(http://eservercomputing.com/ibmunix/articles/index.asp?sid=19&id=847&pageID=914)
and Solaris (http://bama.ua.edu/cgi-bin/man-cgi?vmstat+1M) all have
differing outputs in columns from vmstat.
So, Trevor's script below will work only on AIX. It will be wrong for
Linux & Solaris. contrib/check_mem.pl will be wrong (idle & buffer memory).
So, what am I trying to say?
1. File a bug report for contrib/check_mem.pl as it is wrong for Linux &
Solaris (at least).
2. Request that *all* plugins have some sort of #ifdef OS in them, and
try to work in multiple environments. check_disk.c is an excellent
example here.
3. Look to Big Brother as a guide to heterogeneous monitoring. The
memory script (http://www.deadcat.net/viewfile.php?fileid=804) is an
excellent example. Question - these are released under the GPL. Can
these be quickly hack for Nagios (with proper acknowledgment of the
authors) of course?
Comments? Constructive criticisms? Flames > /dev/null.
John
On 1/02/2005 7:04 PM, Trevor Warren wrote:
> Fellas!!!,
>
> My script for check_mem on aix and gnu/linux.
>
> ##########
>
> bash-2.05a# cat /usr/local/nagios/libexec/check_mem.sh
> #!/usr/bin/bash
>
> avm=`vmstat | tail -n 1 | awk '{print $3}'`
> fre=`vmstat | tail -n 1 | awk '{print $4}'`
>
-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
_______________________________________________
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