Page 1 of 1

table structure of nagiosXI

Posted: Fri Jan 19, 2018 1:00 am
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 !

Re: table structure of nagiosXI

Posted: Fri Jan 19, 2018 10:39 am
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.

Re: table structure of nagiosXI

Posted: Mon Jan 22, 2018 8:59 am
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.

Re: table structure of nagiosXI

Posted: Mon Jan 22, 2018 1:59 pm
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?

Re: table structure of nagiosXI

Posted: Mon Jan 22, 2018 10:14 pm
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?

Re: table structure of nagiosXI

Posted: Tue Jan 23, 2018 11:51 am
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