MSSQL Check Works on CLI not UI

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
blariv
Posts: 188
Joined: Wed Sep 26, 2012 11:55 am

MSSQL Check Works on CLI not UI

Post by blariv »

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)).
benjaminsmith
Posts: 5324
Joined: Wed Aug 22, 2018 4:39 pm
Location: saint paul

Re: MSSQL Check Works on CLI not UI

Post by benjaminsmith »

Hi @blariv,

When testing this locally, if I enter the wrong password I am getting the same error message. I believe there may be some special characters in the password that are not getting passed correctly to the plugin.

What part of the UI is this failing? If this is happening using the Run Check Command button from the CCM interface, this is a known issue. Go ahead and configure the service then go to Home > Details > Service Status, find the service, and check to see if you're getting the correct results.

Regards,
Benjamin
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
blariv
Posts: 188
Joined: Wed Sep 26, 2012 11:55 am

Re: MSSQL Check Works on CLI not UI

Post by blariv »

I cant believe I didn't check that first...... looks like it is working fine...sorry for the waste of time

you can lock this
benjaminsmith
Posts: 5324
Joined: Wed Aug 22, 2018 4:39 pm
Location: saint paul

Re: MSSQL Check Works on CLI not UI

Post by benjaminsmith »

HI @blariv,

Not a problem!

We'll go ahead and close this out.

Best Regards,
Benjamin
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked