End of line $ causing problem

I’m in the process of upgrading from Nagios v1.2 to v2.7 and ran into a problem with the $ symbol which represents end of line being passed along with my arguement variable.

The following is my services-syn.cfg:

define service{
use generic-service ; Name of service template to use

host_name prod-tx1
service_description MSSQL_FHMS
is_volatile 0
check_period 24x7
max_check_attempts 2
normal_check_interval 2
retry_check_interval 1
contact_groups synners,syn-admins
notification_interval 240
notification_period 24x7
notification_options c,r
check_command nt_service!"MSSQL\$FHMS"

}

The following is in checkcommands.cfg:

define command{
command_name nt_service
command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -c nt_service -a $ARG1$
}

The following is in nrpe.cfg on my remote windows server:

define command{
command_name nt_service
command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -c nt_service -a $ARG1$
}

So with v2.7 I get a return of MSSQL$FHMS$ CRITICAL(INVALID_NAME)

The 2nd $ above is not part of the service name on the windows server. It appears that the end of line symbol is being passed as part of the ARG variable.

I can run all of the above as is in v1.2 and it works.

Any assistance would be appreciated.

Thanks

I just read a posted titled “check_nt” and the person had a similar problem as mine…so I changed my check_command to “MSSQL$”$“FHMS” and it worked. not quite sure how but I’m glad it did. :slight_smile: