File Check Monitoring Threshold problem

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
twistedfirestarter
Posts: 1
Joined: Sat Jul 08, 2017 11:56 am

File Check Monitoring Threshold problem

Post 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.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: File Check Monitoring Threshold problem

Post 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
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked