$ not escaping correctly in check_xi_mysql_database
Posted: Tue Feb 02, 2016 4:34 pm
Hello,
We are currently evaluating Nagios XI with the intention to purchase, but we ran into the following issue when running the check_xi_mssql_database check command. Nagios should have sent
Or
By putting the escape sequence \$ inside of quotes, the python script sees everything as
So over at the database it perceives NagiosXI as logging in with a password of \$ocInfo1 instead of a password of $ocInfo1.
It seems that NagiosXI runs its escape routine over all of the text contained in the $ARG#$ variables even though it should not do so when within single quotes.
Can you please advise? Thanks!
We are currently evaluating Nagios XI with the intention to purchase, but we ran into the following issue when running the check_xi_mssql_database check command. Nagios should have sent
Code: Select all
/usr/local/Nagios/libexec/check_mssql_database.py –H (our internal sql IP) –U sa –P \$ocInfo1 –T TestTable –p 1433 –logtruncs –warning 1000 –critical 30
Code: Select all
/usr/local/Nagios/libexec/check_mssql_database.py –H (our internal sql IP) –U ‘sa’ –P ‘$ocInfo1’ –T ‘TestTable’ –p 1433 –logtruncs –warning 1000 –critical 30Code: Select all
/usr/local/Nagios/libexec/check_mssql_database.py –H (our internal sql IP) –U sa –P \\$ocInfo1 –T TestTable –p 1433 –logtruncs –warning 1000 –critical 30It seems that NagiosXI runs its escape routine over all of the text contained in the $ARG#$ variables even though it should not do so when within single quotes.
Can you please advise? Thanks!