MariaDB displaying special characters in Nagios DB

An open discussion forum for obtaining help with Nagios Core. Nagios Core users of all experience levels are welcome here. Subforum have been created for the discussion of Nagios Core and Nagios Plugin development.

NOTE: The SourceForge.net mailing lists have been deprecated in favor of this forum in order to expedite support and provide additional features not available on the old mailing list.

MariaDB displaying special characters in Nagios DB

Postby DonGately » Fri Nov 30, 2018 5:10 am

Hello,

I came across a problem in my MariaDB Nagios Database. The nagios_objects tablespace is displaying special Characters instead of host and service names.

Here is an example of how it looks like when it displays special characters (phpMyAdmin)

Image

Now in the same database and in the same table (nagios_objects) I also have values which are being displayed correctly (name1: hostname, name2: servicename). It seems that after a while Nagios started to write special characters into the table, but I'm not sure about that and I also don't know what the reason could be. Maybe you guys can help me, please :)

I am using Nagios Core 4.3.4 with ndo2db 2.1.2. The MariaDB Database is on a seperate VM with MariaDB version 5.5.56.

Kind regards!
Attachments
nagios_special_characters.JPG
DonGately
 
Posts: 7
Joined: Fri May 11, 2018 3:45 am

Re: MariaDB displaying special characters in Nagios DB

Postby mcapra » Fri Nov 30, 2018 12:13 pm

Was the default character set / collation of your ndo2db database, or the character set / collation for the nagios_objects table, changed recently?
Former Nagios employee
http://www.mcapra.com/
User avatar
mcapra
 
Posts: 3462
Joined: Thu May 05, 2016 3:54 pm

Re: MariaDB displaying special characters in Nagios DB

Postby ssax » Fri Nov 30, 2018 5:36 pm

Please run these mysql commands to show the info:

Code: Select all
use nagios;
SELECT @@character_set_database, @@collation_database;
SELECT * FROM information_schema.SCHEMATA WHERE schema_name = 'nagios';
SELECT TABLE_NAME, COLUMN_NAME, character_set_name, collation_name FROM information_schema.COLUMNS WHERE table_schema = 'nagios' AND table_name = 'nagios_objects';
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
ssax
Dreams In Code
 
Posts: 3451
Joined: Wed Feb 11, 2015 12:54 pm

Re: MariaDB displaying special characters in Nagios DB

Postby DonGately » Mon Dec 03, 2018 12:39 am

Hey and thank you for your reply!

mcapra wrote:Was the default character set / collation of your ndo2db database, or the character set / collation for the nagios_objects table, changed recently?


I haven't changed the collation or the character set since the installation. The collation of the nagios database is utf8_general_ci. The Server connection collation dispalyed in phpMyAdmin is utf8mb4_unicode_ci.

Code: Select all
echo $LANG


returns

Code: Select all
en_US.UTF-8


on both the Nagios and MariaDB VM.

ssax wrote:Please run these mysql commands to show the info:

Code: Select all
use nagios;
SELECT @@character_set_database, @@collation_database;
SELECT * FROM information_schema.SCHEMATA WHERE schema_name = 'nagios';
SELECT TABLE_NAME, COLUMN_NAME, character_set_name, collation_name FROM information_schema.COLUMNS WHERE table_schema = 'nagios' AND table_name = 'nagios_objects';


Here's the output of those commands

Code: Select all
MariaDB [(none)]> use nagios;
SELECT * FROM information_schema.SCHEMATA WHERE schema_name = 'nagios';
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

SELECT TABLE_NAME, COLUMN_NAME, character_set_name, collation_name FROM information_schema.COLUMNS WHERE table_schema = 'nagios' AND table_name = 'nagios_objects';Database changed
MariaDB [nagios]> SELECT @@character_set_database, @@collation_database;
+--------------------------+----------------------+
| @@character_set_database | @@collation_database |
+--------------------------+----------------------+
| utf8                     | utf8_general_ci      |
+--------------------------+----------------------+
1 row in set (0.01 sec)

MariaDB [nagios]> SELECT * FROM information_schema.SCHEMATA WHERE schema_name = 'nagios';
+--------------+-------------+----------------------------+------------------------+----------+
| CATALOG_NAME | SCHEMA_NAME | DEFAULT_CHARACTER_SET_NAME | DEFAULT_COLLATION_NAME | SQL_PATH |
+--------------+-------------+----------------------------+------------------------+----------+
| def          | nagios      | utf8                       | utf8_general_ci        | NULL     |
+--------------+-------------+----------------------------+------------------------+----------+
1 row in set (0.00 sec)

MariaDB [nagios]> SELECT TABLE_NAME, COLUMN_NAME, character_set_name, collation_name FROM information_schema.COLUMNS WHERE table_schema = 'nagios' AND table_name = 'nagios_objects';
+----------------+---------------+--------------------+-------------------+
| TABLE_NAME     | COLUMN_NAME   | character_set_name | collation_name    |
+----------------+---------------+--------------------+-------------------+
| nagios_objects | object_id     | NULL               | NULL              |
| nagios_objects | instance_id   | NULL               | NULL              |
| nagios_objects | objecttype_id | NULL               | NULL              |
| nagios_objects | name1         | latin1             | latin1_swedish_ci |
| nagios_objects | name2         | latin1             | latin1_swedish_ci |
| nagios_objects | is_active     | NULL               | NULL              |
+----------------+---------------+--------------------+-------------------+
6 rows in set (0.00 sec)


I now see that the character_set_name and collation_name of colums name1 and name2 is different from utf8_general_ci. Could that be the problem? If yes then why are there values that displayed correctly?
DonGately
 
Posts: 7
Joined: Fri May 11, 2018 3:45 am

Re: MariaDB displaying special characters in Nagios DB

Postby ssax » Mon Dec 03, 2018 5:21 pm

Those are proper, the same as mine.

What is the output of this command?

Code: Select all
mysql -uroot -pYOURROOTPASS nagios -e "select * from nagios_objects where object_id = '36723';"
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
ssax
Dreams In Code
 
Posts: 3451
Joined: Wed Feb 11, 2015 12:54 pm

Re: MariaDB displaying special characters in Nagios DB

Postby DonGately » Tue Dec 04, 2018 1:43 am

Hello and thank your for your reply!

Here's the output of the command you sent me

Code: Select all
+-----------+-------------+---------------+---------------+---------------+-----------+
| object_id | instance_id | objecttype_id | name1         | name2         | is_active |
+-----------+-------------+---------------+---------------+---------------+-----------+
|     36723 |           1 |             2 | ÃÃâ
                                               ¢ÂµâU        | ÃÃâ
                                                                 ¢ÂµâU        |         0 |
+-----------+-------------+---------------+---------------+---------------+-----------+
DonGately
 
Posts: 7
Joined: Fri May 11, 2018 3:45 am

Re: MariaDB displaying special characters in Nagios DB

Postby ssax » Tue Dec 04, 2018 5:26 pm

Did anything change recently? Like did you upgrade Core or NDO2DB, run yum updates, etc?

Are you doing updates to the DB through PHPMyAdmin or interacting directly with the nagios DB through a script or another automated process that could be doing it?
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
ssax
Dreams In Code
 
Posts: 3451
Joined: Wed Feb 11, 2015 12:54 pm

Re: MariaDB displaying special characters in Nagios DB

Postby DonGately » Wed Dec 05, 2018 1:03 am

ssax wrote:Did anything change recently? Like did you upgrade Core or NDO2DB, run yum updates, etc?

Are you doing updates to the DB through PHPMyAdmin or interacting directly with the nagios DB through a script or another automated process that could be doing it?


I did run yum update on both machines some time after the installation. Here's what yum history info on nagios and ndoutils returns.

nodutils:
Code: Select all
Loaded plugins: enabled_repos_upload, langpacks, package_upload, product-id, search-disabled-repos, subscription-manager
Repodata is over 2 weeks old. Install yum-cron? Or run: yum makecache fast
Transaction ID : 19
Begin time     : Thu Jul  5 11:57:32 2018
Begin rpmdb    : 823:7c6507626d31a54482c3fb8269ef28c520f97bf6
End time       :            11:57:41 2018 (9 seconds)
End rpmdb      : 824:95d7b188799614e4d11b6122edc07f97865b16e6
User           : root <root>
Return-Code    : Success
Command Line   : install ndoutils
Transaction performed with:
    Installed     rpm-4.11.3-32.el7.x86_64                    @rhel-7-server-rpms
    Installed     subscription-manager-1.20.11-1.el7_5.x86_64 @rhel-7-server-rpms
    Installed     yum-3.4.3-158.el7.noarch                    @rhel-7-server-rpms
    Installed     yum-metadata-parser-1.1.4-10.el7.x86_64     @anaconda/7.4
Packages Altered:
    Install ndoutils-2.1.2-1.el7.x86_64 @Companyname_EPEL_epel_el7_x86_64
history info
Uploading Enabled Repositories Report
Loaded plugins: langpacks, product-id, subscription-manager


nagios:
Code: Select all
Loaded plugins: enabled_repos_upload, langpacks, package_upload, product-id, search-disabled-repos, subscription-manager
Repodata is over 2 weeks old. Install yum-cron? Or run: yum makecache fast
Transaction ID : 29
Begin time     : Sun Jul 22 08:45:52 2018
Begin rpmdb    : 885:ed828515c7c9d2be67c2c2abbd6191b5e93c23b3
End time       :            08:46:05 2018 (13 seconds)
End rpmdb      : 885:c27bdf39a50758087c15c6649a96cc4b28bd6fbe
User           : root <root>
Return-Code    : Success
Command Line   : update -y
Transaction performed with:
    Installed     rpm-4.11.3-32.el7.x86_64                    @rhel-7-server-rpms
    Installed     subscription-manager-1.20.11-1.el7_5.x86_64 @rhel-7-server-rpms
    Installed     yum-3.4.3-158.el7.noarch                    @rhel-7-server-rpms
    Installed     yum-metadata-parser-1.1.4-10.el7.x86_64     @anaconda/7.4
Packages Altered:
    Updated nagios-4.3.2-5.el7.x86_64 @Companyname_EPEL_epel_el7_x86_64
    Update         4.3.4-5.el7.x86_64 @Companyname_EPEL_epel_el7_x86_64
-------------------------------------------------------------------------------
Transaction ID : 28
Begin time     : Sun Jul 22 08:36:50 2018
Begin rpmdb    : 885:4f10a24774d9f8ca584529d5615f6933ec542b3f
End time       :            08:37:07 2018 (17 seconds)
End rpmdb      : 885:ed828515c7c9d2be67c2c2abbd6191b5e93c23b3
User           : root <root>
Return-Code    : Failure: 1
Command Line   : update -y
Transaction performed with:
    Installed     rpm-4.11.3-32.el7.x86_64                    @rhel-7-server-rpms
    Installed     subscription-manager-1.20.11-1.el7_5.x86_64 @rhel-7-server-rpms
    Installed     yum-3.4.3-158.el7.noarch                    @rhel-7-server-rpms
    Installed     yum-metadata-parser-1.1.4-10.el7.x86_64     @anaconda/7.4
Packages Altered:
** Updated    nagios-4.3.2-5.el7.x86_64                              @Companyname_EPEL_epel_el7_x86_64
** Update            4.3.4-5.el7.x86_64                              @Companyname_EPEL_epel_el7_x86_64
    Updated    nagios-common-4.3.2-5.el7.x86_64                       @Companyname_EPEL_epel_el7_x86_64
    Update                   4.3.4-5.el7.x86_64                       @Companyname_EPEL_epel_el7_x86_64
    Updated    nagios-plugins-2.2.1-1.el7.x86_64                      @Companyname_EPEL_epel_el7_x86_64
    Update                    2.2.1-9git5c7eb5b9.el7.x86_64           @Companyname_EPEL_epel_el7_x86_64
    Updated    nagios-plugins-all-2.2.1-1.el7.x86_64                  @Companyname_EPEL_epel_el7_x86_64
    Update                        2.2.1-9git5c7eb5b9.el7.x86_64       @Companyname_EPEL_epel_el7_x86_64
    Updated    nagios-plugins-breeze-2.2.1-1.el7.x86_64               @Companyname_EPEL_epel_el7_x86_64
    Update                           2.2.1-9git5c7eb5b9.el7.x86_64    @Companyname_EPEL_epel_el7_x86_64
    Updated    nagios-plugins-by_ssh-2.2.1-1.el7.x86_64               @Companyname_EPEL_epel_el7_x86_64
    Update                           2.2.1-9git5c7eb5b9.el7.x86_64    @Companyname_EPEL_epel_el7_x86_64
    Updated    nagios-plugins-cluster-2.2.1-1.el7.x86_64              @Companyname_EPEL_epel_el7_x86_64
    Update                            2.2.1-9git5c7eb5b9.el7.x86_64   @Companyname_EPEL_epel_el7_x86_64
    Updated    nagios-plugins-dhcp-2.2.1-1.el7.x86_64                 @Companyname_EPEL_epel_el7_x86_64
    Update                         2.2.1-9git5c7eb5b9.el7.x86_64      @Companyname_EPEL_epel_el7_x86_64
    Updated    nagios-plugins-dig-2.2.1-1.el7.x86_64                  @Companyname_EPEL_epel_el7_x86_64
    Update                        2.2.1-9git5c7eb5b9.el7.x86_64       @Companyname_EPEL_epel_el7_x86_64
    Updated    nagios-plugins-disk-2.2.1-1.el7.x86_64                 @Companyname_EPEL_epel_el7_x86_64
    Update                         2.2.1-9git5c7eb5b9.el7.x86_64      @Companyname_EPEL_epel_el7_x86_64
    Updated    nagios-plugins-disk_smb-2.2.1-1.el7.x86_64             @Companyname_EPEL_epel_el7_x86_64
    Update                             2.2.1-9git5c7eb5b9.el7.x86_64  @Companyname_EPEL_epel_el7_x86_64
    Updated    nagios-plugins-dns-2.2.1-1.el7.x86_64                  @Companyname_EPEL_epel_el7_x86_64
    Update                        2.2.1-9git5c7eb5b9.el7.x86_64       @Companyname_EPEL_epel_el7_x86_64
    Updated    nagios-plugins-dummy-2.2.1-1.el7.x86_64                @Companyname_EPEL_epel_el7_x86_64
    Update                          2.2.1-9git5c7eb5b9.el7.x86_64     @Companyname_EPEL_epel_el7_x86_64
    Updated    nagios-plugins-file_age-2.2.1-1.el7.x86_64             @Companyname_EPEL_epel_el7_x86_64
    Update                             2.2.1-9git5c7eb5b9.el7.x86_64  @Companyname_EPEL_epel_el7_x86_64
    Updated    nagios-plugins-flexlm-2.2.1-1.el7.x86_64               @Companyname_EPEL_epel_el7_x86_64
    Update                           2.2.1-9git5c7eb5b9.el7.x86_64    @Companyname_EPEL_epel_el7_x86_64
    Updated    nagios-plugins-fping-2.2.1-1.el7.x86_64                @Companyname_EPEL_epel_el7_x86_64
    Update                          2.2.1-9git5c7eb5b9.el7.x86_64     @Companyname_EPEL_epel_el7_x86_64
    Updated    nagios-plugins-game-2.2.1-1.el7.x86_64                 @Companyname_EPEL_epel_el7_x86_64
    Update                         2.2.1-9git5c7eb5b9.el7.x86_64      @Companyname_EPEL_epel_el7_x86_64
    Updated    nagios-plugins-hpjd-2.2.1-1.el7.x86_64                 @Companyname_EPEL_epel_el7_x86_64
    Update                         2.2.1-9git5c7eb5b9.el7.x86_64      @Companyname_EPEL_epel_el7_x86_64
    Updated    nagios-plugins-http-2.2.1-1.el7.x86_64                 @Companyname_EPEL_epel_el7_x86_64
    Update                         2.2.1-9git5c7eb5b9.el7.x86_64      @Companyname_EPEL_epel_el7_x86_64
    Updated    nagios-plugins-icmp-2.2.1-1.el7.x86_64                 @Companyname_EPEL_epel_el7_x86_64
    Update                         2.2.1-9git5c7eb5b9.el7.x86_64      @Companyname_EPEL_epel_el7_x86_64
    Updated    nagios-plugins-ide_smart-2.2.1-1.el7.x86_64            @Companyname_EPEL_epel_el7_x86_64
    Update                              2.2.1-9git5c7eb5b9.el7.x86_64 @Companyname_EPEL_epel_el7_x86_64
    Updated    nagios-plugins-ircd-2.2.1-1.el7.x86_64                 @Companyname_EPEL_epel_el7_x86_64
    Update                         2.2.1-9git5c7eb5b9.el7.x86_64      @Companyname_EPEL_epel_el7_x86_64
    Updated    nagios-plugins-ldap-2.2.1-1.el7.x86_64                 @Companyname_EPEL_epel_el7_x86_64
    Update                         2.2.1-9git5c7eb5b9.el7.x86_64      @Companyname_EPEL_epel_el7_x86_64
    Updated    nagios-plugins-load-2.2.1-1.el7.x86_64                 @Companyname_EPEL_epel_el7_x86_64
    Update                         2.2.1-9git5c7eb5b9.el7.x86_64      @Companyname_EPEL_epel_el7_x86_64
    Updated    nagios-plugins-log-2.2.1-1.el7.x86_64                  @Companyname_EPEL_epel_el7_x86_64
    Update                        2.2.1-9git5c7eb5b9.el7.x86_64       @Companyname_EPEL_epel_el7_x86_64
    Updated    nagios-plugins-mailq-2.2.1-1.el7.x86_64                @Companyname_EPEL_epel_el7_x86_64
    Update                          2.2.1-9git5c7eb5b9.el7.x86_64     @Companyname_EPEL_epel_el7_x86_64
    Updated    nagios-plugins-mrtg-2.2.1-1.el7.x86_64                 @Companyname_EPEL_epel_el7_x86_64
    Update                         2.2.1-9git5c7eb5b9.el7.x86_64      @Companyname_EPEL_epel_el7_x86_64
    Updated    nagios-plugins-mrtgtraf-2.2.1-1.el7.x86_64             @Companyname_EPEL_epel_el7_x86_64
    Update                             2.2.1-9git5c7eb5b9.el7.x86_64  @Companyname_EPEL_epel_el7_x86_64
    Updated    nagios-plugins-mysql-2.2.1-1.el7.x86_64                @Companyname_EPEL_epel_el7_x86_64
    Update                          2.2.1-9git5c7eb5b9.el7.x86_64     @Companyname_EPEL_epel_el7_x86_64
    Updated    nagios-plugins-nagios-2.2.1-1.el7.x86_64               @Companyname_EPEL_epel_el7_x86_64
    Update                           2.2.1-9git5c7eb5b9.el7.x86_64    @Companyname_EPEL_epel_el7_x86_64
    Updated    nagios-plugins-nt-2.2.1-1.el7.x86_64                   @Companyname_EPEL_epel_el7_x86_64
    Update                       2.2.1-9git5c7eb5b9.el7.x86_64        @Companyname_EPEL_epel_el7_x86_64
    Updated    nagios-plugins-ntp-2.2.1-1.el7.x86_64                  @Companyname_EPEL_epel_el7_x86_64
    Update                        2.2.1-9git5c7eb5b9.el7.x86_64       @Companyname_EPEL_epel_el7_x86_64
    Updated    nagios-plugins-ntp-perl-2.2.1-1.el7.x86_64             @Companyname_EPEL_epel_el7_x86_64
    Update                             2.2.1-9git5c7eb5b9.el7.x86_64  @Companyname_EPEL_epel_el7_x86_64
    Updated    nagios-plugins-nwstat-2.2.1-1.el7.x86_64               @Companyname_EPEL_epel_el7_x86_64
    Update                           2.2.1-9git5c7eb5b9.el7.x86_64    @Companyname_EPEL_epel_el7_x86_64
    Updated    nagios-plugins-oracle-2.2.1-1.el7.x86_64               @Companyname_EPEL_epel_el7_x86_64
    Update                           2.2.1-9git5c7eb5b9.el7.x86_64    @Companyname_EPEL_epel_el7_x86_64
    Updated    nagios-plugins-overcr-2.2.1-1.el7.x86_64               @Companyname_EPEL_epel_el7_x86_64
    Update                           2.2.1-9git5c7eb5b9.el7.x86_64    @Companyname_EPEL_epel_el7_x86_64
    Updated    nagios-plugins-perl-2.2.1-1.el7.x86_64                 @Companyname_EPEL_epel_el7_x86_64
    Update                         2.2.1-9git5c7eb5b9.el7.x86_64      @Companyname_EPEL_epel_el7_x86_64
    Updated    nagios-plugins-pgsql-2.2.1-1.el7.x86_64                @Companyname_EPEL_epel_el7_x86_64
    Update                          2.2.1-9git5c7eb5b9.el7.x86_64     @Companyname_EPEL_epel_el7_x86_64
    Updated    nagios-plugins-ping-2.2.1-1.el7.x86_64                 @Companyname_EPEL_epel_el7_x86_64
    Update                         2.2.1-9git5c7eb5b9.el7.x86_64      @Companyname_EPEL_epel_el7_x86_64
    Updated    nagios-plugins-procs-2.2.1-1.el7.x86_64                @Companyname_EPEL_epel_el7_x86_64
    Update                          2.2.1-9git5c7eb5b9.el7.x86_64     @Companyname_EPEL_epel_el7_x86_64
    Updated    nagios-plugins-real-2.2.1-1.el7.x86_64                 @Companyname_EPEL_epel_el7_x86_64
    Update                         2.2.1-9git5c7eb5b9.el7.x86_64      @Companyname_EPEL_epel_el7_x86_64
    Updated    nagios-plugins-rpc-2.2.1-1.el7.x86_64                  @Companyname_EPEL_epel_el7_x86_64
    Update                        2.2.1-9git5c7eb5b9.el7.x86_64       @Companyname_EPEL_epel_el7_x86_64
    Updated    nagios-plugins-sensors-2.2.1-1.el7.x86_64              @Companyname_EPEL_epel_el7_x86_64
    Update                            2.2.1-9git5c7eb5b9.el7.x86_64   @Companyname_EPEL_epel_el7_x86_64
    Updated    nagios-plugins-smtp-2.2.1-1.el7.x86_64                 @Companyname_EPEL_epel_el7_x86_64
    Update                         2.2.1-9git5c7eb5b9.el7.x86_64      @Companyname_EPEL_epel_el7_x86_64
    Updated    nagios-plugins-snmp-2.2.1-1.el7.x86_64                 @Companyname_EPEL_epel_el7_x86_64
    Update                         2.2.1-9git5c7eb5b9.el7.x86_64      @Companyname_EPEL_epel_el7_x86_64
    Updated    nagios-plugins-ssh-2.2.1-1.el7.x86_64                  @Companyname_EPEL_epel_el7_x86_64
    Update                        2.2.1-9git5c7eb5b9.el7.x86_64       @Companyname_EPEL_epel_el7_x86_64
    Updated    nagios-plugins-swap-2.2.1-1.el7.x86_64                 @Companyname_EPEL_epel_el7_x86_64
    Update                         2.2.1-9git5c7eb5b9.el7.x86_64      @Companyname_EPEL_epel_el7_x86_64
    Updated    nagios-plugins-tcp-2.2.1-1.el7.x86_64                  @Companyname_EPEL_epel_el7_x86_64
    Update                        2.2.1-9git5c7eb5b9.el7.x86_64       @Companyname_EPEL_epel_el7_x86_64
    Updated    nagios-plugins-time-2.2.1-1.el7.x86_64                 @Companyname_EPEL_epel_el7_x86_64
    Update                         2.2.1-9git5c7eb5b9.el7.x86_64      @Companyname_EPEL_epel_el7_x86_64
    Updated    nagios-plugins-ups-2.2.1-1.el7.x86_64                  @Companyname_EPEL_epel_el7_x86_64
    Update                        2.2.1-9git5c7eb5b9.el7.x86_64       @Companyname_EPEL_epel_el7_x86_64
    Updated    nagios-plugins-users-2.2.1-1.el7.x86_64                @Companyname_EPEL_epel_el7_x86_64
    Update                          2.2.1-9git5c7eb5b9.el7.x86_64     @Companyname_EPEL_epel_el7_x86_64
    Updated    nagios-plugins-wave-2.2.1-1.el7.x86_64                 @Companyname_EPEL_epel_el7_x86_64
    Update                         2.2.1-9git5c7eb5b9.el7.x86_64      @Companyname_EPEL_epel_el7_x86_64
    Updated    nmon-14i-8.el7.x86_64                                  @Companyname_EPEL_epel_el7_x86_64
    Update          16g-3.el7.x86_64                                  @Companyname_EPEL_epel_el7_x86_64
    Updated    nrpe-3.1.1-1.el7.x86_64                                @Companyname_EPEL_epel_el7_x86_64
    Update          3.2.0-6.el7.x86_64                                @Companyname_EPEL_epel_el7_x86_64
    Obsoleted  python-qpid-proton-0.17.0-3.el7.x86_64                 @Companyname_EPEL_epel_el7_x86_64
    Obsoleting python2-qpid-proton-0.22.0-1.el7.x86_64                @Companyname_EPEL_epel_el7_x86_64
    Updated    qpid-proton-c-0.17.0-3.el7.x86_64                      @Companyname_EPEL_epel_el7_x86_64
    Update                   0.22.0-1.el7.x86_64                      @Companyname_EPEL_epel_el7_x86_64
Scriptlet output:
   1 error: unpacking of archive failed: cpio: mkdir
   2 error: nagios-4.3.4-5.el7.x86_64: install failed
   3 error: nagios-4.3.2-5.el7.x86_64: erase skipped
-------------------------------------------------------------------------------
Transaction ID : 14
Begin time     : Mon Apr 30 10:35:58 2018
Begin rpmdb    : 737:b7e845b16fb8a66ce5f4292c605a1efc359c2efd
End time       :            10:36:12 2018 (14 seconds)
End rpmdb      : 749:871831084077504680346e7aa591f3af24e91591
User           : root <root>
Return-Code    : Success
Command Line   : install nagios
Transaction performed with:
    Updated       rpm-4.11.3-25.el7.x86_64                  @anaconda/7.4
    Updated       subscription-manager-1.19.21-1.el7.x86_64 @anaconda/7.4
    Updated       yum-3.4.3-154.el7.noarch                  @anaconda/7.4
    Installed     yum-metadata-parser-1.1.4-10.el7.x86_64   @anaconda/7.4
Packages Altered:
    Dep-Install apr-util-1.5.2-6.el7.x86_64      @rhel-7-server-rpms
    Dep-Install fontconfig-2.10.95-11.el7.x86_64 @rhel-7-server-rpms
    Dep-Install gd-2.0.35-26.el7.x86_64          @rhel-7-server-rpms
    Dep-Install httpd-2.4.6-80.el7.x86_64        @rhel-7-server-rpms
    Dep-Install httpd-tools-2.4.6-80.el7.x86_64  @rhel-7-server-rpms
    Dep-Install libXpm-3.5.12-1.el7.x86_64       @rhel-7-server-rpms
    Dep-Install libzip-0.10.1-8.el7.x86_64       @rhel-7-server-rpms
    Dep-Install mailcap-2.1.41-2.el7.noarch      @rhel-7-server-rpms
    Install     nagios-4.3.2-5.el7.x86_64        @Companyname_EPEL_epel_el7_x86_64
    Dep-Install php-5.4.16-45.el7.x86_64         @rhel-7-server-rpms
    Dep-Install php-cli-5.4.16-45.el7.x86_64     @rhel-7-server-rpms
    Dep-Install php-common-5.4.16-45.el7.x86_64  @rhel-7-server-rpms
history info
Uploading Enabled Repositories Report
Loaded plugins: langpacks, product-id, subscription-manager


If I recall correctly the first try to update nagios failed because I am running Nagios Core as a two node HA-cluster based on a shared storage that is mounted only on the active node. The nagios update succeeds only if the VM I run yum update on is currently the active node.

I only use phpMyAdmin to check and look at the database. The ndo2db service should be the only thing writing to that database.
DonGately
 
Posts: 7
Joined: Fri May 11, 2018 3:45 am

Re: MariaDB displaying special characters in Nagios DB

Postby ssax » Wed Dec 05, 2018 6:00 pm

Please attach your ndo2db.cfg and your ndomod.cfg as well.

Thank you
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
ssax
Dreams In Code
 
Posts: 3451
Joined: Wed Feb 11, 2015 12:54 pm

Re: MariaDB displaying special characters in Nagios DB

Postby DonGately » Thu Dec 06, 2018 12:45 am

Hey, thank you for your reply again. Here you go

ndo2db.cfg:
Code: Select all
#####################################################################
# NDO2DB DAEMON CONFIG FILE
#
# Last Modified: 01-02-2009
#####################################################################



# LOCK FILE
# This is the lockfile that NDO2DB will use to store its PID number
# in when it is running in daemon mode.

lock_file=/var/run/ndoutils/ndo2db.pid



# USER/GROUP PRIVILIGES
# These options determine the user/group that the daemon should run as.
# You can specify a number (uid/gid) or a name for either option.

ndo2db_user=nagios
ndo2db_group=nagios



# SOCKET TYPE
# This option determines what type of socket the daemon will create
# an accept connections from.
# Value:
#   unix = Unix domain socket (default)
#   tcp  = TCP socket

socket_type=unix
#socket_type=tcp



# SOCKET NAME
# This option determines the name and path of the UNIX domain
# socket that the daemon will create and accept connections from.
# This option is only valid if the socket type specified above
# is "unix".

socket_name=/var/run/ndoutils/ndo2db.sock



# TCP PORT
# This option determines what port the daemon will listen for
# connections on.  This option is only vlaid if the socket type
# specified above is "tcp".

tcp_port=5668



# ENCRYPTION
# This option determines if the ndo2db daemon will accept SSL to encrypt the
# network traffic between module and ndo2db daemon.
# Both sides have to enable this feature which depends on SSL Libraries
# like openssl or kerberos
# This option is only valid if the output type
# option specified above is "tcpsocket".
#
# A value of '1' will enable this feature

use_ssl=0



# DATABASE SERVER TYPE
# This option determines what type of DB server the daemon should connect to.
# Values:
#   mysql = MySQL

db_servertype=mysql



# DATABASE HOST
# This option specifies what host the DB server is running on.

db_host=***********

# DATABASE PORT
# This option specifies the port that the DB server is running on.
# Values:
#  3306 = Default MySQL port

db_port=3306



# DATABASE SOCKET
# This option specifies the path to the socket to use for local DB connections.
#
# MySQL's default location is /tmp/mysql.sock, but /var/lib/mysql/mysql.sock
# is common for RPM distributions, and /var/run/mysqld/mysqld.sock is seen on
# Ubuntu...
#
# You normally do not need to set this option unless you experience connection
# problems with messages in NDO2DB's log like:
#   "Can't connect to local MySQL server through socket ..."

#db_socket=/var/lib/mysql/mysql.sock

# DATABASE NAME
# This option specifies the name of the database that should be used.

db_name=nagios



# DATABASE TABLE PREFIX
# Determines the prefix (if any) that should be prepended to table names.
# If you modify the table prefix, you'll need to modify the SQL script for
# creating the database!

db_prefix=nagios_



# DATABASE USERNAME/PASSWORD
# This is the username/password that will be used to authenticate to the DB.
# The user needs at least SELECT, INSERT, UPDATE, and DELETE privileges on
# the database.

db_user=ndoutils
db_pass=**********



## TABLE TRIMMING OPTIONS
# Several database tables containing Nagios event data can become quite large
# over time.  Most admins will want to trim these tables and keep only a
# certain amount of data in them.  The options below are used to specify the
# age (in MINUTES) that data should be allowd to remain in various tables
# before it is deleted.  Using a value of zero (0) for any value means that
# that particular table should NOT be automatically trimmed.

# Keep timed events for 24 hours
max_timedevents_age=1440

# Keep system commands for 1 week
max_systemcommands_age=10080

# Keep service checks for 1 week
max_servicechecks_age=10080

# Keep host checks for 1 week
max_hostchecks_age=10080

# Keep event handlers for 31 days
max_eventhandlers_age=44640

# Keep external commands for 31 days
max_externalcommands_age=44640

# Keep notifications for 31 days
max_notifications_age=44640

# Keep contactnotifications for 31 days
max_contactnotifications_age=44640

# Keep contactnotificationmethods for 31 days
max_contactnotificationmethods_age=44640

# Keep logentries for 90 days
max_logentries_age=129600

# Keep acknowledgements for 31 days
max_acknowledgements_age=44640



# DEBUG LEVEL
# This option determines how much (if any) debugging information will
# be written to the debug file.  OR values together to log multiple
# types of information.
# Values: -1 = Everything
#          0 = Nothing
#          1 = Process info
#          2 = SQL queries

debug_level=1



# DEBUG VERBOSITY
# This option determines how verbose the debug log out will be.
# Values: 0 = Brief output
#         1 = More detailed
#         2 = Very detailed

debug_verbosity=1



# DEBUG FILE
# This option determines where the daemon should write debugging information.

debug_file=/var/log/nagios/ndo2db.log



# MAX DEBUG FILE SIZE
# This option determines the maximum size (in bytes) of the debug file.  If
# the file grows larger than this size, it will be renamed with a .old
# extension.  If a file already exists with a .old extension it will
# automatically be deleted.  This helps ensure your disk space usage doesn't
# get out of control when debugging.

max_debug_file_size=1000000


ndomod.cfg
Code: Select all
#####################################################################
# NDOMOD CONFIG FILE
#
# Last Modified: 09-05-2007
#####################################################################


# INSTANCE NAME
# This option identifies the "name" associated with this particular
# instance of Nagios and is used to seperate data coming from multiple
# instances.  Defaults to 'default' (without quotes).

instance_name=default



# OUTPUT TYPE
# This option determines what type of output sink the NDO NEB module
# should use for data output.  Valid options include:
#   file       = standard text file
#   tcpsocket  = TCP socket
#   unixsocket = UNIX domain socket (default)

#output_type=file
#output_type=tcpsocket
output_type=unixsocket



# OUTPUT
# This option determines the name and path of the file or UNIX domain
# socket to which output will be sent if the output type option specified
# above is "file" or "unixsocket", respectively.  If the output type
# option is "tcpsocket", this option is used to specify the IP address
# of fully qualified domain name of the host that the module should
# connect to for sending output.

#output=/var/run/ndoutils/ndo2db.dat
#output=127.0.0.1
output=/var/run/ndoutils/ndo2db.sock



# TCP PORT
# This option determines what port the module will connect to in
# order to send output.  This option is only valid if the output type
# option specified above is "tcpsocket".

tcp_port=5668



# ENCRYPTION
# This option determines if the module will use SSL to encrypt the
# network traffic between module and ndo2db daemon.
# Both sides have to enable this feature which depends on SSL Libraries
# like openssl or kerberos
# This option is only valid if the output type
# option specified above is "tcpsocket".
#
# A value of '1' will enable this feature

use_ssl=0



# OUTPUT BUFFER
# This option determines the size of the output buffer, which will help
# prevent data from getting lost if there is a temporary disconnect from
# the data sink.  The number of items specified here is the number of
# lines (each of variable size) of output that will be buffered.

output_buffer_items=5000



# BUFFER FILE
# This option is used to specify a file which will be used to store the
# contents of buffered data which could not be sent to the NDO2DB daemon
# before Nagios shuts down.  Prior to shutting down, the NDO NEB module
# will write all buffered data to this file for later processing.  When
# Nagios (re)starts, the NDO NEB module will read the contents of this
# file and send it to the NDO2DB daemon for processing.

buffer_file=/var/cache/ndoutils/ndomod.tmp



# FILE ROTATION INTERVAL
# This option determines how often (in seconds) the output file is
# rotated by Nagios.  File rotation is handled by Nagios by executing
# the command defined by the file_rotation_command option.  This
# option has no effect if the output_type option is a socket.

file_rotation_interval=14400



# FILE ROTATION COMMAND
# This option specified the command (as defined in Nagios) that is
# used to rotate the output file at the interval specified by the
# file_rotation_interval option.  This option has no effect if the
# output_type option is a socket.
#
# See the file 'misccommands.cfg' for an example command definition
# that you can use to rotate the log file.

#file_rotation_command=rotate_ndo_log



# FILE ROTATION TIMEOUT
# This option specified the maximum number of seconds that the file
# rotation command should be allowed to run before being prematurely
# terminated.

file_rotation_timeout=60



# RECONNECT INTERVAL
# This option determines how often (in seconds) that the NDO NEB
# module will attempt to re-connect to the output file or socket if
# a connection to it is lost.

reconnect_interval=15



# RECONNECT WARNING INTERVAL
# This option determines how often (in seconds) a warning message will
# be logged to the Nagios log file if a connection to the output file
# or socket cannot be re-established.

reconnect_warning_interval=15
#reconnect_warning_interval=900



# DATA PROCESSING OPTIONS
# These options determine what data the NDO NEB Module will process
#
acknowledgement_data=1
adaptive_contact_data=1
adaptive_host_data=1
adaptive_program_data=1
adaptive_service_data=1
aggregated_status_data=1
comment_data=1
contact_status_data=1
downtime_data=1
event_handler_data=1
external_command_data=1
flapping_data=1
host_check_data=1
host_status_data=1
log_data=1
main_config_data=1
notification_data=1
object_config_data=1
process_data=1
program_status_data=1
retention_data=1
service_check_data=1
service_status_data=1
state_change_data=1
system_command_data=1
timed_event_data=1


# CONFIG OUTPUT OPTION
# This option determines what types of configuration data the NDO
# NEB module will dump from Nagios.  Values can be OR'ed together.
# Values:
#         0 = Don't dump any configuration information
#         1 = Dump only original config (from config files)
#         2 = Dump config only after retained information has been restored
#         3 = Dump both original and retained configuration

config_output_options=2
DonGately
 
Posts: 7
Joined: Fri May 11, 2018 3:45 am

Next

Return to Nagios Core

Who is online

Users browsing this forum: thembre, Zen and 26 guests