check_nrpe issue
-
dimitri_ak
- Posts: 6
- Joined: Fri May 08, 2015 7:21 am
check_nrpe issue
Hi everyone,
I have a problem and I don't know where I can find a solution. Please help me.
I have the latest nagios core installed on centos 7. Except others checking commands I used check_nrpe to monitor windows processes. I have the following issue: I can have a status of all processes except, for example, notepad++.exe or any others which have special chars. How can I resolve this issue?
I have a problem and I don't know where I can find a solution. Please help me.
I have the latest nagios core installed on centos 7. Except others checking commands I used check_nrpe to monitor windows processes. I have the following issue: I can have a status of all processes except, for example, notepad++.exe or any others which have special chars. How can I resolve this issue?
Re: check_nrpe issue
Please post your service definition for the notepad++.exe one.
I know it works from the command line like this:
Or this:
You might try escaping it:
I know it works from the command line like this:
Code: Select all
./check_nrpe -H 192.168.5.232 -c check_process -a notepad++.exeCode: Select all
./check_nrpe -H 192.168.5.232 -c check_process -a notepad\+\+.exeCode: Select all
notepad\+\+.exe-
dimitri_ak
- Posts: 6
- Joined: Fri May 08, 2015 7:21 am
Re: check_nrpe issue
Thanks for response.
I have already tried your variants, it didn't help:
CRITICAL: notepad++.exe: stopped < critical|'notepad++.exe'=0;0;1
I have already tried your variants, it didn't help:
CRITICAL: notepad++.exe: stopped < critical|'notepad++.exe'=0;0;1
Re: check_nrpe issue
I tried the "legacy" check_nt and it worked just fine:
I will test it with "check_nrpe" as well but if it doesn't work, you can always use "check_nt". 
Update: check_nrpe worked fine for me, too.
In the nsclient.ini:
Testing from the CLI:
Code: Select all
/usr/local/nagios/libexec/check_nt -H x.x.x.x -s "password" -p 12489 -v PROCSTATE -l notepad++.exe -d SHOWALL
notepad++.exe: RunningUpdate: check_nrpe worked fine for me, too.
In the nsclient.ini:
Code: Select all
alias_process = check_process "process=$ARG1$" "crit=state != 'started'"Code: Select all
/usr/local/nagios/libexec/check_nrpe -H x.x.x.x -c alias_process -a notepad++.exe
OK: |'notepad++.exe state'=1;0;1Be sure to check out our Knowledgebase for helpful articles and solutions!
-
dimitri_ak
- Posts: 6
- Joined: Fri May 08, 2015 7:21 am
Re: check_nrpe issue
I also tried check_nrpe on other server with the same version of nagios and it worked fine.
So I have a question what component I missed? Maybe there is some additional plugin for supporting special chars (like + and -)?
So I have a question what component I missed? Maybe there is some additional plugin for supporting special chars (like + and -)?
-
jdalrymple
- Skynet Drone
- Posts: 2620
- Joined: Wed Feb 11, 2015 1:56 pm
Re: check_nrpe issue
My off the cuff guess would be that it's related to nsclient versions and the "allow nasty characters" setting in nsclient.ini. In order to know for sure I'd have to setup a test scenario - but in lieu of doing that I'd prefer to just recommend you use the most current version of nsclient you are able to and set the "allow nasty characters" to 1 where necessary.
-
dimitri_ak
- Posts: 6
- Joined: Fri May 08, 2015 7:21 am
Re: check_nrpe issue
I installed the latest version of NSClient++ and set "allow nasty characters" to true - it didn't help. Could you tell me where I should find the problem on client side or on server side?
I should say that I have a problem only with checking the process that contain "+" and "-".
I should say that I have a problem only with checking the process that contain "+" and "-".
-
jdalrymple
- Skynet Drone
- Posts: 2620
- Joined: Wed Feb 11, 2015 1:56 pm
Re: check_nrpe issue
If it works on one server and not another, it wouldn't be related to nagios. The only thing that would really come into play would be the check_nrpe binary, or how the arguments are being passed on the command line. You're saying that both servers work OK as long as there are no special characters, but only 1 works OK with special characters (to the same client).
Also - we've never seen what your error is, you've only told us "it doesn't work" - knowing an error output might be helpful in debugging.
Also - we've never seen what your error is, you've only told us "it doesn't work" - knowing an error output might be helpful in debugging.
-
dimitri_ak
- Posts: 6
- Joined: Fri May 08, 2015 7:21 am
Re: check_nrpe issue
This is the output of check_nrpe command:
If you need any logs it is not a problem, just say which one. Thanks.
Code: Select all
[root@nagios objects]# /usr/local/nagios/libexec/check_nrpe -H x.x.x.x -c alias_process -a notepad++.exe
CRITICAL: notepad++.exe: stopped < critical|'notepad++.exe'=0;0;1-
jdalrymple
- Skynet Drone
- Posts: 2620
- Joined: Wed Feb 11, 2015 1:56 pm
Re: check_nrpe issue
From a Nagios perspective - this is golden. Nothing is wrong here. I'm assuming that notepad++.exe was actually running when you ran the check and it gave you unexpected results? If so that is something you need to take to the nsclient forums - Nagios and NRPE are doing their job A-OK in the example you shared.dimitri_ak wrote:This is the output of check_nrpe command:If you need any logs it is not a problem, just say which one. Thanks.Code: Select all
[root@nagios objects]# /usr/local/nagios/libexec/check_nrpe -H x.x.x.x -c alias_process -a notepad++.exe CRITICAL: notepad++.exe: stopped < critical|'notepad++.exe'=0;0;1