-
Notifications
You must be signed in to change notification settings - Fork 15
-
Hi,
trying to check if a file exists
in nsclient this workes for us:
/usr/local/nagios/libexec/check_nrpe -H 192.168.83.226 -p 5666 -c check_files -a "path=c:/program files/" pattern=CDPConfig.exe "filter=version >= '1.0'" "detail-syntax=%(filename): %(version)" show-all
Trying the same thing with snclient:
filter for version is not possible
/usr/local/nagios/libexec/check_nrpe -H 192.168.83.226 -p 5666 -c check_files -a "path=c:/program files/" pattern=CDPConfig.exe "top-syntax=%(name)"
gives me:
%(name) |'count'=1;;;0 'size'=251392B;;;0
Seems like the variable ist not recognized. tried it with name filename
with show-all (which is not in the official documentation) i get the almost the result that i want
/usr/local/nagios/libexec/check_nrpe -H 192.168.83.226 -p 5666 -c check_files -a "path=c:/program files/" pattern=CDPConfig.exe show-all
Beta Was this translation helpful? Give feedback.
All reactions
Replies: 1 comment 1 reply
-
the %(version) variable is not yet implemented. Pull requests are welcome for this.
Beta Was this translation helpful? Give feedback.
All reactions
-
If I were a good programmer I would definitely do that
I'm actually more concerned with the output of %(name)
Beta Was this translation helpful? Give feedback.