# Port for NSClient++
$USER7$=12489
# Password for NSClient++
$USER8$=secret
Do we need to install Pre-requisites for monitoring MS SQL
-
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
Maybe I am mistaken, but isn't $USER8$ your nsclient++ password per your configuration?
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.
Re: Do we need to install Pre-requisites for monitoring MS S
No, we dont user the password specified in macro $USER8$ and i dont see that being used any command as well.
What i'm trying to say is that the macro is not being replaced with the value it is assigned, as shown in the example above.
What i'm trying to say is that the macro is not being replaced with the value it is assigned, as shown in the example above.
-
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
I see what you mean, does your actuall nagios definition have a space between $USER10$ and =? This could be causing unexpected behavior and causing nagios to think you mean to use this as a literal password as it is not set as a variable.
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.
Re: Do we need to install Pre-requisites for monitoring MS S
Hi,
There was space between the variable, I have now removed it and restarted the nagios service. How I still get a message saying invalid password.
There was space between the variable, I have now removed it and restarted the nagios service. How I still get a message saying invalid password.
-
slansing
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: Do we need to install Pre-requisites for monitoring MS S
Is it possible someone changed the password on the windows server? Or something to that effect? It is just passing plain text straight across the pipe to NSClient++ there is not much else that could cause this.
Re: Do we need to install Pre-requisites for monitoring MS S
In addition, if you have only one instance, your check *should* work even without the "-I" flag. If you specify an instance, make sure the name is correct. You can view the instances installed on the server in the registry:
Hope this helps.
Code: Select all
regedit -> HKEY_LOCAL_MACHINE -> SOFTWARE -> MICROSOFT -> MICROSOFT SQL SERVER -> INSTALLEDINSTANCESBe sure to check out our Knowledgebase for helpful articles and solutions!
Re: Do we need to install Pre-requisites for monitoring MS S
I have configured this test command in addition to the normal service check for the cpu utilisation which uses the same password and worksfine. I'm certain that the variable is being sent in the form of a plain text and is not replacing it with appropriate value as suggested. Anyway my real concern is sending the user credentials of my mssql server to execute a check. If this isn't working do we have any other option to pass the query with username having special characters.
-
slansing
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: Do we need to install Pre-requisites for monitoring MS S
So you switched from using user macro's to using the plain text user/pass and it worked? Hmm, that is interesting, I wonder if it's having issues pulling illegal characters from user macros..
Re: Do we need to install Pre-requisites for monitoring MS S
We tried to use the core check_nt command available in nagios as against the check_xi_service_nsclient we have been using all this while. 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.
COMMAND: /usr/local/nagios/libexec/check_nt -H ipaddress -p $USER7$ -s $USER8$ -v SERVICESTATE nsclientpp
OUTPUT: Server port must be an integer
I strongly believe that Nagios is not interpreting these macros properly as in the above case the $USER7$ macro has 12489 how ever the error suggests that nagios has seen the $USER7$ literally.
Please suggest how this can be rectified, this is very important for us to solve our issue with the MSSQL monitoring.
COMMAND: /usr/local/nagios/libexec/check_nt -H ipaddress -p $USER7$ -s $USER8$ -v SERVICESTATE nsclientpp
OUTPUT: Server port must be an integer
I strongly believe that Nagios is not interpreting these macros properly as in the above case the $USER7$ macro has 12489 how ever the error suggests that nagios has seen the $USER7$ literally.
Please suggest how this can be rectified, this is very important for us to solve our issue with the MSSQL monitoring.
Re: Do we need to install Pre-requisites for monitoring MS S
should we enable macros somewhere before we start using them in the commands?