[CentOS] nagios check_local_disk failing

Tris Hoar trishoar at bgfl.org
Thu May 14 11:33:17 UTC 2015


On 14/05/2015 02:42, Tim Dunphy wrote:
> Hey all,
>
> I have a local disk check defined which is giving me an error:
>
> Current Status:
>    UNKNOWN
>   (for 0d 0h 1m 38s)Status Information:Unknown argument
> Usage:
> check_disk -w limit -c limit [-W limit] [-K limit] {-p pathPerformance Data:-x
> device} [-C] [-E] [-e] [-f] [-g group ] [-k] [-l] [-M] [-m] [-R path ] [-r
> path ] [-t timeout] [-u unit] [-v] [-X type] [-N type] [-n]
>
>   I have a local check setup like this in the server's config:
>
> define service{
>          use                             local-service         ; Name of
> service template to use
>          host_name                       monitor1
>          service_description             Root Partition
>          check_command                   check_local_disk!20%!10%!/
>          }
>
> It's attempting to do a local disk check on the nagios server itself. Not
> an NRPE check.
>
> This is the command definition:
>
> # 'check_local_disk' command definition
> define command{
>          command_name    check_local_disk
>          command_line    $USER1$/check_disk -w $ARG1$ -c $ARG2$ -p $ARG3$ -x
> $ARG4$
>          }
>
> Can someone please tel me where I'm going wrong?
>
> Thanks,
> Tim
>

You need to remove the 4th argument if you are not using it

[root at nagios plugins]# ./check_disk -w 20 -c 10 -p / -x
./check_disk: option requires an argument -- 'x'
Unknown argument
Usage:
  check_disk -w limit -c limit [-W limit] [-K limit] {-p path | -x device}
[-C] [-E] [-e] [-g group ] [-k] [-l] [-M] [-m] [-R path ] [-r path ]
[-t timeout] [-u unit] [-v] [-X type]
[root at nagios plugins]# ./check_disk -w 20 -c 10 -p /
DISK OK - free space: / 20848 MB (92% inode=97%);| 
/=1670MB;23711;23721;0;23731

Tris


*************************************************************
This email and any files transmitted with it are confidential
and intended solely for the use of the individual or entity 
to whom they are addressed. If you have received this email 
in error please notify postmaster at bgfl.org

The views expressed within this email are those of the 
individual, and not necessarily those of the organisation
*************************************************************


More information about the CentOS mailing list