Page 2 of 2

Re: nagios service would not start

Posted: Thu Jan 26, 2017 1:32 pm
by btemple
So we found about 18 items host / services in the nagios.log that had warnings. 2 hosts did not have a contact or notifications interval etc. In the past we would get a config error and not be able to apply the config. We also found 5 that had duplicate service names

We fixed all the errors then applied the config and the nagios service stayed stable. We have since run a manual backup and are keeping an eye on the logs.

Is it possible that the pre-check should have failed but allowed us to apply the config anyway, and then later the bad config caused the service to stop and not be able to restart ?

Re: nagios service would not start

Posted: Thu Jan 26, 2017 2:37 pm
by btemple
we tried to delete a host WHLCTX2 and that stopped the nagios service and it would not start again

Re: nagios service would not start

Posted: Thu Jan 26, 2017 3:02 pm
by btemple
So I restored and everything is good. I went back to delete the host WHLCTX2 but this time remembered to check for dependent relationships.
I then removed those relationships and deleted the host. Nagios is now still running.

It appears that the "cannot delete because of dependent relationships" banner / warning may not be functioning .....

Re: nagios service would not start

Posted: Thu Jan 26, 2017 3:40 pm
by btemple
So after a few more changes it failed again

Re: nagios service would not start

Posted: Thu Jan 26, 2017 3:50 pm
by rkennedy
Can you show us a screenshot of the exact error you're seeing at this point?

Re: nagios service would not start

Posted: Fri Jan 27, 2017 1:53 pm
by btemple
Ok we have decided to migrate to a new host. Our current platform is about 3 years old and was re-purposed at that time.

Can you provide guidance in a clean migration that doesn't include our current database. Meaning all checks and hosts ? We would like to keep all bandwidth .rrd files to if possible.

Please let me know what you guys think. I do not trust our current mysql to migrate without keeping the corruption.

Also what do you think about theses specs /

4 cpu 16 gb of ram 160 gb disk (vmware)

Wxnagios01 = 600 hosts 4704 checks

Re: nagios service would not start

Posted: Fri Jan 27, 2017 3:02 pm
by avandemore
Honestly, the easiest thing to do is a full backup / restore:

https://assets.nagios.com/downloads/nag ... ios-XI.pdf

The find the large tables:

Code: Select all

mysql -uroot -pnagiosxi -e 'SELECT table_schema as `Database`, table_name AS `Table`, round(((data_length + index_length) / 1024 / 1024), 2) `Size in MB` FROM information_schema.TABLES ORDER BY (data_length + index_length) DESC;'
And truncate the large tables.

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

Re: nagios service would not start

Posted: Wed Feb 01, 2017 9:56 am
by btemple
So this is our plan

Go from centos 6.8 to Red Hat 7

can this be used a straight back / restore type migration ?

Re: nagios service would not start

Posted: Wed Feb 01, 2017 12:42 pm
by avandemore
Yes as long as the XI versions match. You can upgrade the new install later if need be.