Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Check_files #70

Justice81 started this conversation in General
Dec 15, 2023 · 1 comments · 1 reply
Discussion options

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

You must be logged in to vote

Replies: 1 comment 1 reply

Comment options

the %(version) variable is not yet implemented. Pull requests are welcome for this.

You must be logged in to vote
1 reply
Comment options

If I were a good programmer I would definitely do that

I'm actually more concerned with the output of %(name)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants

AltStyle によって変換されたページ (->オリジナル) /