i have a plugin to check query restulst from MS SQL Server. This plugin works perfectly when the name of the server does not have any special characters. However in the sample below the database or server name requires a \ character and i can't figure our how to add that character.
check_xi_mssql_query!-H 172.27.167.27\sqlexpress --port 1433 --username nagios_dbuser --password "m9BLdHPinq" --database EAF --query 'select * from nagios_tampa_pull' --result '1' --critical 100
The above is the command that i am trying to run (via a wizard). it keeps telling me there is an invalid character in the host name (172.27.167.27\sqlexpress) but i need the back slash
special characters in host names
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: special characters in host names
Try wrapping the hostname in single quotes.
-
mstrorange
- Posts: 2
- Joined: Wed Jul 04, 2012 11:16 am
Re: special characters in host names
After quite some time I'm actually getting back to this issue.
I have tried single quotes, double quotes, single quotes with \\, double quotes with \\, no quotes with \\. I've even tried \\\
Nothing I try will allow me to connect to a sql server express database because of the \ in the name.
I have tried single quotes, double quotes, single quotes with \\, double quotes with \\, no quotes with \\. I've even tried \\\
Nothing I try will allow me to connect to a sql server express database because of the \ in the name.
Re: special characters in host names
The hostname shouldn't have a \ in it, as the script is trying to connect to that IP. What exactly does the \sqlexpress part do? The option may need to be added elsewhere in the command.
Former Nagios Employee