Nagios core 4 n centos 6 not populating host and service tab

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
Daithi
Posts: 8
Joined: Wed Sep 20, 2017 11:20 am

Nagios core 4 n centos 6 not populating host and service tab

Post by Daithi »

After a system crash I couldn't find the files for our old version of Nagios (ver 3)
so I installed version 4 and associated packages. It seems to be working OK but
there are several MySQL tables that are empty i.e. nagios_hosts and nagios_services
These have data:
nagios_commands
nagios_commenthistory
nagios_comments
nagios_configfilevariables
nagios_conninfo
nagios_contact_notificationcommands
nagios_contacts
nagios_contactstatus
nagios_externalcommands
nagios_hostchecks
nagios_hoststatus
nagios_logentries
nagios_objects
nagios_processevents
nagios_servicechecks
nagios_servicestatus
nagios_timeperiods
nagios_timeperiod_timeranges

All other tables are empty. I have set event_broker_options=-1 in nagios.cfg but it doesn't seem to affect this problem

CentOS release 6.5
nagios-4.3.2-5.el6.x86_64
nagios-common-4.3.2-5.el6.x86_64
nsca-2.7.2-8.el6.x86_64
ndoutils-1.5.2-1.el6.x86_64
ndoutils-mysql-1.5.2-1.el6.x86_64

Any help or suggestions welcomed!

Thanks
Dave Gavin
dwasswa

Re: Nagios core 4 n centos 6 not populating host and service

Post by dwasswa »

When you installed Nagios 4 was it a clean installe or you installed it on top of the crashed Nagios 3 server?

Also,did you backup your old Nasgios 3 server before it crashed?
Daithi
Posts: 8
Joined: Wed Sep 20, 2017 11:20 am

Re: Nagios core 4 n centos 6 not populating host and service

Post by Daithi »

It's a cloud server and has other functions so I can't flush it.
I have saved the configuration files for reference and I have several backups.

Thanks,
Dave
Daithi
Posts: 8
Joined: Wed Sep 20, 2017 11:20 am

Re: Nagios core 4 n centos 6 not populating host and service

Post by Daithi »

I just checked with the guy who runs the other functions and as as they feed off the nagios database tables we can back everything up and rebuild the server if it really makes that much of a difference, I've seen this warning on most of the nagios discussions I've found so I guess it must be an issue.
dwasswa

Re: Nagios core 4 n centos 6 not populating host and service

Post by dwasswa »

Okay lets try repairing this database;follow the steps below:

1.

Code: Select all

service mysqld stop
2.

Code: Select all

cd /var/lib/mysql/nagios
3.

Code: Select all

myisamchk -r -f nagios_<corrupted_table>
4.

Code: Select all

service mysqld start
Daithi
Posts: 8
Joined: Wed Sep 20, 2017 11:20 am

Re: Nagios core 4 n centos 6 not populating host and service

Post by Daithi »

It turns out that nagios stopped writing host and service info to the database tables in version 3, they use retention.dat and status.dat, flushing the memory data periodically and before shutdown. nagios xi has returned to using the hosts and services db tables so I guess we'll just have to pay the price to continue using nagios.

Thanks for the help
Dave
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: Nagios core 4 n centos 6 not populating host and service

Post by npolovenko »

@Daithi, Glad you figured out this issue. Let us know if you need any other questions.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Locked