*.*wildcard to monitor all file types?

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
kadaw978
Posts: 27
Joined: Mon Feb 29, 2016 1:58 pm

*.*wildcard to monitor all file types?

Post 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).
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

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

Post 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
Former Nagios employee
https://www.mcapra.com/
Locked