MSSQL Check Works on CLI not UI
Posted: Mon Feb 01, 2021 3:47 pm
i can run the check_mssql query check from the command line but it fails at the UI. it is using its own user created for the DC.
CLI:
/usr/local/nagios/libexec/check_mssql -H HOSTNAME --username 'user' --password 'pass' --database DB --port 3342 --query "query" --decode --result "0"
UI:
CRITICAL: Could not connect to dblib:host=xxx;dbname=xxx as xxx(Exception: SQLSTATE[01002] Adaptive Server connection failed (xxx) (severity 9)).
CLI:
/usr/local/nagios/libexec/check_mssql -H HOSTNAME --username 'user' --password 'pass' --database DB --port 3342 --query "query" --decode --result "0"
UI:
CRITICAL: Could not connect to dblib:host=xxx;dbname=xxx as xxx(Exception: SQLSTATE[01002] Adaptive Server connection failed (xxx) (severity 9)).