Possible Nagiosxi MySQL Configuration Issue

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
santosltd
Posts: 18
Joined: Thu Feb 16, 2012 6:45 pm

Possible Nagiosxi MySQL Configuration Issue

Post by santosltd »

Hi Team,

We are running our Databases in a clustered setup with a VIP.

Unfortunately when we try to specify the clusterable hostname for the ndoutils database Nagios does not come back up properly. However long we wait we have the 3 green & 3 blue information buttons whilst it tries to start up.

Our config snippet;

Code: Select all

        "ndoutils" => array(
                "dbtype" => 'mysql',
                "dbserver" => 'DB-VIP',
                "user" => 'nagios_ndo2db',
                "pwd" => '*****',
                "db" => 'nagiosxi',
                "dbmaint" => array(             // variables affecting maintenance of ndoutils db

                        "max_externalcommands_age" => 7, // max time (in DAYS) to keep external commands
                        "max_logentries_age" => 90, // max time (in DAYS) to keep log entries
                        "max_statehistory_age" => 730, // max time (in DAYS) to keep state history information
                        "max_notifications_age" => 90, // max time (in DAYS) to keep notifications
                        "max_timedevents_age" => 5, // max time (minutes) to keep timed events
                        "max_systemcommands_age" => 5, // max time (minutes) to keep system commands
                        "max_servicechecks_age" => 5, // max time (minutes) to keep service checks
                        "max_hostchecks_age" => 5, // max time (minutes) to keep host checks
                        "max_eventhandlers_age" => 5, // max time (minutes) to keep event handlers
                        "optimize_interval" => 60, // time (in minutes) between db optimization runs
                        "repair_interval" => 0, // time (in minutes) between db repair runs
                        ),
                ),
        "nagiosql" => array(
                "dbtype" => 'mysql',
                "dbserver" => 'DB-VIP',
                "user" => 'nagios_user',
                "pwd" => '****',
                "db" => 'nagiosql',
                "dbmaint" => array(             // variables affecting maintenance of db
                        "max_logbook_age" => 480, // max time (minutes) to keep log book records
                        "optimize_interval" => 60, // time (in minutes) between db optimization runs
                        "repair_interval" => 0, // time (in minutes) between db repair runs
                        ),
                ),
        );

To get things working we have to specified the DB hostname in the ndoutils array;

Code: Select all

[        "ndoutils" => array(
                "dbtype" => 'mysql',
                "dbserver" => 'STATIC HOSTNAME OF DB NODE',
                "user" => 'nagios_ndo2db',
                "pwd" => '*****',
                "db" => 'nagiosxi',
                "dbmaint" => array(             // variables affecting maintenance of ndoutils db

                        "max_externalcommands_age" => 7, // max time (in DAYS) to keep external commands
                        "max_logentries_age" => 90, // max time (in DAYS) to keep log entries
                        "max_statehistory_age" => 730, // max time (in DAYS) to keep state history information
                        "max_notifications_age" => 90, // max time (in DAYS) to keep notifications
                        "max_timedevents_age" => 5, // max time (minutes) to keep timed events
                        "max_systemcommands_age" => 5, // max time (minutes) to keep system commands
                        "max_servicechecks_age" => 5, // max time (minutes) to keep service checks
                        "max_hostchecks_age" => 5, // max time (minutes) to keep host checks
                        "max_eventhandlers_age" => 5, // max time (minutes) to keep event handlers
                        "optimize_interval" => 60, // time (in minutes) between db optimization runs
                        "repair_interval" => 0, // time (in minutes) between db repair runs
                        ),
                ),
        "nagiosql" => array(
                "dbtype" => 'mysql',
                "dbserver" => 'DBVIP',
                "user" => 'nagios_user',
                "pwd" => '*****',
                "db" => 'nagiosql',
                "dbmaint" => array(             // variables affecting maintenance of db
                        "max_logbook_age" => 480, // max time (minutes) to keep log book records
                        "optimize_interval" => 60, // time (in minutes) between db optimization runs
                        "repair_interval" => 0, // time (in minutes) between db repair runs
                        ),
                ),
        );

The above configuration works just fine. Any ideas or suggestions would be much appreciated.

Kind Regards
Hani
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Possible Nagiosxi MySQL Configuration Issue

Post by scottwilkerson »

Can the nagios XI server route to DB-VIP ?

Can you connect with the following from the command line?

Code: Select all

mysql -h DB-VIP -u nagios_ndo2db -p<password> nagiosxi
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
santosltd
Posts: 18
Joined: Thu Feb 16, 2012 6:45 pm

Re: Possible Nagiosxi MySQL Configuration Issue

Post by santosltd »

Sure, see below;

Code: Select all

user@host html]# mysql -h DB-VIP -u nagios_ndo2db -p nagiosxi
Enter password:
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 19668
Server version: 5.5.30-ndb-7.2.12 Source distribution

Copyright (c) 2000, 2012, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> show tables;
+----------------------------------------+
| Tables_in_nagiosxi                     |
+----------------------------------------+
| nagios_acknowledgements                |
| nagios_commands                        |
| nagios_commenthistory                  |
| nagios_comments                        |
| nagios_configfiles                     |
| nagios_configfilevariables             |
| nagios_conninfo                        |
| nagios_contact_addresses               |
| nagios_contact_notificationcommands    |
| nagios_contactgroup_members            |
| nagios_contactgroups                   |
| nagios_contactnotificationmethods      |
| nagios_contactnotifications            |
| nagios_contacts                        |
| nagios_contactstatus                   |
| nagios_customvariables                 |
| nagios_customvariablestatus            |
| nagios_dbversion                       |
| nagios_downtimehistory                 |
| nagios_eventhandlers                   |
| nagios_externalcommands                |
| nagios_flappinghistory                 |
| nagios_host_contactgroups              |
| nagios_host_contacts                   |
| nagios_host_parenthosts                |
| nagios_hostchecks                      |
| nagios_hostdependencies                |
| nagios_hostescalation_contactgroups    |
| nagios_hostescalation_contacts         |
| nagios_hostescalations                 |
| nagios_hostgroup_members               |
| nagios_hostgroups                      |
| nagios_hosts                           |
| nagios_hoststatus                      |
| nagios_instances                       |
| nagios_logentries                      |
| nagios_notifications                   |
| nagios_objects                         |
| nagios_processevents                   |
| nagios_programstatus                   |
| nagios_runtimevariables                |
| nagios_scheduleddowntime               |
| nagios_service_contactgroups           |
| nagios_service_contacts                |
| nagios_servicechecks                   |
| nagios_servicedependencies             |
| nagios_serviceescalation_contactgroups |
| nagios_serviceescalation_contacts      |
| nagios_serviceescalations              |
| nagios_servicegroup_members            |
| nagios_servicegroups                   |
| nagios_services                        |
| nagios_servicestatus                   |
| nagios_statehistory                    |
| nagios_systemcommands                  |
| nagios_timedeventqueue                 |
| nagios_timedevents                     |
| nagios_timeperiod_timeranges           |
| nagios_timeperiods                     |
+----------------------------------------+
59 rows in set (0.02 sec)

mysql>         
Cheers
Hani
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Possible Nagiosxi MySQL Configuration Issue

Post by scottwilkerson »

To be clear, you are also changing it in /usr/local/nagios/etc/ndo2db.cfg correct?
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
santosltd
Posts: 18
Joined: Thu Feb 16, 2012 6:45 pm

Re: Possible Nagiosxi MySQL Configuration Issue

Post by santosltd »

Correct the DB VIP is within /usr/local/nagios/etc/ndo2db.cfg;
db_servertype=mysql
db_host=DB-VIP
db_port=3306

db_name=nagiosxi
db_prefix=nagios_

db_user=nagios_ndo2db
db_pass=*****
The hostname behind the VIP has to be manually entered into the nagiosXI configuration instead of using the VIP due to it not working.

Cheers
Hani
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Possible Nagiosxi MySQL Configuration Issue

Post by abrist »

At least it is working. We don't have a cluster to test on in house, but we are hunting for a solution.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
santosltd
Posts: 18
Joined: Thu Feb 16, 2012 6:45 pm

Re: Possible Nagiosxi MySQL Configuration Issue

Post by santosltd »

Hi Team,

Just an update, it appears we had an issue with the nagiosxi (ndo side) of the database. Some truncating resolved the issue of the process taking 15+ minutes to startup.

Apologies for any time wasted.

Regards
Hani
Locked