Library

Docs
Beta

Products

404 errors after upgrade from 2024R1.1.2 to 2024R1.1.3Active Directory / LDAP Troubleshooting Authentication IntegrationBackups are not being generated due to tar creation errorsCCM says unapplied changes exist, but none listedCHECK_NRPE Error Could not connect to xxx.xxx.xxx.xxx Connection reset by peerDatabase Storage Engine and High CPU usage in Nagios XIDisabling Port 113 IDENT RequestsERROR Please add the ’Optional’ channel to your Red Hat systems subscriptionsError Invalid max_check_attempts value for hostHow To Clear Solaris Service Maintenance StatusNagios XI -ERROR unable to open include file conf.d/.cfgNagios XI 2014 Upgrade Issue CONFIG ERRORNagios XI Ajaxterm Installation AbortedNagios XI Apply Configuration Fails Backend login to the Core Configuration failedNagios XI Apply Configuration Never CompletesNagios XI Can’t Log Into The Web InterfaceNagios XI CentOS 6 Installation Problems XI 2011R1.7 2011R1.8Nagios XI Checking System StatusNagios XI Common Upgrade Failures And SolutionsNagios XI Configuration Applies, No Changes Take PlaceNagios XI Configuration Applies, but still get Configuration File Is Out Of Date ErrorNagios XI Configuration Verification FailedNagios XI Core 4 Load Spikes on 1.75 and 7 Hour IntervalsNagios XI Crashed Database TablesNagios XI Debugging Bandwidth Performance GraphsNagios XI Defining Global Environment VariablesNagios XI Disabling Database UTF8 ConnectivityNagios XI ERROR PostgresQL not running exitingNagios XI ERROR unable to open include file /etc/mrtg/conf.d/xxxxxxx.cfgNagios XI Empty Screen for Wizard, Component, DashletNagios XI Error while converting SVGNagios XI Event Data Is StaleNagios XI HTTP 500 Error / PHP Parse error Unexpected $endNagios XI HTTP 500 Error / White Screen After LoginNagios XI High Availability and Failover Solutions for Nagios XI NWC14Nagios XI Host Still Visible After Deletion (Ghost Hosts)Nagios XI Hosts Pending/GrayNagios XI ICMP and Ping Checks Stopped GraphingNagios XI Installing XI Fails To Install Dependency pymssqlNagios XI Issues with mod_gearman and Performance Data Newlines \nNagios XI LDAP / Active Directory Import Users Certificate IssuesNagios XI Last Check Time Not UpdatingNagios XI Login Screen Keeps Redirecting To ItselfNagios XI MK Livestatus Problems With Mod GearmanNagios XI MRTG Reports SNMP_Session ErrorsNagios XI MSSQL Query Wizard Invalid characters in the usernameNagios XI MSSQL Wizards Adaptive Server connection failedNagios XI Missing localhost AlertsNagios XI Notification ProblemsNagios XI Notifications Not Sending In XI 5.3.0Nagios XI Oracle Services Critical After Nagios XI UpgradeNagios XI Performance Graph ProblemsNagios XI Plain Text Password ConsiderationsNagios XI Problems Using Nagios XI With ProxiesNagios XI Problems With Scheduled Backups At MidnightNagios XI Problems with $ Signs in the Check CommandNagios XI Profile Build FailedNagios XI Receiving IPv6 SNMP TrapsNagios XI Reset Security CredentialsNagios XI Reset Upgrade Status In Web InterfaceNagios XI Resetting The nagiosadmin PasswordNagios XI Resizing the VM Disk SizeNagios XI Resolving Cannot connect to database Error Core Config ManagerNagios XI Running Out Of Disk Space On The Nagios XI VMNagios XI SNMP MIB Upload ProblemsNagios XI SNMPTT Service generates Cannot find module errorsNagios XI SQL Error [nagiosxi] -ERROR -syntax errorNagios XI Schedulded Backups No Longer WorkingNagios XI Scheduled Downtime Not WorkingNagios XI Scheduled Reports Not RunningNagios XI Some BPI Checks Show Unknown BPI Group Index After UpgradeNagios XI SourceGuardian Errors 2009R1.2CNagios XI Status Information Cut Off At 256 CharactersNagios XI Troubleshooting ReportsNagios XI Unable To Login Using Two Factor AuthenticationNagios XI Unable to Delete HostNagios XI Upgrade errors root.crontab.orig cannot overwrite existing fileNagios XI Uploaded plugin returns /bin/bash^M bad interpreter No such file or directoryNagios XI Warning Duplicate definition found for contact ’xi_default_contact’Nagios XI Windows Memory Usage PhysicalNagios XI mysql_error out of range value for columnPerformance Graphs Showing Data during Host Down Time PeriodsSlack Notifications Stopped WorkingUpgrade error with XI and non standard Broker ModulesUpgrading to NDO 3 after having been downgraded in newer versions of Nagios XIWeb Browser Reports 330 Error Content EncodingXI 5.4 monitoring engine not running/usr/local/nagiosxi/var/xi itype No such file or directory error

Nagios XI - MSSQL Wizards - Adaptive Server connection failed

Problem Description

After running the MSSQL wizards your new service has a CRITICAL or UNKNOWN state with the following error:

CRITICAL: Could not connect to dblib:host=mssql01.box293.local:1433;dbname=Sample as BOX293nagios
(Exception: SQLSTATE[01002] Adaptive Server connection failed (mssql01.box293.local:1433) (severity 9)).

OR

CRITICAL: Could not connect to dblib:host=mssql01.box293.local:1433;dbname=Sample as BOX293\nagios
(Exception: SQLSTATE[01002] Adaptive Server connection failed (severity 9)).

OR

DB-Lib error message 20002, severity 9:
Adaptive Server connection failed

In the first two errors above the first line is almost identical except for the username in the output, this is the key to identifying the problem as there are two separate solutions to this problem. The last two errors have the same solution.

A similar error is generated for a separate issue:

PHP Notice: Undefined variable: db_connstr in /usr/local/nagios/libexec/check_mssql on line 416
CRITICAL: Could not connect to as nagios (Exception: SQLSTATE[01002] Adaptive Server connection failed (severity 9)). 

Please refer to the Custom Port solution in this KB article to resolve this issue.

Username Not Enclosed In Quotes

This addresses the following error:

CRITICAL: Could not connect to dblib:host=mssql01.box293.local:1433;dbname=Sample as BOX293nagios
(Exception: SQLSTATE[01002] Adaptive Server connection failed (mssql01.box293.local:1433) (severity 9)).

The service in Nagios XI has the username in the domain\user format however it is NOT enclosed in quotes. This screenshot of the service in Core Configuration Manager shows without the quotes:

This screenshot shows the service after quotes have been added (this is required to fix the problem):

After making this change save the service and Apply Configuration. Then go and force an immediate check of the service to test that it is working correctly.

System Configuration File Change

This addresses the following error:

CRITICAL: Could not connect to dblib:host=mssql01.box293.local:1433;dbname=Sample as BOX293\nagios
(Exception: SQLSTATE[01002] Adaptive Server connection failed (severity 9)).

OR

DB-Lib error message 20002, severity 9:
Adaptive Server connection failed

The plugins require a change to the /etc/freetds.conf configuration file to allow them to work with Windows Authentication.

Execute the following command to open the /etc/freetds.conf file in vi:

vi /etc/freetds.conf

When using the vi editor, to make changes press i on the keyboard first to enter insert mode. Press Esc to exit insert mode.

Under the [global] section find the following:

[global]
        # TDS protocol version
;       tds version = 4.2

Remove the semi-colon (;) at the beginning of the tds version line and change the value to 7.2as follows:

[global]
        # TDS protocol version
        tds version = 7.2

When you have finished, save the changes in vi by typing:

:wq

and press Enter.

After making these changes go back into the XI web interface and force an immediate check of the service to test that it is working correctly.

Custom Port

This addresses the following error:

PHP Notice: Undefined variable: db_connstr in /usr/local/nagios/libexec/check_mssql on line 416
CRITICAL: Could not connect to as nagios (Exception: SQLSTATE[01002] Adaptive Server connection failed (severity 9)). 

Notice this:

Could not connect to as nagios

See how the server name is not shown. The problem here is that the check_mssql plugin has a bug, it is not using the custom TCP port you defined when running the wizard (instead of the default 1433). This problem has been resolved in version 1.6.1 of the MSSQL Query wizard. To update to the latest version of the wizard navigate to Admin > System Extensions > Manage Config Wizards. On this page you can check for updates and install the latest available version.

Final Thoughts

For any support related questions please visit the Nagios Support Forums at:

http://support.nagios.com/forum/

Nagios Enterprises, LLC

© All rights reserved. 2026