Not to discourage positive change, but as Stanley Hopcroft mentioned roughly
14 hours ago, the length of the string that a plugin can return is limited:
#define MAX_PLUGINOUTPUT_LENGTH 352
in common/objects.h
I suppose this is no different than running the plugin without specifying
any filesystem at all, except that with your tweak, one manages to avoid
NFS-mounted filesystems. On systems with a non-trivial number of
filesystems, the output will regrettably be truncated.
I suppose while we're at it, perhaps a negation option should be available
(eg, "everything *but* NFS) and/or a way to collect all the types you're
interested in, so as to make it more o/s independent, eg,
$NAGIOS_HOME/libexec/check_disk -w 20 -c 5 -F ufs,ext3
Food for thought.
jc
> -----Original Message-----
> From: Potter, G M (Greg) [mailto:GPotter@MarathonOil.com]
> Sent: Wednesday, February 05, 2003 8:36 AM
> To: nagios-devel@lists.sourceforge.net
> Subject: [Nagios-devel] check_disk plugin request for modification
>
>
> 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
> 78c77
> ---
> > asprintf (&command_line, "%s %s", DF_COMMAND, path);
> 155d153
> 174c172
> "Vhvt:c:w:p:F:m", long_options, &option_index);
> ---
> > getopt_long (argc, argv,
> "Vhvt:c:w:p:m", long_options, &option_index);
> 176c174
> ---
> > c = getopt (argc, argv, "Vhvt:c:w:p:m");
> 226,228d223
> /* Filesystem Type*/
>
>
>
> 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!
> ~~|\
> / | \
> ~^~^~^~ / | \ ~^~^~^~^
> ~^~^~ / 9255 ) ~^~^^~~^^~^
> ~^~^____/____|____)_____^~^^~^~^~^
> ~^~^ \ Greg Potter / ^~^~^~^~^~^~^
> ~^~^~^~^\_Okla. City, OK_/~^~^~^~^~^~~^~^~^~
>
>
>
> -------------------------------------------------------
> This SF.NET email is sponsored by:
> SourceForge Enterprise Edition + IBM + LinuxWorld =omething 2 See!
> http://www.vasoftware.com
> _______________________________________________
> Nagios-users mailing list
> Nagios-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/lis ... gios-users
>
>
> -------------------------------------------------------
> This SF.NET email is sponsored by:
> SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
> http://www.vasoftware.com
> _______________________________________________
> Nagios-devel mailing list
> Nagios-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/lis ... gios-devel
>
This post was automatically imported from historical nagios-devel mailing list archives
Original poster: jcarro10@sprintspectrum.com