Page 1 of 2
Nagios database is not getting updated while nagiosql is
Posted: Thu Apr 27, 2017 4:20 am
by pratik.patel
I am in process of migrating from nagios core to nagios xi.
I moved one host and service to nagiosxi. Able to see the added host on host list and same for the service. Also able to run command from GUI, but I am not able to view the host and service on home/dashboard.
[root@xxxxxxx]# echo 'select count(*) from nagios.nagios_hosts;' | mysql -s -pnagiosxi
1
[root@xxxxxxx]# echo 'select count(*) from nagiosql.tbl_host;' | mysql -s -pnagiosxi
2
Re: Nagios database is not getting updated while nagiosql is
Posted: Thu Apr 27, 2017 7:22 am
by pratik.patel
I re-installed nagios again and its working fine now.
I still have one question what is the use of 3 databases in nagios:
nagios
nagiosql
nagiosxi
Re: Nagios database is not getting updated while nagiosql is
Posted: Thu Apr 27, 2017 11:49 am
by cdienger
Glad to hear you were able to resolve the initial issue. To answer your follow up, the nagios db is for the running config, nagiosql is for the CCM, and nagiosxi is for the interface (users, dashboards, etc.). Let me know if you have any further questions!
Re: Nagios database is not getting updated while nagiosql is
Posted: Fri Apr 28, 2017 3:00 am
by pratik.patel
Thank you.
Quiestion -1.Do CCM has nagios reload option ? because every time I apply configurations it restart the nagios and restart process is not good as I use to follow nagios reload while working with nagios core. According to my knowledge nagios restart will stop the existing process (checks and etc) and will start the process again , that will cause the process in middle to die while nagios reload will just reload the configuration.
Quiestion -2. I am in process to migrate nagios core to nagios xi. Once I import all config files from nagios core and upload on CCM, nagios xi will start the checks and alerts. I do not want to send alert as I am doing migration.
So how to disable email, sms and all other alerts?
Thanks,
Pratik
Re: Nagios database is not getting updated while nagiosql is
Posted: Fri Apr 28, 2017 7:48 am
by tacolover101
1. nope, with XI you need to do a full restart as it re-writes out the database for the Core module to pick up on.
2. from the admin -> system status (i think that's what it's called, or something similar, maybe 'monitoring engine status'?) -> there should be a page with green dots representing a part of Nagios is running. Click the green circle that corresponds to notifications, and it'll go red - that will turn notifications off globally. the other option is modifying the nagios.cfg, and setting them off there too - then restarting the nagios service.
Re: Nagios database is not getting updated while nagiosql is
Posted: Fri Apr 28, 2017 9:53 am
by pratik.patel
So what happen to the process/checks running during the nagios restart because I have 600 hosts and around 7000 services configured.
That implies that every sec checks are running. If nagios restart is done it will kill the process and don't know what it will result may be email alert or it will skip the check?
Re: Nagios database is not getting updated while nagiosql is
Posted: Fri Apr 28, 2017 10:41 am
by pratik.patel
why "register 1" is appended to every hosts/services file I move from nagios core to nagios xi.
I did Import config files on CCM and write files and then verufy files. No error
When i checked files in hosts and service dir, register 1 is appended to each and every files.
Any reason ??
Re: Nagios database is not getting updated while nagiosql is
Posted: Fri Apr 28, 2017 11:20 am
by tgriep
When the nagios daemon is restarted, it should stop running new checks, finish off the current checks, save the current settings and then restart.
There will be a slight delay when this happens but is shouldn't send an emails or skip checks.
The register variable is used to indicate whether or not the object definition should be "registered" with Nagios.
By default, all object definitions are registered.
Values are as follows: 0 = do NOT register object definition, 1 = register object definition (this is the default).
This variable is NOT inherited; every (partial) object definition used as a template must explicitly set the register directive to be 0.
This prevents the need to override an inherited register directive with a value of 1 for every object that should be registered.
Re: Nagios database is not getting updated while nagiosql is
Posted: Sat Apr 29, 2017 10:09 am
by pratik.patel
Thank you
I have added few hosts and services into static directory and few through CCM. So if I disable notification and active checks from ngaios xi GUI, will it disable for all hosts and services in static too?
thanks,
Pratik
Re: Nagios database is not getting updated while nagiosql is
Posted: Sat Apr 29, 2017 11:00 am
by pratik.patel
Active Service Checks is not getting disable from GUI.
I clicked it and it says that command submitted successfully but the check is not getting disable.