Hello,
I'm trying to check a service on a windows server who contains brackets "Myservice [config] port 2345", but i receive "Could not construct return packet in NRPE handler check client side (nsclient.log) logs..." from NRPE client.
It works for other services who doesn't contain bracket....
How can i escape bracket in my configuration file ?
PS: I've already try with backslash (\).
Escaping bracket in config file
Re: Escaping bracket in config file
define service{
use generic-service ; Name of service template to use
host_name myserver
service_description myservice
check_command check_nrpe!checkServiceState!-a ShowAll 'MyService [config] port 2345'
}
use generic-service ; Name of service template to use
host_name myserver
service_description myservice
check_command check_nrpe!checkServiceState!-a ShowAll 'MyService [config] port 2345'
}
Re: Escaping bracket in config file
OK, resolved !
Just enable in nsc.ini
# COMMAND ARGUMENT PROCESSING
; This option determines whether or not the NRPE daemon will allow clients to specify arguments to commands that are executed.
allow_arguments=1
but it's too unsecure for me....
The service will not be monitor.
If someone else has a better way.... just leave a quick answer in this forum.
Thanks.
Just enable in nsc.ini
# COMMAND ARGUMENT PROCESSING
; This option determines whether or not the NRPE daemon will allow clients to specify arguments to commands that are executed.
allow_arguments=1
but it's too unsecure for me....
The service will not be monitor.
If someone else has a better way.... just leave a quick answer in this forum.
Thanks.
-
slansing
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: Escaping bracket in config file
Unfortunately, unless you create a new command definition in nsclient and hard code that whole line in there, that is the only way to do this.