Nagios DB Sizing help for one host

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
lijinsc
Posts: 9
Joined: Tue Jul 26, 2016 4:11 am

Nagios DB Sizing help for one host

Post by lijinsc »

Hi,
In order to size my Nagios MySQL/Maria Db, I would like to know the below

How much data size is getting saved in one check for a host who has 5 services configured. this will help me to know how much DB size is required for my 10000 hosts with 20 services each.

please help

Lijin
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: Nagios DB Sizing help for one host

Post by mcapra »

DISCLAIMER: There's a whole slew of variables that could affect database size, so by no means are the following numbers meant to cover every possible case. Logging, notifications, host/service groups, etc can all impact these numbers.

Adding a single Windows host via the wizard (1 host with 5 services) increased the size of the following tables by the following numbers (in bytes):

Code: Select all

nagios   :: 18298
nagiosql ::  1673
nagiosxi ::  2928
My table sizes (in bytes) before and after if you would like to check my math:

Code: Select all

-- before
"nagios"	"1065268.0"
"nagiosql"	"423159.0"
"nagiosxi"	"203321.0"


-- after
"nagios"	"1083566.0"
"nagiosql"	"424832.0"
"nagiosxi"	"206249.0"
From a co-worker, the largest DB he has seen was around 40GB.
Former Nagios employee
https://www.mcapra.com/
lijinsc
Posts: 9
Joined: Tue Jul 26, 2016 4:11 am

Re: Nagios DB Sizing help for one host

Post by lijinsc »

Thanks for you response

this helps a lot, but need couple more clarity needed

the different in these tables is for one check (5 mins) or for the entire 24 hours
can we share other tables which gets added with more size due to this host addition

please clarify

Lijin
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: Nagios DB Sizing help for one host

Post by mcapra »

Those sizes are immediately before and immediately after adding a host via the Windows Server wizard. The host is using a standard 5 minute check interval.
lijinsc wrote:can we share other tables which gets added with more size due to this host addition
Not sure what you mean by this. Could you clarify?
Former Nagios employee
https://www.mcapra.com/
lijinsc
Posts: 9
Joined: Tue Jul 26, 2016 4:11 am

Re: Nagios DB Sizing help for one host

Post by lijinsc »

can you share other DB tables (other than 3 tables you have shared) which gets incremented with the DB size when a host is added and after a first check with 5 mins interval.

I want to know the complete size which the DB allocates to the host after first check (5 mins) due to this host addition

Lijin
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Nagios DB Sizing help for one host

Post by tgriep »

What mcapra posted is the size of the 3 databases that Nagios uses to store it's data which includes all of the tables in each database so they are the complete sizes.
Be sure to check out our Knowledgebase for helpful articles and solutions!
rajiv30299
Posts: 9
Joined: Mon Jul 18, 2016 4:12 am

Re: Nagios DB Sizing help for one host

Post by rajiv30299 »

Team,

Please help me to understand with below table details :

"nagios"
"nagiosql"
"nagiosxi"

Whether data will be stored in these tables. Or is it for different, like Nagios core detail will be stored in nagios table, Alarm and Qos will be stored in nagiosql , and Nagiosxi details will be stored in nagiosxi.
lijinsc
Posts: 9
Joined: Tue Jul 26, 2016 4:11 am

Re: Nagios DB Sizing help for one host

Post by lijinsc »

hi all,
Myself and Rajiv from same team

To make the question from Rajiv clarify in better way am re phrasing it

We would like to know what kind of data gets store in the below tables

nagios
nagiosql
nagiosxi

This is to do a sizing for choosing how much DB disk space required for Nagios MySQL DB, Nagios XI Master and Nagios Ore Pollers

In addition to that another question we have is where is the log files, config files, events, performance data gets saved in nagios if the Nagios infrastructre having Nagios XI Master, Nagios Core Poller and Nagios MySQL DB in 3 separate instances

Thanks
Lijin
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Nagios DB Sizing help for one host

Post by tmcdonald »

rajiv30299 wrote:Please help me to understand with below table details :

"nagios"
"nagiosql"
"nagiosxi"

Whether data will be stored in these tables.
These are whole databases, not individual tables.

Within the nagios database you have generally your host/service information, state history, log entries, acknowledgements, and other status information. It is used by Core and the NDOUtils project in an XI setup to store data in the database for reporting purposes.

Inside nagiosql you have the information which is stored in the Core Config Manager, and is essentially all of the configuration information for your hosts, services, contacts, etc. Gets updated whenever you make changes in the CCM such as adding or removing hosts/services.

nagiosxi holds information specific to XI, such as user accounts, dashboards, site preferences, and language settings.
lijinsc wrote: In addition to that another question we have is where is the log files, config files, events, performance data gets saved in nagios if the Nagios infrastructre having Nagios XI Master, Nagios Core Poller and Nagios MySQL DB in 3 separate instances
Broadly speaking in a typical single-server XI setup:
  • Log entries are stored in /usr/local/nagios/var/nagios.log for Core, and under /usr/local/nagiosxi/var/ for Nagios XI
  • Config files are stored in the nagiosql database as mentioned above, and are written out to /usr/local/nagios/etc/ when an Apply Config is performed
  • Performance data is stored in /usr/local/nagios/share/perfdata/ in RRD files
When you have the MySQL db offloaded, the database name is still nagiosql but obviously the CCM tables are stored on another server. In a Nagios Core setup the paths above may vary depending on how you have it configured, and NDOUtils (and therefor the nagios database) may not be in use on the Core server, but should still be on XI.
Former Nagios employee
rajiv30299
Posts: 9
Joined: Mon Jul 18, 2016 4:12 am

Re: Nagios DB Sizing help for one host

Post by rajiv30299 »

Thanks Donald for the update.

If everything is offloaded, then what kind of data will be stored in Master (XI), Poller (Core) and in DB server.

This information would help us in sizing the respective infra.

Appreciate your quick response.

regards
rajiv
Locked