Page 1 of 1

File Check Monitoring Threshold problem

Posted: Sat Jul 08, 2017 12:17 pm
by twistedfirestarter
My company are trialing Nagios XI and I want to setup some file check monitoring.

I require a monitor that will show Critical if a file is not present in a given Linux directory.
(I already have working nagios monitors for the same file, regarding file size and age).

check_file_service!-C 'ssh nagios@$HOSTADDRESS$ ls -l /dirname' -F 'filename*' -T 'files'! -w >1 -c <1

This, and other combinations, are failing with an error that advises that the threshold requirements are that -w needs to be lower than -c. I haven't been able to get a 'Critical' for file absence.

Any advise welcome. Thank you.

Re: File Check Monitoring Threshold problem

Posted: Mon Jul 10, 2017 10:05 am
by lmiltchev
Try changing this:

Code: Select all

check_file_service!-C 'ssh nagios@$HOSTADDRESS$ ls -l /dirname' -F 'filename*' -T 'files'! -w >1 -c <1
to this:

Code: Select all

check_file_service!-C 'ssh nagios@$HOSTADDRESS$ ls -l /dirname' -F 'filename*' -T 'files'! -w 1 -c 1:
See more about thresholds and ranges here: https://nagios-plugins.org/doc/guidelin ... HOLDFORMAT