Page 1 of 2

MySQL and Postgress Details

Posted: Fri Aug 21, 2015 2:59 pm
by chicjo01
I am investigating a setup for Nagios monitoring software, but have not seen technician information about the DBs. Can you help answer the below questions?

Background Info:
- Have over 2000 servers (physical and virtual)
- Will be offloading MySQL DBs
- Averaging 26000 alerts
- checks every 5 mins

MySQL and Postgres:
1) What is the current server version being used?
2) What is the minimal disk size needed?
3) What is the average growth for the disk and DB?
4) Does the DB lock tables?

Thank you everyone.

Re: MySQL and Postgress Details

Posted: Mon Aug 24, 2015 9:53 am
by jdalrymple
chicjo01 wrote:1) What is the current server version being used?
Managed by your package management system.
chicjo01 wrote:2) What is the minimal disk size needed?
3) What is the average growth for the disk and DB?
Our VM distribution includes a 10GB disk and will monitor a handful of hosts for eternity. The DB does grow but it can be managed by some tuning configurations that include the amount of data to retain. It is possible to retain all historical data. For 26000 services on 2000 hosts I'd guess that your DB wouldn't grow more than 10GB retaining data for 2 years, however every environment is different.
chicjo01 wrote:4) Does the DB lock tables?
Yes, during backups only to the best of my knowledge though.

Re: postgresql, it's only for the UI settings. The size of this database is generally negligible. Otherwise the same answers apply.

Re: MySQL and Postgress Details

Posted: Mon Aug 24, 2015 3:50 pm
by chicjo01
Thank you, this was very helpful.

Re: MySQL and Postgress Details

Posted: Mon Aug 24, 2015 4:02 pm
by hsmith
chicjo01 wrote:Thank you, this was very helpful.
Glad to hear. Is there anything else we can help you out with?

Re: MySQL and Postgress Details

Posted: Wed Sep 02, 2015 9:36 am
by chicjo01
Is there step by step instructions if I wanted to offload (MySQL or Postgres) DB? If offloading the DB, what impact it will have on NagiosXI. I have not found anything explain the exact steps.

I did find a possible location config.inc.php, but have not had the time to make sure that is the only location. Still waiting for a test server in order to confirm.

I will be using NagiosXI version 4 after it is setup. I figure it is more then just changing the DB information in config.inc.php and exporting the data structure of the DB.

Re: MySQL and Postgress Details

Posted: Wed Sep 02, 2015 9:43 am
by tmcdonald
chicjo01 wrote:Is there step by step instructions if I wanted to offload (MySQL or Postgres) DB?
Google :)

https://assets.nagios.com/downloads/nag ... Server.pdf

chicjo01 wrote:If offloading the DB, what impact it will have on NagiosXI.
You will see less disk space used, and lower IO for sure. *Possible* decrease in RAM and CPU usage.


chicjo01 wrote:I will be using NagiosXI version 4 after it is setup.
Are you certain of the version? Nagios Core has a version 4 but Nagios XI is based on the release year as a major version, and the latest is 2014R2.7

Re: MySQL and Postgress Details

Posted: Thu Sep 03, 2015 1:40 am
by karthek
I have few questions on the databases used in xi.

What content each of the database contains, I mean what type of data it will store?

mysql, nagiosql, postgresql?

If i understand correctly..

mysql contains the actual data about hosts and services..
nagiosql contains the configuration information of services and hosts
postgresql might have the user info and the xi web backend

please clarify.

Re: MySQL and Postgress Details

Posted: Thu Sep 03, 2015 9:03 am
by chicjo01
karthek wrote:I have few questions on the databases used in xi.

What content each of the database contains, I mean what type of data it will store?

mysql, nagiosql, postgresql?

If i understand correctly..

mysql contains the actual data about hosts and services..
nagiosql contains the configuration information of services and hosts
postgresql might have the user info and the xi web backend

please clarify.
You are correct about the different DBs used by Nagios XI. Based on my research and testing, Nagios XI is currently using 2 different DB types and 3 different schema.

- 3 Different Schema:
(Postgres) -- nagiosxi = Admin Information and User account
(MySQL) -- ndoutils = Events / Alerts
(MySQL) -- nagiosql = Configuration data

So far, it appears the file /usr/local/nagiosxi/html/config.inc.php contains the DB args to login if you want to poke around. You may want to be careful if you do.

Are you looking for some specific information?

Example:
In the PostgresDB is the xi_users table which house the user account of who is able to login. Where as xi_usermeta table stores the permission level and extra information I can only assume is used when viewing or referencing the user in the Nagios Xi application.

xi_users Table Structure:
user_id integer NOT NULL DEFAULT nextval('xi_users_user_id_seq'::regclass),
username character varying(64) NOT NULL,
password character varying(64) NOT NULL,
name character varying(64),
email character varying(128) NOT NULL,
backend_ticket character varying(128),
enabled smallint NOT NULL DEFAULT (1)::smallint,

xi_usermeta Table Structure:
usermeta_id integer NOT NULL DEFAULT nextval('xi_usermeta_usermeta_id_seq'::regclass),
user_id integer NOT NULL,
keyname character varying(255) NOT NULL,
keyvalue text,
autoload smallint DEFAULT (0)::smallint,

Re: MySQL and Postgress Details

Posted: Thu Sep 03, 2015 11:19 am
by jolson
Thanks chicjo01.

karthek,

I would like to make you aware that the next version of XI will concatenate our databases into MySQL entirely - Postgresql is going to be removed so that we don't have multiple databases on the server.

Re: MySQL and Postgress Details

Posted: Fri Sep 04, 2015 12:41 am
by karthek
Hi chicjo0,

I was looking for the overview of contents stored in DB's and couldn't find any official doc on this.

Thank you for the insight.

Jolson,

Thanks for the info. Any idea on release date?