check_mssql $USER$ macro problem
Posted: Sun May 04, 2014 5:59 am
Hello Team,
I have stored MSSQL credentials in the resource.cfg file and tried to call those macros in the check_mssql plugin but it does not seems to be working.
resource.cfg entries
---------------------------
$USER30$=Domain\USSQL
$USER31$=Cr$d3nt1a10#&&
Command:
/usr/local/nagios/libexec/check_mssql -H server1.domain.com --username '$USER30$' --password '$USER31' --database master --query "SELECT+COUNT%28%2A%29+FROM+sys.sysperfinfo" --result "Expected result" --decode --warning 50 --critical 200
it does working when passing clear text password without domain name.
Command:
/usr/local/nagios/libexec/check_mssql -H server1.domain.com --username 'USSQL' --password 'Cr$d3nt1a10#&&' --database master --query "SELECT+COUNT%28%2A%29+FROM+sys.sysperfinfo" --result "Expected result" --decode --warning 50 --critical 200
CRITICAL: CRITICAL: Query expected "Expected result" but got "2389".
Any help on this? I would really need to perform this check with $USER$ macros!
I have stored MSSQL credentials in the resource.cfg file and tried to call those macros in the check_mssql plugin but it does not seems to be working.
resource.cfg entries
---------------------------
$USER30$=Domain\USSQL
$USER31$=Cr$d3nt1a10#&&
Command:
/usr/local/nagios/libexec/check_mssql -H server1.domain.com --username '$USER30$' --password '$USER31' --database master --query "SELECT+COUNT%28%2A%29+FROM+sys.sysperfinfo" --result "Expected result" --decode --warning 50 --critical 200
it does working when passing clear text password without domain name.
Command:
/usr/local/nagios/libexec/check_mssql -H server1.domain.com --username 'USSQL' --password 'Cr$d3nt1a10#&&' --database master --query "SELECT+COUNT%28%2A%29+FROM+sys.sysperfinfo" --result "Expected result" --decode --warning 50 --critical 200
CRITICAL: CRITICAL: Query expected "Expected result" but got "2389".
Any help on this? I would really need to perform this check with $USER$ macros!