I hope this is easy. I've been staring at it so long I am sure it's simple and I just don't see it.
This command works from the command line of my nagios core server:
./check_nrpe -H xxx.xxx.xxx.245 -t 30 -c CheckFiles -a path='C:\' pattern=*.MOLE02 'filter=size gt 0b' 'master-syntax={%total% Files Found}' MaxCrit=1
Here is the response:
{4 Files Found}, found files: 4 > critical|'found files'=4;0;1
Here is my windows.cfg service that does not work:
define service{
use generic-service
host_name FS.XXX.Com
service_description MOLE
check_command check_nrpe!check_files!path='c:\\' pattern=*.MOLE02 'warning=count>1' 'critical=count>2' top-syntax='${status}: ${problem_count}/${count} files' 'empty-state=ok'
}
Here is the nrpe command from commands.cfg:
define command {
command_name check_nrpe
command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -t 90 -c $ARG1$ $ARG2$
}
I would greatly appreciate being pointed in the right direction,
Thanks
Jason
NRPE work from command line but not from windows.cfg
Re: NRPE work from command line but not from windows.cfg
You are missing the -a from the $ARG2$ field in the service check.
Try changing the command to the following and see if that fixes the issue.
Try changing the command to the following and see if that fixes the issue.
Code: Select all
check_command check_nrpe!check_files!-a path='c:\\' pattern=*.MOLE02 'warning=count>1' 'critical=count>2' top-syntax='${status}: ${problem_count}/${count} files' 'empty-state=ok'
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: NRPE work from command line but not from windows.cfg
I added the "-a" but it did not help, but in the end it was required.
After a LOT of more reading and searching, I updated to the newest nsclient++ and it resolved the issue for me.
So I had two issues. You helped by having me add the "-a" and I also updated the client.
Thank you! Your advice caused me to search further and I found several comments on bug fixes in the newer versions.
Thanks again!
Jason
After a LOT of more reading and searching, I updated to the newest nsclient++ and it resolved the issue for me.
So I had two issues. You helped by having me add the "-a" and I also updated the client.
Thank you! Your advice caused me to search further and I found several comments on bug fixes in the newer versions.
Thanks again!
Jason
Re: NRPE work from command line but not from windows.cfg
I am glad your issue has been resolved! Can we close this thread?
Be sure to check out our Knowledgebase for helpful articles and solutions!