I ran the MSSQL Monitoring wizard and got this error for all the services.
(No output on stdout) stderr: /bin/sh: -c: line 0: unexpected EOF while looking for matching `''
MSSQL service error.
Re: MSSQL service error.
Could you go in to Core Config Manager, Services and click on the Floppy Icon to get the configuration information for the failing services and post that here?
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: MSSQL service error.
###############################################################################
#
# Service configuration file
#
# Created by: Nagios Core Config Manager 2.3.3
# Date: 2015-07-20 10:23:30
# Version: Nagios 3.x config file
#
# --- DO NOT EDIT THIS FILE BY HAND ---
# Nagios CCM will overwrite all manual settings during the next update if you
# would like to edit files manually, place them in the 'static' directory or
# import your configs into the CCM by placing them in the 'import' directory.
#
###############################################################################
define service {
host_name libraryservices.cjh.org
service_description CPU Usage
use xiwizard_windowsserver_nsclient_service
check_command check_xi_service_nsclient!<password>!CPULOAD!-l 5,80,90
max_check_attempts 5
check_interval 5
retry_interval 1
check_period xi_timeperiod_24x7
notification_interval 60
notification_period xi_timeperiod_24x7
contacts nagiosadmin
_xiwizard windowsserver
register 1
}
define service {
host_name libraryservices.cjh.org
service_description Drive C: Disk Usage
use xiwizard_windowsserver_nsclient_service
check_command check_xi_service_nsclient!<password>!USEDDISKSPACE!-l C -w 80 -c 95
max_check_attempts 5
check_interval 5
retry_interval 1
check_period xi_timeperiod_24x7
notification_interval 60
notification_period xi_timeperiod_24x7
contacts nagiosadmin
_xiwizard windowsserver
register 1
}
define service {
host_name libraryservices.cjh.org
service_description IIS Web Server
use xiwizard_windowsserver_nsclient_service
check_command check_xi_service_nsclient!<password>!SERVICESTATE!-l W3SVC -d SHOWALL
max_check_attempts 5
check_interval 5
retry_interval 1
check_period xi_timeperiod_24x7
notification_interval 60
notification_period xi_timeperiod_24x7
contacts nagiosadmin
_xiwizard windowsserver
register 1
}
define service {
host_name libraryservices.cjh.org
service_description Memory Usage
use xiwizard_windowsserver_nsclient_service
check_command check_xi_service_nsclient!<password>!MEMUSE!-w 80 -c 90
max_check_attempts 5
check_interval 5
retry_interval 1
check_period xi_timeperiod_24x7
notification_interval 60
notification_period xi_timeperiod_24x7
contacts nagiosadmin
_xiwizard windowsserver
register 1
}
define service {
host_name libraryservices.cjh.org
service_description MSSQL Average Wait Time
use xiwizard_mssqlserver_service
check_command check_xi_mssql_server!-U 'sa' -P '<password>' -I 'LIBRARYSERVICES' --averagewait --warning 20 --critical 30
max_check_attempts 5
check_interval 5
retry_interval 1
check_period xi_timeperiod_24x7
notification_interval 60
notification_period xi_timeperiod_24x7
contacts nagiosadmin
_xiwizard mssqlserver
register 1
}
define service {
host_name libraryservices.cjh.org
service_description Ping
use xiwizard_windowsserver_ping_service
max_check_attempts 5
check_interval 5
retry_interval 1
check_period xi_timeperiod_24x7
notification_interval 60
notification_period xi_timeperiod_24x7
contacts nagiosadmin
_xiwizard windowsserver
register 1
}
define service {
host_name libraryservices.cjh.org
service_description SQL Server
use xiwizard_windowsserver_nsclient_service
check_command check_xi_service_nsclient!<password>!SERVICESTATE!-l MSSQLSERVER -d SHOWALL
max_check_attempts 5
check_interval 5
retry_interval 1
check_period xi_timeperiod_24x7
notification_interval 60
notification_period xi_timeperiod_24x7
contacts nagiosadmin
_xiwizard windowsserver
register 1
}
define service {
host_name libraryservices.cjh.org
service_description Uptime
use xiwizard_windowsserver_nsclient_service
check_command check_xi_service_nsclient!<password>!UPTIME
max_check_attempts 5
check_interval 5
retry_interval 1
check_period xi_timeperiod_24x7
notification_interval 60
notification_period xi_timeperiod_24x7
contacts nagiosadmin
_xiwizard windowsserver
register 1
}
define service {
host_name libraryservices.cjh.org
service_description _ URL Status
use xiwizard_website_http_service
check_command check_xi_service_http! -f ok -I 67.111.179.132 -u '/' -p 80
max_check_attempts 5
check_interval 5
retry_interval 1
check_period xi_timeperiod_24x7
notification_interval 60
notification_period xi_timeperiod_24x7
contacts nagiosadmin
_xiwizard websiteurl
register 1
}
###############################################################################
#
# Service configuration file
#
# END OF FILE
#
###############################################################################
#
# Service configuration file
#
# Created by: Nagios Core Config Manager 2.3.3
# Date: 2015-07-20 10:23:30
# Version: Nagios 3.x config file
#
# --- DO NOT EDIT THIS FILE BY HAND ---
# Nagios CCM will overwrite all manual settings during the next update if you
# would like to edit files manually, place them in the 'static' directory or
# import your configs into the CCM by placing them in the 'import' directory.
#
###############################################################################
define service {
host_name libraryservices.cjh.org
service_description CPU Usage
use xiwizard_windowsserver_nsclient_service
check_command check_xi_service_nsclient!<password>!CPULOAD!-l 5,80,90
max_check_attempts 5
check_interval 5
retry_interval 1
check_period xi_timeperiod_24x7
notification_interval 60
notification_period xi_timeperiod_24x7
contacts nagiosadmin
_xiwizard windowsserver
register 1
}
define service {
host_name libraryservices.cjh.org
service_description Drive C: Disk Usage
use xiwizard_windowsserver_nsclient_service
check_command check_xi_service_nsclient!<password>!USEDDISKSPACE!-l C -w 80 -c 95
max_check_attempts 5
check_interval 5
retry_interval 1
check_period xi_timeperiod_24x7
notification_interval 60
notification_period xi_timeperiod_24x7
contacts nagiosadmin
_xiwizard windowsserver
register 1
}
define service {
host_name libraryservices.cjh.org
service_description IIS Web Server
use xiwizard_windowsserver_nsclient_service
check_command check_xi_service_nsclient!<password>!SERVICESTATE!-l W3SVC -d SHOWALL
max_check_attempts 5
check_interval 5
retry_interval 1
check_period xi_timeperiod_24x7
notification_interval 60
notification_period xi_timeperiod_24x7
contacts nagiosadmin
_xiwizard windowsserver
register 1
}
define service {
host_name libraryservices.cjh.org
service_description Memory Usage
use xiwizard_windowsserver_nsclient_service
check_command check_xi_service_nsclient!<password>!MEMUSE!-w 80 -c 90
max_check_attempts 5
check_interval 5
retry_interval 1
check_period xi_timeperiod_24x7
notification_interval 60
notification_period xi_timeperiod_24x7
contacts nagiosadmin
_xiwizard windowsserver
register 1
}
define service {
host_name libraryservices.cjh.org
service_description MSSQL Average Wait Time
use xiwizard_mssqlserver_service
check_command check_xi_mssql_server!-U 'sa' -P '<password>' -I 'LIBRARYSERVICES' --averagewait --warning 20 --critical 30
max_check_attempts 5
check_interval 5
retry_interval 1
check_period xi_timeperiod_24x7
notification_interval 60
notification_period xi_timeperiod_24x7
contacts nagiosadmin
_xiwizard mssqlserver
register 1
}
define service {
host_name libraryservices.cjh.org
service_description Ping
use xiwizard_windowsserver_ping_service
max_check_attempts 5
check_interval 5
retry_interval 1
check_period xi_timeperiod_24x7
notification_interval 60
notification_period xi_timeperiod_24x7
contacts nagiosadmin
_xiwizard windowsserver
register 1
}
define service {
host_name libraryservices.cjh.org
service_description SQL Server
use xiwizard_windowsserver_nsclient_service
check_command check_xi_service_nsclient!<password>!SERVICESTATE!-l MSSQLSERVER -d SHOWALL
max_check_attempts 5
check_interval 5
retry_interval 1
check_period xi_timeperiod_24x7
notification_interval 60
notification_period xi_timeperiod_24x7
contacts nagiosadmin
_xiwizard windowsserver
register 1
}
define service {
host_name libraryservices.cjh.org
service_description Uptime
use xiwizard_windowsserver_nsclient_service
check_command check_xi_service_nsclient!<password>!UPTIME
max_check_attempts 5
check_interval 5
retry_interval 1
check_period xi_timeperiod_24x7
notification_interval 60
notification_period xi_timeperiod_24x7
contacts nagiosadmin
_xiwizard windowsserver
register 1
}
define service {
host_name libraryservices.cjh.org
service_description _ URL Status
use xiwizard_website_http_service
check_command check_xi_service_http! -f ok -I 67.111.179.132 -u '/' -p 80
max_check_attempts 5
check_interval 5
retry_interval 1
check_period xi_timeperiod_24x7
notification_interval 60
notification_period xi_timeperiod_24x7
contacts nagiosadmin
_xiwizard websiteurl
register 1
}
###############################################################################
#
# Service configuration file
#
# END OF FILE
#
###############################################################################
Re: MSSQL service error.
Have you tried removing the special characters from the password? Does the check work this way or you are still getting (No output on stdout) stderr: /bin/sh: -c: line 0: unexpected EOF while looking for matching `''?
I suspect you will need to escape the special characters in the password. You can also place the password in the "resource.cfg" file. To learn how, read the following document:
https://assets.nagios.com/downloads/nag ... Macros.pdf
I suspect you will need to escape the special characters in the password. You can also place the password in the "resource.cfg" file. To learn how, read the following document:
https://assets.nagios.com/downloads/nag ... Macros.pdf
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: MSSQL service error.
Its not the password. I tried to use basic passwords and other MSSQL password to see if it would work but when I tried them this is the error I get.
Connection to the database failed for an unknown reason.
Connection to the database failed for an unknown reason.
Re: MSSQL service error.
Can you connect to the MSSQL server from the command line?
Can you zip up the "/usr/local/nagios/libexec/check_mssql_server.py" file and upload it on the forum?
Code: Select all
/usr/local/nagios/libexec/check_mssql_server.py -H <ip address> -U 'sa' -P '<password>' -I 'LIBRARYSERVICES'Be sure to check out our Knowledgebase for helpful articles and solutions!