MSSQL Server responds WARNING (SOLVED)

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
sucustrupador
Posts: 4
Joined: Mon Mar 03, 2014 9:37 am

MSSQL Server responds WARNING (SOLVED)

Post by sucustrupador »

Hi

I'm trying to monitoring a SQL Server from NagiosXI with MSSQL SERVER instaled from Monitoring Wizard, but all commands respond me WARNING - with (NULL) in the information field, and Sync Status is OUT OF SYNC

From CCM I see that part of the command appear it as $ARG2$,

The command appear like this

$USER1$/check_mssql_server.py -H $HOSTADDRESS$ $ARG1$
$ARG1$ -U 'user' -P 'password
$ARG2$ ' -p 1433 --time2connect --warning 2 --critical 5

And the test check command respond

COMMAND: /usr/local/nagios/libexec/check_mssql_server.py -H XX.XX.XX.XX -U 'user' -P \'password
OUTPUT: SQL Server message 18456, severity 14, state 1, line 1:
Login failed for user 'user'.
DB-Lib error message 18456, severity 14:
General SQL Server error: Check messages from the SQL Server
DB-Lib error message 20002, severity 9:
Adaptive Server connection failed

if I change the command manually in Nagios Core Config Manager an put all parameters as $ARG1$ and execute TEST CHECK COMMAND, the result is OK, but when I try to save changes never save this change

$USER1$/check_mssql_server.py -H $HOSTADDRESS$ $ARG1$
$ARG1$ -U 'user' -P 'password' -p 1433 --time2connect --warning 2 --critical 5

COMMAND: /usr/local/nagios/libexec/check_mssql_server.py -H xx.xx.xx.xx -U 'user' -P 'password' -p 1433 --time2connect --warning 2 --critical 5
OUTPUT: OK: Time to connect was 1.07535195351s|time=1.07535195351s;2;5;;;

but however much im try to save these changes they never saved,
can help me with this issue? I need to verify that I can check SQL Servers with NagiosXI.

Thanks in advance and sorry for my english
Last edited by sucustrupador on Sun Mar 09, 2014 4:40 am, edited 1 time in total.
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: MSSQL Server responds WARNING

Post by slansing »

I've got a few pointers:

Code: Select all

$ARG1$ -U 'user' -P 'password
Was it a typo that you missed the single quote on the end?

Also, the command is defined like so:

Code: Select all

$USER1$/check_mssql_server.py -H $HOSTADDRESS$ $ARG1$
So it is not pulling $ARG2$ in, you will either need to edit the command in the commands section of the CCM to include $ARG2$ or you will have to move what is on $ARG2$ to $ARG1$. Does your username or password include anything other than numbers and letters?
sucustrupador
Posts: 4
Joined: Mon Mar 03, 2014 9:37 am

Re: MSSQL Server responds WARNINGv (SOLVED)

Post by sucustrupador »

Thanks Slonsing..

All is working now, the problem was a "!" caracter in the password.. this cause that the parameter broke in two Args

Thanks to all !!
Locked