Page 1 of 1

NRPE For windows

Posted: Wed May 31, 2017 9:00 am
by DrNox
Hello,
I am new on Nagios and I am trying to use NRPE for manage my windows service.
I want to manage specific service like the service "Power" and want to see if he is started or not. ( I succes with check_nt )
But actually i got some error :
Critical: MMCSS=stopped(auto),delayed
(clr_optimization_v4.0.30319_32=stopped
(delayed)
clr_optimization_v4.0.30319_64=stopped
(delayed),sppsvc=stopped (delayed))
with this code on the winprod.cfg file :

Code: Select all

    define service{
               use                  local-service
               host_name             windowsPC
               service_description   Power
               check_command        check_nrpe_1arg!alias_service service=Power "critical=state ='stopped'"
}
And on my nsclient.ini i got this :

Code: Select all

[/External Alias]
alias_cpu=checkCPU warn=90 crit=95 time=1m time=5m time=15m
alias_service=checkServiceState CheckAll
I try lot of form for the check_command with the same result :
-check_nrpe!alias_service
-check_nrpe!alias_service!Power
-check_nrpe!alias_service "Power"
-etc...


If someone can help me/guide me to succes this, it would be amazing :)

Re: NRPE For windows

Posted: Wed May 31, 2017 3:13 pm
by avandemore
Have you seen our agent NCPA?

https://www.nagios.org/ncpa/help.php

Re: NRPE For windows

Posted: Thu Jun 01, 2017 2:13 am
by DrNox
Yeah i know NSCA, but i prefer to use NRPE.
I succes to correct my error, but I just don't understand what is the signification of the error :
Critical: MMCSS=stopped(auto),delayed
(clr_optimization_v4.0.30319_32=stopped
(delayed)
clr_optimization_v4.0.30319_64=stopped
(delayed),sppsvc=stopped (delayed))
Can you explain me what is it ?

Re: NRPE For windows

Posted: Thu Jun 01, 2017 9:12 am
by avandemore
Please show the full command and output when run from the CLI.

Re: NRPE For windows

Posted: Thu Jun 01, 2017 9:17 am
by DrNox
CLI ? you mean client ?

I have an other question, if you could answer it would be nice :
I don't understand what file call what file : when i want to use one chek, winprod.cfg call the rigth service which will call the command on commands.cfg. This command call nsclient on the windows computer. This is it ?

Re: NRPE For windows

Posted: Thu Jun 01, 2017 11:21 am
by avandemore
CLI stands for command line interface. Nagios Core works by taking a check(service|host) with some arguments and passing that off to a command with is a plugin with some optional arguments then is run in a shell.

What I would like to see is what is the full syntax of what your Nagios Core is attempting to run. If you don't understand how to read the Core configuration files and what that would expand to in terms of an actual executed check, then it may be easiest to turn on debug logging for Nagios Core, then providing that.

You can do so by edit nagios.cfg and setting the values:

Code: Select all

debug_file=<wherelogshouldbe>
debug_level=-1
debug_verbosity=2
max_debug_file_size=9000000
You can find more information on these settings here:
https://assets.nagios.com/downloads/nag ... gmain.html

Save that file, restart Core, then wait long enough for the check to run and be logged. Then you can attach the debug log.

Re: NRPE For windows

Posted: Wed Jun 21, 2017 1:29 pm
by tmcdonald
Just checking in since we have not heard from you in a while. Did @avandemore's post clear things up or has the issue otherwise been resolved?

Re: NRPE For windows

Posted: Tue Jul 11, 2017 8:52 am
by DrNox
hello,
Sorry for the delay, yes it's okey now ^.^