Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
DrNox
Posts: 37 Joined: Wed Apr 19, 2017 9:20 am
Post
by DrNox » Mon Sep 11, 2017 8:04 am
I am using this command found on this link :
http://sites.box293.com/nagios/guides/c ... es-folders
Code: Select all
check_nrpe -H 192.168.142.1 -t 30 -c check_files -a path='C:\myFolder' pattern=*.* 'critical=count>0' top-syntax='${status}: ${problem_count}/${count} files' 'empty-state=ok'
When i do it on my empty folder ( i want to be sure that he is empty (that's why i want to manage him ^^), i got an Unknow : no file found.
Do you know how to correct it ?
Thanks for you eventually answer
French Baguette
scottwilkerson
DevOps Engineer
Posts: 19396 Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:
Post
by scottwilkerson » Mon Sep 11, 2017 4:26 pm
What version of NSClient do you have? The site says
NSClient++ 0.4.3.138 onwards
DrNox
Posts: 37 Joined: Wed Apr 19, 2017 9:20 am
Post
by DrNox » Tue Sep 12, 2017 2:33 am
Hey,
I am using the 4.3.2 version
French Baguette
scottwilkerson
DevOps Engineer
Posts: 19396 Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:
Post
by scottwilkerson » Tue Sep 12, 2017 7:54 am
DrNox wrote: Hey,
I am using the 4.3.2 version
This sounds like your Nagios version. I'm looking for your NSClient version on the Windows machine.
DrNox
Posts: 37 Joined: Wed Apr 19, 2017 9:20 am
Post
by DrNox » Tue Sep 12, 2017 8:00 am
.... sry, i failed ^^
I'am using : NSCP-0.5.0.62-x64
French Baguette
scottwilkerson
DevOps Engineer
Posts: 19396 Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:
Post
by scottwilkerson » Tue Sep 12, 2017 8:51 am
I just looked at your command again and I think you are missing a \ in the drive location
Instead of
Code: Select all
check_nrpe -H 192.168.142.1 -t 30 -c check_files -a path='C:\myFolder' pattern=*.* 'critical=count>0' top-syntax='${status}: ${problem_count}/${count} files' 'empty-state=ok'
should be
Code: Select all
check_nrpe -H 192.168.142.1 -t 30 -c check_files -a path='C:\\myFolder' pattern=*.* 'critical=count>0' top-syntax='${status}: ${problem_count}/${count} files' 'empty-state=ok'
Last edited by
scottwilkerson on Tue Sep 12, 2017 10:08 am, edited 1 time in total.
Reason: edited code
DrNox
Posts: 37 Joined: Wed Apr 19, 2017 9:20 am
Post
by DrNox » Tue Sep 12, 2017 10:02 am
Hum, I don't see the difference It's the same code
French Baguette
scottwilkerson
DevOps Engineer
Posts: 19396 Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:
Post
by scottwilkerson » Tue Sep 12, 2017 10:08 am
DrNox wrote: Hum, I don't see the difference It's the same code
sorry about that, I updated it. it is right after path=
DrNox
Posts: 37 Joined: Wed Apr 19, 2017 9:20 am
Post
by DrNox » Wed Sep 13, 2017 4:55 am
HI, thanks for your answer.
I did you change but i got the same error :
WarningNofileFound.PNG (7.15 KiB) Viewed 3021 times
French Baguette
scottwilkerson
DevOps Engineer
Posts: 19396 Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:
Post
by scottwilkerson » Wed Sep 13, 2017 8:34 am
More research and it looks like there is a bug in NSClient in several versions, I just found this:
https://forums.nsclient.org/t/check-fil ... tatus/4109
According to one poster they resolved the issue by updating to 0.5.x and changing the order to:
Code: Select all
check_nrpe -H 192.168.142.1 -t 30 -c check_files -a path='C:\\myFolder' pattern=*.* 'critical=count>0' 'empty-state=ok' top-syntax='${status}: ${problem_count}/${count} files'