Nagios MSSQL Config wizzzard showing no Data

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
rsmithidgc
Posts: 10
Joined: Tue Apr 19, 2016 2:51 pm

Nagios MSSQL Config wizzzard showing no Data

Post by rsmithidgc »

after Configuring the Nagios xi MSSQL wizard on 2 sql servers i get the following :

Warning
(No output on stdout) stderr: /bin/sh: -c: line 0: unexpected EOF while looking for matching `''

what am i doing wrong?
this is the Trial Version
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Nagios MSSQL Config wizzzard showing no Data

Post by tmcdonald »

Can you please go to the Core Config Manager and click the Services link, then find the service that is showing this error? Click on it to edit, and share the values in the ARGx fields.
Former Nagios employee
rsmithidgc
Posts: 10
Joined: Tue Apr 19, 2016 2:51 pm

Re: Nagios MSSQL Config wizzzard showing no Data

Post by rsmithidgc »

all of the services in the mssql are giving the same error
here is the list
and the ag

MSSQL Average Wait Time
-U 'sa' -P 'Password!@#
@#' -p 1433 --averagewait --warning 20 --critical 30
rsmithidgc
Posts: 10
Joined: Tue Apr 19, 2016 2:51 pm

Re: Nagios MSSQL Config wizzzard showing no Data

Post by rsmithidgc »

it looks like it is cutting off the password
the check is showing this
COMMAND: /usr/local/nagios/libexec/check_mssql_server.py -H 172.16.31.4 -U 'sa' -P \'Password!@
OUTPUT: SQL Server message 18456, severity 14, state 1, line 1:
Login failed for user 'sa'.
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
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Nagios MSSQL Config wizzzard showing no Data

Post by tmcdonald »

The password will need to be stored in the resource.cfg file:

https://assets.nagios.com/downloads/nag ... Macros.pdf

The ! character has a special meaning in Nagios, so it needs to be treated specially.
Former Nagios employee
rsmithidgc
Posts: 10
Joined: Tue Apr 19, 2016 2:51 pm

Re: Nagios MSSQL Config wizzzard showing no Data

Post by rsmithidgc »

i hate to be a complete noob but do i need to create a macro to call the password for mod the recorse.cfg file
if so where would that be store on the pre configure vm
rsmithidgc
Posts: 10
Joined: Tue Apr 19, 2016 2:51 pm

Re: Nagios MSSQL Config wizzzard showing no Data

Post by rsmithidgc »

sorry i meant or not for in the previous post
rsmithidgc
Posts: 10
Joined: Tue Apr 19, 2016 2:51 pm

Re: Nagios MSSQL Config wizzzard showing no Data

Post by rsmithidgc »

after moding the resorce.cfg file to add the macro
resulting in
arg1 -U 'sa' -P '$USER10$
this is what the test says
COMMAND: /usr/local/nagios/libexec/check_mssql_server.py -H 172.16.31.4 -U 'sa' -P \'\$USER10\$
OUTPUT: SQL Server message 18456, severity 14, state 1, line 1:
Login failed for user 'sa'.
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
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Nagios MSSQL Config wizzzard showing no Data

Post by tgriep »

Using the Test Check button will not work with commands that use the resource.cfg file user macros. It tries to add extra escaping to the command which may not be needed causing a false error.
Go to the Service Details screen and see if the works there.
Be sure to check out our Knowledgebase for helpful articles and solutions!
rsmithidgc
Posts: 10
Joined: Tue Apr 19, 2016 2:51 pm

Re: Nagios MSSQL Config wizzzard showing no Data

Post by rsmithidgc »

still showing same error after change
Locked