table structure of nagiosXI

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
Olin
Posts: 50
Joined: Tue Dec 26, 2017 1:46 am

table structure of nagiosXI

Post by Olin »

hi,
we have a nagios server to monitor 2k+ host and 2W+ services. And some configures is not standard early so that difficulty maintenance.
so we can clear up nagiosXI configure . Can you provides the table structure of nagiosXI to me ? Or how to collect the relationship of configure better?

Thanks !
Last edited by Olin on Sun Jan 28, 2018 8:01 pm, edited 1 time in total.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: table structure of nagiosXI

Post by lmiltchev »

We DON'T recommend making configuration changes directly in the database! This can break your Nagios XI instance and make it "non-supported"! You need to clear up your configurations in the Core Config Manager.

For large environments as yours, tools such as Bulk Modifications Tool, included in Nagios XI Enterprise Edition, could be really helpful.

You could also make use of the new REST API in Nagios XI - see the Help menu. It is also possible to save time by coming up with some kind of custom scripting solution - see the document below:
https://assets.nagios.com/downloads/nag ... gement.pdf

This should get you started. There are also some other solutions out there - Ansible, Puppet, Chef, etc. Each environment is different, so you will need to decide what is the best solution for your needs.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Olin
Posts: 50
Joined: Tue Dec 26, 2017 1:46 am

Re: table structure of nagiosXI

Post by Olin »

hi @lmiltchev,
thanks for you reply .
And I Don't making configuration changes directly in the database!
I want to clarify the relationship of nagios configure.
such as the host A have B service , and B service is member of services_group C . A is member of host_group D.
and A and B have different contacts etc....
lmiltchev wrote:We DON'T recommend making configuration changes directly in the database! This can break your Nagios XI instance and make it "non-supported"! You need to clear up your configurations in the Core Config Manager.

For large environments as yours, tools such as Bulk Modifications Tool, included in Nagios XI Enterprise Edition, could be really helpful.

You could also make use of the new REST API in Nagios XI - see the Help menu. It is also possible to save time by coming up with some kind of custom scripting solution - see the document below:
https://assets.nagios.com/downloads/nag ... gement.pdf

This should get you started. There are also some other solutions out there - Ansible, Puppet, Chef, etc. Each environment is different, so you will need to decide what is the best solution for your needs.
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: table structure of nagiosXI

Post by npolovenko »

I want to clarify the relationship of nagios configure.
such as the host A have B service , and B service is member of services_group C . A is member of host_group D.
and A and B have different contacts etc....
@Olin, Hostgroups are usually used if you want to assign one service to many hosts. When you create a service you could choose a hostgroup instead of a host.
Service groups are mostly used to group services together for various reports in XI.
https://support.nagios.com/kb/article/n ... s-730.html
As far as adding contacts goes. You'd either add those to each host individually, or you could create a Host Template, or a Service Template, add contacts to the template, and then assign the template to a host group or a service group.
Does this answer your question?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Olin
Posts: 50
Joined: Tue Dec 26, 2017 1:46 am

Re: table structure of nagiosXI

Post by Olin »

hi @npolovenko,
thanks for you reply.
And you get me wrong. I know how to configure . But I want to clear up without Core Config Manager .Because it's power for clear up thousand of configures. I found nagiosql and nagios instance in local mysql database. I found these contain all the entiy of confirgure.
but I don't sure these relationship.So I want to get the table structure of the nagios and nagiosql mysql database to clear up the relationship.

IS this mysql nagios instance is for nagios ndo2db ? mysql nagiosql instance is for nagiosql and nagiosxi ?
@Olin, Hostgroups are usually used if you want to assign one service to many hosts. When you create a service you could choose a hostgroup instead of a host.
Service groups are mostly used to group services together for various reports in XI.
https://support.nagios.com/kb/article/n ... s-730.html
As far as adding contacts goes. You'd either add those to each host individually, or you could create a Host Template, or a Service Template, add contacts to the template, and then assign the template to a host group or a service group.
Does this answer your question?
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: table structure of nagiosXI

Post by tmcdonald »

We do not have database documentation to provide externally to the company, as we have found in the past that this encourages people to make changes. When they make these changes, typically it is done incorrectly and damage occurs as a result. While I understand you do not intend to make modifications, we are unable to provide documentation for the structure of the tables.

Generally speaking, I can say the following:
  • The nagiosql database holds the information from the CCM
  • The tables in the nagiosql database are highly relational
  • The tables are named clearly according to their purpose
  • A table named like tbl_lnkXXXToYYY will have the idMaster and idSlave fields named in the order they appear in the table name
  • For example, in tbl_lnkServiceToHost the idMaster field refers to the service ID, and idSlave refers to the host ID
Former Nagios employee
Locked