This is a cache of https://support.nagios.com/kb/article/nagios-xi-disabling-database-utf8-connectivity-804.html. It is a snapshot of the page at 2025-05-14T00:09:06.032+0000.
Nagios <strong>xi</strong> - Disabling Database UTF8 Connectivity
Home » Categories » Multiple Categories

Nagios xi - Disabling Database UTF8 Connectivity

Overview

This document describes how to disable UTF8 connectivity to the MySQL / MariaDB databases for Nagios xi. By default Nagios xi uses UTF8 however sometimes this needs to be disabled to allow MySQL / MariaDB to define the connectivity method.

This configuration ensures that characters from different languages can be correctly stored and retrieved in the databases. An example of where this is commonly used is when creating Dashboards in Nagios xi as per this screenshot:

 

 

 

The configuration directive explained in this documentation was introduced in Nagios xi 5.4.13 to address some issues that resulting in the names appearing garbled or with ??? instead of the correct character, for example:

 

 

If you do experience garbled or ??? characters, following this KB article will resolve the issue.

 

 

The Nagios xi Configuration Directive

The following configuration directive was added in Nagios xi 5.4.13:

$cfg['db_conn_utf8'] = 0;

 

To determine if you currently have that directive enabled, establish a terminal session to your Nagios xi server as the root user and execute the following command:

grep db_conn_utf8 /usr/local/nagiosxi/html/config.inc.php

 

If the grep command produces NO output then the directive does not exist in your configuration and it needs to be added. This can be added with the following command:

printf "\n\$cfg['db_conn_utf8'] = 0;\n" >> /usr/local/nagiosxi/html/config.inc.php

 

If the grep command produced output then it can be changed with the following command (sets it to 0):

sed -i "s/db_conn_utf8'\] =.*/db_conn_utf8'\] = 0;/g" /usr/local/nagiosxi/html/config.inc.php

Defining the directive to 0 will resolve the issue you for garbled or ??? characters.

 

If you wanted to change it to 1 then use the following command:

sed -i "s/db_conn_utf8'\] =.*/db_conn_utf8'\] = 1;/g" /usr/local/nagiosxi/html/config.inc.php

 

 

The change takes effect immediately.

 

 

Final Thoughts

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

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



Special Offer For Knowledgebase Visitors! Get a huge discount on Nagios Log Server by clicking below.

Get 60% Off Nagios Log Server!

Did you know? Nagios provides complete monitoring of: Windows, Linux, UNIX, Servers, Websites, SNMP, DHCP, DNS, Email, Storage, Files, Apache, IIS, EC2, and more!

1 (1)
Article Rating (1 Votes)
Rate this article
  • Icon PDFExport to PDF
  • Icon MS-WordExport to MS Word
Attachments Attachments
There are no attachments for this article.
Related Articles RSS Feed
Nagios xi - Integrating Mod-Gearman With Nagios xi
Viewed 8976 times since Thu, Jan 28, 2016
Nagios xi - How To Use CA Certificates With check_ldaps Plugin
Viewed 12609 times since Tue, Jul 26, 2016
Nagios xi - CentOS 6 Installation Problems xi 2011R1.7 2011R1.8
Viewed 5214 times since Tue, Feb 2, 2016
Nagios xi - Resetting The nagiosadmin Password
Viewed 46825 times since Mon, Jan 25, 2016
Nagios xi - Apply Configuration Never Completes
Viewed 22737 times since Tue, Jan 27, 2015
Nagios xi - Setup Nagios xi to Send SMS Alerts
Viewed 9882 times since Thu, Jan 28, 2016
Nagios xi - Log Locations and Descriptions
Viewed 10748 times since Thu, Jan 28, 2016
Nagios xi - Notification Problems
Viewed 31267 times since Tue, Jan 27, 2015
Nagios xi - Upgrading To PHP 7
Viewed 18834 times since Tue, Oct 22, 2019
Nagios xi - Hosts Pending/Gray
Viewed 12137 times since Tue, Jan 6, 2015