Page 1 of 1
command to check DB size
Posted: Fri Nov 03, 2017 4:13 am
by DOkuwa
I want to know the command to check database size in Nagios as the database is integrated in Nagios
Re: command to check DB size
Posted: Fri Nov 03, 2017 6:33 am
by tacolover101
you should just be able to du / df the data directory that SQL lives in.
i don't have an XI machine handy so i can't tell you the exact path. hopefully that helps point you in the right direction.
Re: command to check DB size
Posted: Fri Nov 03, 2017 11:39 am
by DOkuwa
Thanks
I can't seems to find the DB as it is embedded in the Nagios application and operating system
My file structure does not tell me where the DB is
or it is not mounted on a separate filesystem
Re: command to check DB size
Posted: Fri Nov 03, 2017 2:03 pm
by npolovenko
@DOkuwa, By default, Nagios Core is not using any database. So unless you are using something like NDOUtils, chances are you might not even have MYSQL. You can try the command
service mysqld status or
which mysql to see if you have some kind of output indicating that you have one installed.
Re: command to check DB size
Posted: Mon Nov 06, 2017 4:57 am
by DOkuwa
thanks
but how does it store its data
is in a flat file
Re: command to check DB size
Posted: Mon Nov 06, 2017 9:21 am
by mcapra
Nagios Core stores it's live data in memory. What objects it should be checking, what the status of those objects is, what checks should be executed when, etc; All in memory.
DOkuwa wrote:but how does it store its data
If you
really want to get more granular than "in-memory", I'd recommend looking at the source. Here's the core structures:
https://github.com/NagiosEnterprises/na ... /objects.h
When Nagios Core starts up, it reads from the configuration files which are flat-files stored on disk. It parses those configuration files and builds the appropriate object which is then stuffed into memory. However, once the daemon is started, I don't believe it references those files for the duration of it's run time.
Did you have a particular use case you wanted some insights on? Specific advice could probably be offered.
Re: command to check DB size
Posted: Mon Nov 06, 2017 1:58 pm
by dwhitfield
mcapra wrote:
Did you have a particular use case you wanted some insights on? Specific advice could probably be offered.
Yes, that would be very helpful. Thanks
@mcapra!