Page 1 of 1

*.*wildcard to monitor all file types?

Posted: Mon Jul 25, 2016 2:43 pm
by kadaw978
Hello,

When doing a check command for files within a directory using *.* as the pattern, Nagios is reporting that there are 2 files in that directory. However, this is false since no such files (even hidden files) exists. My question is, is *.* valid to check to see if any file type exists in that directory, or how can I check for multiple file types, or do I need to upgrade to the latest version of NSCLIENT++?

Thanks,


NOTE: We are still using legacy version of NSCLIENT++ (3.9).

Re: *.*wildcard to monitor all file types?

Posted: Mon Jul 25, 2016 3:31 pm
by mcapra
I was never able to do this consistently with 0.3.9. Which isn't to say that it can't be done, but the CheckFiles portion of 0.3.9 seems to have consistency issues. Also the internal command name changed between 0.3.9 and 0.4.3.

Against 0.3.9:

Code: Select all

[root@localhost libexec]# ./check_nrpe -H 192.168.3.4 -c CheckFiles -a path='C:\Users\Aaron\Documents' pattern=*.*
Parsing failed:
Against 0.4.3:

Code: Select all

[root@localhost libexec]# ./check_nrpe -H 192.168.3.4 -c check_files -a path='C:\Users\Aaron\Documents' pattern=*.*
OK: All 6 files are ok