I would like to propose the following modification to the check_disk =
plugin.
I recommend the addition of a filesystem type argument. That way if you
are interested in all of the local disks on a system of a particular =
type,
say ufs or NFS or etc ... you can get them with only one service check. =
It
could be called as follows:
$NAGIOS_HOME/libexec/check_disk -w 20 -c 5 -F ufs
The output would look like this:
DISK OK - [1671397 kB (45%) free on /dev/dsk/c0t0d0s0] [8919218 kB (51%) =
free on /dev/dsk/c1t3d0s7] [13286705 kB (84%) free on /dev/dsk/c1t8d0s6]
or this:
$NAGIOS_HOME/libexec/check_disk -w 20 -c 5 -F nfs
DISK OK - [20093957 kB (14%) free on =
okcu09:/moc/okc/okcu09/vol1/home/tc8] [20093957 kB (14%) free on =
okcu09:/moc/okc/okcu09/vol1/home/nagios] [47978332 kB (19%) free on =
okcu09:/moc/okc/okcu09/vol3/apps/SunOS/OW6] [16588315 kB (96%) free on =
okcu10:/moc/okc/okcu10/db1/oracle816] [47978332 kB (19%) free on =
okcu09:/moc/okc/okcu09/vol3/apps/SunOS/nagios] [47978332 kB (19%) free =
on okcu09:/moc/okc/okcu09/vol3/apps/common]
Here is the diff of check_disk.c and check_disk_fstype.c :
56d55
asprintf (&command_line, "%s %s", DF_COMMAND, path);
155d153
getopt_long (argc, argv, "Vhvt:c:w:p:m", long_options, =
&option_index);
176c174
c =3D getopt (argc, argv, "Vhvt:c:w:p:m");
226,228d223
< case 'F': /* Filesystem Type*/
< asprintf (&fstype, "-F %s", optarg);
< break;
Please let me know what you think about the addition to the plugin.
Thanks!
Greg M. Potter
mailto:gpotter@marathonoil.com
Non Scio, id est in Latina!
~~|\
/ | \ =20
~^~^~^~ / | \ ~^~^~^~^
~^~^~ / 9255 ) ~^~^^~~^^~^
~^~^____/____|____)_____^~^^~^~^~^
~^~^ \ Greg Potter / ^~^~^~^~^~^~^
~^~^~^~^\_Okla. City, OK_/~^~^~^~^~^~~^~^~^~
-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld =3Domething 2 See!
http://www.vasoftware.com
_______________________________________________
Nagios-users mailing list
Nagios-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/lis ... gios-users
This post was automatically imported from historical nagios-devel mailing list archives
Original poster: GPotter@MarathonOil.com