Hi,
I would like to check with Nagios if there are at least 6 files within a certain directory younger than 3 days old. The files are located into sub directories of the main folder.
I’m currently using nsclient 0.4.3.73 x64.
The following check seems to be close but the warn count doesn’t seem to make sense to me.
check_nrpe -H 192.168.1.3 -p 5666 -c check_files -a show-all path=e:\\backup_hyperv “filter=creation gt -3d” “warn=count lt 6″
WARNING: 0/7 files (warning(20150102, vserver, Snapshots, Virtual Hard Disks, Virtual Machines), vserver.vhdx, 099DA2FB-B8FB-4A6C-B47C-94C4A13568BD.XML)|’count’=7;6;0
I should say the status should be OK since 7 is not lt 6.
Only if I change warn=count to lt 0 or 1 it provides a status OK. All higher values return a warning status.
Using “warn=count gt x” seems to work just fine because it provides a status warning when using a value 6 or lower and OK when U use values 7 or higher.
Am I missing something here of the logic or am i running into a bug?