Page 1 of 1

Nagios XI database

Posted: Mon Mar 20, 2017 9:03 am
by veenm
We have Nagios XI 5.2 version running in our environment , I wanted to know what details ndo2db store in mysql database regularly. Does ndo2db stores configuration details which are under /etc/ folder and retention.dat and status.dat as well ? . There are 3 databases created nagios , nagiosql and nagiosxi. what are the information these databases stores .

Re: Nagios XI database

Posted: Mon Mar 20, 2017 9:33 am
by dwhitfield
There are about 160 tables depending on your version/configuration. Going through each one of them would be pretty time-consuming. I have listed all of the tables in 5.4.2 below. Please let us know if you'd like to drill down on any of these tables or dbs specifically.

Code: Select all

MariaDB [nagios]> show tables;
+----------------------------------------+
| Tables_in_nagios                       |
+----------------------------------------+
| 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_service_parentservices          |
| 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                     |
+----------------------------------------+

Code: Select all

MariaDB [nagiosxi]> show tables;
+--------------------+
| Tables_in_nagiosxi |
+--------------------+
| xi_auditlog        |
| xi_commands        |
| xi_eventqueue      |
| xi_events          |
| xi_incidents       |
| xi_meta            |
| xi_options         |
| xi_sysstat         |
| xi_usermeta        |
| xi_users           |
+--------------------+

Code: Select all

MariaDB [nagiosql]> show tables;
+--------------------------------------------+
| Tables_in_nagiosql                         |
+--------------------------------------------+
| tbl_command                                |
| tbl_contact                                |
| tbl_contactgroup                           |
| tbl_contacttemplate                        |
| tbl_domain                                 |
| tbl_host                                   |
| tbl_hostdependency                         |
| tbl_hostescalation                         |
| tbl_hostextinfo                            |
| tbl_hostgroup                              |
| tbl_hosttemplate                           |
| tbl_info                                   |
| tbl_lnkContactToCommandHost                |
| tbl_lnkContactToCommandService             |
| tbl_lnkContactToContactgroup               |
| tbl_lnkContactToContacttemplate            |
| tbl_lnkContactToVariabledefinition         |
| tbl_lnkContactgroupToContact               |
| tbl_lnkContactgroupToContactgroup          |
| tbl_lnkContacttemplateToCommandHost        |
| tbl_lnkContacttemplateToCommandService     |
| tbl_lnkContacttemplateToContactgroup       |
| tbl_lnkContacttemplateToContacttemplate    |
| tbl_lnkContacttemplateToVariabledefinition |
| tbl_lnkHostToContact                       |
| tbl_lnkHostToContactgroup                  |
| tbl_lnkHostToHost                          |
| tbl_lnkHostToHostgroup                     |
| tbl_lnkHostToHosttemplate                  |
| tbl_lnkHostToVariabledefinition            |
| tbl_lnkHostdependencyToHost_DH             |
| tbl_lnkHostdependencyToHost_H              |
| tbl_lnkHostdependencyToHostgroup_DH        |
| tbl_lnkHostdependencyToHostgroup_H         |
| tbl_lnkHostescalationToContact             |
| tbl_lnkHostescalationToContactgroup        |
| tbl_lnkHostescalationToHost                |
| tbl_lnkHostescalationToHostgroup           |
| tbl_lnkHostgroupToHost                     |
| tbl_lnkHostgroupToHostgroup                |
| tbl_lnkHosttemplateToContact               |
| tbl_lnkHosttemplateToContactgroup          |
| tbl_lnkHosttemplateToHost                  |
| tbl_lnkHosttemplateToHostgroup             |
| tbl_lnkHosttemplateToHosttemplate          |
| tbl_lnkHosttemplateToVariabledefinition    |
| tbl_lnkServiceToContact                    |
| tbl_lnkServiceToContactgroup               |
| tbl_lnkServiceToHost                       |
| tbl_lnkServiceToHostgroup                  |
| tbl_lnkServiceToServicegroup               |
| tbl_lnkServiceToServicetemplate            |
| tbl_lnkServiceToVariabledefinition         |
| tbl_lnkServicedependencyToHost_DH          |
| tbl_lnkServicedependencyToHost_H           |
| tbl_lnkServicedependencyToHostgroup_DH     |
| tbl_lnkServicedependencyToHostgroup_H      |
| tbl_lnkServicedependencyToService_DS       |
| tbl_lnkServicedependencyToService_S        |
| tbl_lnkServiceescalationToContact          |
| tbl_lnkServiceescalationToContactgroup     |
| tbl_lnkServiceescalationToHost             |
| tbl_lnkServiceescalationToHostgroup        |
| tbl_lnkServiceescalationToService          |
| tbl_lnkServicegroupToService               |
| tbl_lnkServicegroupToServicegroup          |
| tbl_lnkServicetemplateToContact            |
| tbl_lnkServicetemplateToContactgroup       |
| tbl_lnkServicetemplateToHost               |
| tbl_lnkServicetemplateToHostgroup          |
| tbl_lnkServicetemplateToServicegroup       |
| tbl_lnkServicetemplateToServicetemplate    |
| tbl_lnkServicetemplateToVariabledefinition |
| tbl_lnkTimeperiodToTimeperiod              |
| tbl_logbook                                |
| tbl_mainmenu                               |
| tbl_service                                |
| tbl_servicedependency                      |
| tbl_serviceescalation                      |
| tbl_serviceextinfo                         |
| tbl_servicegroup                           |
| tbl_servicetemplate                        |
| tbl_session                                |
| tbl_session_locks                          |
| tbl_settings                               |
| tbl_submenu                                |
| tbl_timedefinition                         |
| tbl_timeperiod                             |
| tbl_user                                   |
| tbl_variabledefinition                     |
+--------------------------------------------+

Re: Nagios XI database

Posted: Tue Mar 21, 2017 2:34 am
by veenm
Thank you for these details. Could you tell me in which table status.dat , retention.dat and performance details gets stored. what are the key files which we need to take care when we design failover.

Re: Nagios XI database

Posted: Tue Mar 21, 2017 9:12 am
by dwhitfield
nagios_servicestatus
nagios_hoststatus

Although there are some performance related things in the db, really, for performance you are look at /usr/local/nagios/share/perfdata

Retention.dat is really the place to go for that info.

5.3.0 came with a lot of improvements to the API. I would suggest taking a look at https://assets.nagios.com/downloads/nag ... NGES-5.TXT and seeing if you think it is worth an upgrade.

Re: Nagios XI database

Posted: Wed Mar 22, 2017 8:31 am
by veenm
Thank you .. I have one one query , in our new setup we want to keep database in different server , not on the server where we install the nagios XI.

How do we achieve above when we install nagios XI .

Re: Nagios XI database

Posted: Wed Mar 22, 2017 9:01 am
by dwhitfield
You don't need to know the answers to your earlier questions for that. Just follow: https://assets.nagios.com/downloads/nag ... Server.pdf

Re: Nagios XI database

Posted: Thu Mar 23, 2017 4:00 am
by veenm
Thank you

Re: Nagios XI database

Posted: Thu Mar 23, 2017 9:01 am
by cdienger
Was there anything further we can help with or are we safe to lock the thread?