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/

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 - Bandwidth Graphs Showing 0Mb/s in Non-English Systems
Viewed 3000 times since Fri, Dec 19, 2014
Nagios XI - Update Components And Wizards
Viewed 1837 times since Sun, Feb 3, 2019
Nagios XI - Unable To Login Using Two Factor Authentication
Viewed 2320 times since Tue, Apr 10, 2018
Nagios XI - SNMP Trap v3 Configuration
Viewed 12576 times since Tue, Nov 13, 2018
Nagios XI - Using The Custom Includes Component
Viewed 4690 times since Tue, Oct 18, 2016
Nagios XI - MK Livestatus Problems With Mod-Gearman
Viewed 2257 times since Thu, Feb 25, 2016
Nagios XI - Apply Configuration Fails - Backend login to the Core Configuration failed
Viewed 9246 times since Tue, Aug 2, 2016
Nagios XI - mysql_error out of range value for column
Viewed 2606 times since Tue, Aug 14, 2018
XI 5.4 monitoring engine not running
Viewed 4455 times since Mon, Feb 6, 2017
Nagios XI - SNMP MIB Upload Problems
Viewed 3984 times since Mon, Apr 10, 2017