Do we need to install Pre-requisites for monitoring MS SQL

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Do we need to install Pre-requisites for monitoring MS S

Post by abrist »

MSPk wrote: we have changed the password in the resource.cfg to match the one on the agent and then used the test check command on the server to see if nclient service is up and we get the below output.
The "test check command" feature has issues using the macros as the test check runs as user apache, not user nagios.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Do we need to install Pre-requisites for monitoring MS S

Post by lmiltchev »

Try saving your config (with the macros) and schedule an immediate check. See if this is going to work. I assume the problem with running the check from the CCM is that the check is run under apache, so the the "$" causes the issue.
Be sure to check out our Knowledgebase for helpful articles and solutions!
MSPk
Posts: 317
Joined: Fri Aug 24, 2012 12:03 am

Re: Do we need to install Pre-requisites for monitoring MS S

Post by MSPk »

Yes, it does work that way :)

I have now configured a service for my MSSQL, however ended up with different error messages while trying the user ID in different formats, details below

when user id is in the format my-domain\userid

Code: Select all

SQL Server message 18452, severity 14, state 1, line 1:
Login failed for user 'my-domainuserid'. The user is not associated with a trusted SQL Server connection.
DB-Lib error message 18452, severity 14:
General SQL Server error: Check messages from the SQL Server
DB-Lib error message 20002, severity 9:
Adaptive Server connection failed
User ID format - my-domain/userid

Code: Select all

SQL Server message 18452, severity 14, state 1, line 1:
Login failed for user 'my-domain/userid'. The user is not associated with a trusted SQL Server connection.
DB-Lib error message 18452, severity 14:
General SQL Server error: Check messages from the SQL Server
DB-Lib error message 20002, severity 9:
Adaptive Server connection failed
User ID format - "my-domain\userid"

Code: Select all

DB-Lib error message 20002, severity 9:
Adaptive Server connection failed
I have shared the details with my DB admin as well and they have suggested that it is an issue with nagios/plugin as they are able to run queries successfullt using the same user ID.
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Do we need to install Pre-requisites for monitoring MS S

Post by abrist »

What version of XI are you running? There was a bug in an old version that was replacing quotes/apostrophes with the html encoded version (').
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
MSPk
Posts: 317
Joined: Fri Aug 24, 2012 12:03 am

Re: Do we need to install Pre-requisites for monitoring MS S

Post by MSPk »

we are on 2012 R1.8
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Do we need to install Pre-requisites for monitoring MS S

Post by abrist »

MSPk wrote:'my-domainuserid&apos
The single quote html encoding is curious. Look at teh service check in the CCM, are there actually single quotes, or do you see ' ?
If you see ' replace them with single quotes.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
MSPk
Posts: 317
Joined: Fri Aug 24, 2012 12:03 am

Re: Do we need to install Pre-requisites for monitoring MS S

Post by MSPk »

The single quote html encoding is curious. Look at teh service check in the CCM, are there actually single quotes, or do you see ' ?
If you see ' replace them with single quotes.
we are passing the credentails via macro's, cant see the actual values via CCM.

I have come across this plugin in exchange,

http://exchange.nagios.org/directory/Pl ... nt/details

its says that the plugin uses NRPE_NT, does it actually mean the NRPE via NSClient++ ?? If yes, should we pu the complete folder in the scripts folder or jus the check_mssql_nt file? Also, should we create a command in the nsc config file and then call it from nagios check_nrpe or do we need to follow a different procedure for this?
MSPk
Posts: 317
Joined: Fri Aug 24, 2012 12:03 am

Re: Do we need to install Pre-requisites for monitoring MS S

Post by MSPk »

I did manager to run this new plugin successfully, however the /CHK_CONNECTIONCOUNT always remain in 'Ok' State.

I have used the command "sql_testconnections=scripts\check_mssql_nt.exe /H:DB\instance /CHK_CONNECTIONCOUNT -Wv:50 -Cv100"

Output - MSSQL OK - 70 connections in 0.20 secs

Shouldn't this return a warning considering that the threshold is set to 50? I have reduced it further to 10 for warning and 15 for critical, however it still shows as 'Ok'.
I have tested the /CHK_CONNECT and /CHK_QUERY: successfully and they do return warning and Critical alerts. Its only the connection time that has issues,Please help
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: Do we need to install Pre-requisites for monitoring MS S

Post by sreinhardt »

Per the plugin guidelines I believe you actually want -Wv50: and -Cv100: so that both options are 50 or more and 100 or more. Otherwise you are technically setting warning for less than or equal to 50 and critical only reports at 100.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
MSPk
Posts: 317
Joined: Fri Aug 24, 2012 12:03 am

Re: Do we need to install Pre-requisites for monitoring MS S

Post by MSPk »

how do change the thresholds to 50 or more for warning and 100 or more for critical?
Locked