SQL Server Instances

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
pwostran
Posts: 2
Joined: Tue Nov 10, 2015 12:52 pm

SQL Server Instances

Post by pwostran »

Hello I'm trying to monitor a SQL Server instance but the $ in the name is giving me a problem. I have tried everything i can find to solve it but have no idea whats wrong. I have Nagios core 4.1.1 and the windows host has nsclient++ 0.4.3.143 installed. This is the check command i am using $USER1$/check_nt -H $HOSTADDRESS$ -p $USER3$ -s $USER4$ -v COUNTER -l "\\$ARG1$","Transactions per second are %.f" -w $ARG2$ -c $ARG3$. So i put MSSQL\$INSTANCENAME:Transactions\Transactions for ARG1 and this is what nsclient is getting counter: \MSSQL$INSTANCENAME:Transactions\Transactions$ could not be found. Its adding the extra $ at the end. If I change the command to not user ARG1 and type the counter in the command completes but not warning or critical are passed and the extra $ is at the end of the command so it reads Transactions per second are 6$. Its the extra $ that's making the -w and -c not work. I have tried using 'MSSQL$INS', MSSQL"$$"INS, MSSQL\\$$INS, but nothing seems to work except MSSQL\$INS. Any ideas?

Thanks
Paul
jdalrymple
Skynet Drone
Posts: 2620
Joined: Wed Feb 11, 2015 1:56 pm

Re: SQL Server Instances

Post by jdalrymple »

Take a peek at this:

https://support.nagios.com/forum/viewto ... =7&t=11763

I don't see where that you've tried that derivation of escape.
pwostran
Posts: 2
Joined: Tue Nov 10, 2015 12:52 pm

Re: SQL Server Instances

Post by pwostran »

What ended up working was MSSQL\$$INSTANCE

Thanks again
Locked