Re: Problems with $ sign in service name
Posted: Wed May 18, 2011 4:22 am
I have the same problem with a MSSQL service on a server.
I cannot confirm this sollution.
I added service monitoring by using the wizard:
Changed the line to the double $$
check_xi_service_nsclient
$USER1$/check_nt -H $HOSTADDRESS$ -s "$ARG1$" -p 12489 -v $ARG2$ $ARG3$ $ARG4$
$ARG1$
$ARG2$ SERVICESTATE
$ARG3$ -l MSSQL$$SQLEXP_VIM -d SHOWALL
Command submitted for processing...
Waiting for configuration verification.......
Configuration verification failed.
Success! Nagios Core was restarted with an updated configuration.
View configuration snapshots
An error occurred while attempting to apply your configuration to Nagios Core. Monitoring engine configuration files have been rolled back to their last known good checkpoint.
In the log file:
.....
Warning: Service 'SQL Server (SQLEXP_VIM)' on host 'SERVER.FQDN.dns' has no check time period defined!
Error: The description string for service 'SQL Server (SQLEXP_VIM)' on host 'SERVER.FQDN.dns' contains one or more illegal characters.
Total Errors: 1
***> One or more problems was encountered while running the pre-flight check...
Check your configuration file(s) to ensure that they contain valid
directives and data defintions. If you are upgrading from a previous
version of Nagios, you should be aware that some variables/definitions
may have been removed or modified in this version. Make sure to read
the HTML documentation regarding the config files, as well as the
'Whats New' section to find out what has changed.
Nagios is capable to check the service if the correct commands are executed:
ssh login to console of server as root,
cd /usr/local/nagios/libexec
[root@nagiosxi libexec]# ./check_nrpe -H 10.10.10.30 -p 5666 -c CheckServiceState -a MSSQL\$SQLEXP_VIM
OK: All services are in their appropriate state.
[root@nagiosxi libexec]# ./check_nt -H 10.10.10.30 -p 12489 -v SERVICESTATE -l MSSQL\$SQLEXP_VIM -d ShowALL
OK: All services are in their appropriate state.
If I replace the $$ with \$ in the web interface of Nagios core config, I receive also an error.
As an user, I entered the correct service name in the wizard. If there is any escaping code(s) needed, the web interface should translate this to correct commands. What to change to make this work ?
I cannot confirm this sollution.
I added service monitoring by using the wizard:
Changed the line to the double $$
check_xi_service_nsclient
$USER1$/check_nt -H $HOSTADDRESS$ -s "$ARG1$" -p 12489 -v $ARG2$ $ARG3$ $ARG4$
$ARG1$
$ARG2$ SERVICESTATE
$ARG3$ -l MSSQL$$SQLEXP_VIM -d SHOWALL
Command submitted for processing...
Waiting for configuration verification.......
Configuration verification failed.
Success! Nagios Core was restarted with an updated configuration.
View configuration snapshots
An error occurred while attempting to apply your configuration to Nagios Core. Monitoring engine configuration files have been rolled back to their last known good checkpoint.
In the log file:
.....
Warning: Service 'SQL Server (SQLEXP_VIM)' on host 'SERVER.FQDN.dns' has no check time period defined!
Error: The description string for service 'SQL Server (SQLEXP_VIM)' on host 'SERVER.FQDN.dns' contains one or more illegal characters.
Total Errors: 1
***> One or more problems was encountered while running the pre-flight check...
Check your configuration file(s) to ensure that they contain valid
directives and data defintions. If you are upgrading from a previous
version of Nagios, you should be aware that some variables/definitions
may have been removed or modified in this version. Make sure to read
the HTML documentation regarding the config files, as well as the
'Whats New' section to find out what has changed.
Nagios is capable to check the service if the correct commands are executed:
ssh login to console of server as root,
cd /usr/local/nagios/libexec
[root@nagiosxi libexec]# ./check_nrpe -H 10.10.10.30 -p 5666 -c CheckServiceState -a MSSQL\$SQLEXP_VIM
OK: All services are in their appropriate state.
[root@nagiosxi libexec]# ./check_nt -H 10.10.10.30 -p 12489 -v SERVICESTATE -l MSSQL\$SQLEXP_VIM -d ShowALL
OK: All services are in their appropriate state.
If I replace the $$ with \$ in the web interface of Nagios core config, I receive also an error.
As an user, I entered the correct service name in the wizard. If there is any escaping code(s) needed, the web interface should translate this to correct commands. What to change to make this work ?