Using MSSQL Query
Using MSSQL Query
Hi,
We recently bought nasgios XI and are trying to test some of the features.
Currently trying to get monitor a mssql database query working from the Configuration Wizard MSSQL Query.
But for some reason we keep getting the error see attached
The database works fine with the login locally.
Will nagios allow domain logins to databases or do they have to be SQL server authentication
We have tried with all types of logins, but cant get it to connect to database.
The database server is on online, nagios can ping it fine .
Is there something were missing?
We recently bought nasgios XI and are trying to test some of the features.
Currently trying to get monitor a mssql database query working from the Configuration Wizard MSSQL Query.
But for some reason we keep getting the error see attached
The database works fine with the login locally.
Will nagios allow domain logins to databases or do they have to be SQL server authentication
We have tried with all types of logins, but cant get it to connect to database.
The database server is on online, nagios can ping it fine .
Is there something were missing?
You do not have the required permissions to view the files attached to this post.
Re: Using MSSQL Query
The test from the web GUI isn't the best, what happens if you let the check run it's full course?
Also, can you attempt to run the check over the CLI? When you're there, also run nmap samevalueof-H (replace samevalueof-H with the IP for the MSSQL server]
Also, can you attempt to run the check over the CLI? When you're there, also run nmap samevalueof-H (replace samevalueof-H with the IP for the MSSQL server]
Former Nagios Employee
Re: Using MSSQL Query
Ran the above in the cli and got the same error.
the ran nmap with sql server ip address
Got the message
the ran nmap with sql server ip address
Got the message
You do not have the required permissions to view the files attached to this post.
Re: Using MSSQL Query
The nmap is only reporting that it sees port 113, and even that is closed. Do you have a firewall running on the MSSQL server, or one between that and the XI machine? I would take a look there to begin.
Former Nagios Employee
Re: Using MSSQL Query
does port 113 need to be open
the sql server works fine with other nagios alerts , like CPU , RAM , Memory and services.
I tried it on a different server , which I am having the same issue with Using MSSQL Query and get the same error, did the same command see attached
the sql server works fine with other nagios alerts , like CPU , RAM , Memory and services.
I tried it on a different server , which I am having the same issue with Using MSSQL Query and get the same error, did the same command see attached
You do not have the required permissions to view the files attached to this post.
Re: Using MSSQL Query
You can try to see if you can use the domain login to access that server.
If you do try it, the username should be like the example below
The forward slash is important.
If it still fails, create a local user account and see it that works.
I thing the plugin may require a local account.
If you do try it, the username should be like the example below
Code: Select all
domain/usernameIf it still fails, create a local user account and see it that works.
I thing the plugin may require a local account.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Using MSSQL Query
I have been trying with both domain and local accounts.
Re: Using MSSQL Query
Can you login as root to the XI server and try to run a query like the example below and see if that works for you?
Replace xxx.xxx.xxx.xx with the IP address of the MSSQL server and also the username, password and instance name.
Can you login to the MSSQL server and see what the errors are?
Code: Select all
/usr/local/nagios/libexec/check_mssql -H xxx.xxx.xxx.xxx -U 'username' -P 'password' -I 'instance' --database master -q "select count(*) from sys.sysperfinfo"Can you login to the MSSQL server and see what the errors are?
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Using MSSQL Query
Hi
The Query seems to run now and connects to the database fine, no errors.
But Im not getting any alerts, i change the expected results in the query to something so that is should alert.
The Query seems to run now and connects to the database fine, no errors.
But Im not getting any alerts, i change the expected results in the query to something so that is should alert.
Re: Using MSSQL Query
Hi
I have got it to work now, think it was just the queries I was running.
I have got it to work now, think it was just the queries I was running.