Issue with nrpe_arguments - not sure how to proceed

nagios-plugins

(Tom) #1

Hi,

I am currently having an issue with Icinga2 regarding the nrpe checks that I am running on a couple of our services.

Basically I am encountering an error when I want to monitor this service:
vars.nrpe_arguments = “service=MSSQL$MAMUT”

The following error is returned:
type ‘Service’; Attribute ‘vars’ -> ‘nrpe_arguments’: Closing $ not found in macro format string ‘service=SQLAgent$MAMUT’.

Now I believe that this is saying, it requires another “$” but due to this being within the service I want to monitor I do not need to put another in. Is there a way around this ?

Any help appreciated.

Thanks


#2

Within the service definition it is assumed to be the beginning of a variable name ending with another dollar sign. Try to escape the dollar sign with a backslash
vars.nrpe_arguments = “service=MSSQL\$MAMUT”


(Brian LaVallee) #3

See Runtime Macros.

When using the $ sign as single character you must escape it with an additional dollar character ( $ ).

vars.nrpe_arguments = “service=MSSQL$$MAMUT”

(Tom) #4

This worked, thank you!