Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have made a nagios config file to monitor one of our servers which runs an instance of MS SQL. When verifying the config file i get the following message:
The description string for service MSSQL$MCAFEEDLPREPORTS on host 'Test' contains one or more illegal characters.
The Nagios documentation says that the $-sign is an illegal character, but it does not say how to solve this issue (or i accidentally skipped that part).
I tried the following methods to escape the illegal character:
'MSSQL$MCAFEEDLPREPORTS'
'MSSQL$$MCAFEEDLPREPORTS'
MSSQL\$MCAFEEDLPREPORTS
MSSQL"$$"MCAFEEDLPREPORTS
All help to solve this little inconvenience will be appreciated.
Get the entire line from your services.cfg that contains the MSSQL$ and post it.
It should start with a command. Verify that command is defined appropriately (e.g. in checkcommands.cfg or commands.cfg). In mine I'm passing it in as $ARG$. Post that as well.
When you do "check_command check_nt" you're telling it to get the check_nt definition from the commands.cfg (later Nagios) or check_commands.cfg (earlier Nagios).
Your definition in whatever config you're using (services.cfg, windows.cfg?) is:
Code:
define service{
use generic-service
host_name TEST
service_description "MSSQL\$MCAFEEDLPREPORTS"
check_command check_nt!SERVICESTATE!-d SHOWALL -l "MSSQL\$MCAFEEDLPREPORTS"
}
Which is calling the check_nt defined in commands.cfg.
We do it slightly different here because we defined a check_nt_service command in commands.cfg so the "SERVICESTATE!-d SHOWALL -l" is there rather than services.cfg and in services.cfg we just call check_nt_service with the argument in quotes and escaped as I said.
In your syntax $ARG2$ is actually -d SHOWALL -l "MSSQL\$MCAFEEDLPREPORTS" so it might be worthwhile to remove the quotes I suggested and add quotes around all of it so it becomes:
"-d SHOWALL -l MSSQL\$MCAFEEDLPREPORTS"
It might also be necessary to put quotes around the whole thing and within like:
"-d SHOWALL -l "MSSQL\$MCAFEEDLPREPORTS""
I verified that my command.cfg has an entry for check_nt (it looks the same as your include check_nt).
I both used "-d SHOWALL -l MSSQL\$MCAFEEDLPREPORTS" and "-d SHOWALL -l "MSSQL\$MCAFEEDLPREPORTS"" as the second argument, but still receive the same error.
After that i changed service_description "MSSQL\$MCAFEEDLPREPORTS" to service_description MSSQLMCAFEEDLPREPORTS and checked for configuration errors again. This time i did not receive any errors or warnings. It looks like service_description is causing the error.
Eventually got it working. I my case i had to do the following:
-i removed the illegal character ($-sign) in the service_description line
-i change the check_nt line to: check_command check_nt!SERVICESTATE!-d SHOWALL -l MSSQL"$$"MCAFEEDLPREPORTS
Last edited by TalkingMarble; 10-29-2009 at 08:17 AM.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.