MySQL and Postgress Details

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
User avatar
chicjo01
Posts: 194
Joined: Tue Jul 28, 2015 2:52 pm

MySQL and Postgress Details

Post 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.
jdalrymple
Skynet Drone
Posts: 2620
Joined: Wed Feb 11, 2015 1:56 pm

Re: MySQL and Postgress Details

Post 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.
User avatar
chicjo01
Posts: 194
Joined: Tue Jul 28, 2015 2:52 pm

Re: MySQL and Postgress Details

Post by chicjo01 »

Thank you, this was very helpful.
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

Re: MySQL and Postgress Details

Post by hsmith »

chicjo01 wrote:Thank you, this was very helpful.
Glad to hear. Is there anything else we can help you out with?
Former Nagios Employee.
me.
User avatar
chicjo01
Posts: 194
Joined: Tue Jul 28, 2015 2:52 pm

Re: MySQL and Postgress Details

Post 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.
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: MySQL and Postgress Details

Post 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
Former Nagios employee
karthek
Posts: 64
Joined: Fri Aug 14, 2015 5:55 am
Location: INDIA

Re: MySQL and Postgress Details

Post 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.
"Machines don't make mistakes, we do."
User avatar
chicjo01
Posts: 194
Joined: Tue Jul 28, 2015 2:52 pm

Re: MySQL and Postgress Details

Post 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,
jolson
Attack Rabbit
Posts: 2560
Joined: Thu Feb 12, 2015 12:40 pm

Re: MySQL and Postgress Details

Post 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.
Twits Blog
Show me a man who lives alone and has a perpetually clean kitchen, and 8 times out of 9 I'll show you a man with detestable spiritual qualities.
karthek
Posts: 64
Joined: Fri Aug 14, 2015 5:55 am
Location: INDIA

Re: MySQL and Postgress Details

Post 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?
"Machines don't make mistakes, we do."
Locked