Page 1 of 1

Missing .cfg files from Nagios XI Offline Install

Posted: Wed Oct 24, 2018 11:21 am
by HIINNS
All,

I am relatively new to Nagios, so forgive my ignorance. I just installed the offline version of Nagios XI 5.4.13. The first thing I did was to install our license. This was no problem. I next ran the "Check File Permissions" link in Administration and got the following:

The following configuration files have incorrect permissions:
⦁ /usr/local/nagios/etc/commands.cfg (OWNER=root, GROUP=root, PERMS=u---------)
⦁ /usr/local/nagios/etc/contactgroups.cfg (OWNER=root, GROUP=root, PERMS=u---------)
⦁ /usr/local/nagios/etc/contacts.cfg (OWNER=root, GROUP=root, PERMS=u---------)
⦁ /usr/local/nagios/etc/contacttemplates.cfg (OWNER=root, GROUP=root, PERMS=u---------)
⦁ /usr/local/nagios/etc/hostdependencies.cfg (OWNER=root, GROUP=root, PERMS=u---------)
⦁ /usr/local/nagios/etc/hostescalations.cfg (OWNER=root, GROUP=root, PERMS=u---------)
⦁ /usr/local/nagios/etc/hostextinfo.cfg (OWNER=root, GROUP=root, PERMS=u---------)
⦁ /usr/local/nagios/etc/hostgroups.cfg (OWNER=root, GROUP=root, PERMS=u---------)
⦁ /usr/local/nagios/etc/hosttemplates.cfg (OWNER=root, GROUP=root, PERMS=u---------)
⦁ /usr/local/nagios/etc/servicedependencies.cfg (OWNER=root, GROUP=root, PERMS=u---------)
⦁ /usr/local/nagios/etc/serviceescalations.cfg (OWNER=root, GROUP=root, PERMS=u---------)
⦁ /usr/local/nagios/etc/serviceextinfo.cfg (OWNER=root, GROUP=root, PERMS=u---------)
⦁ /usr/local/nagios/etc/servicegroups.cfg (OWNER=root, GROUP=root, PERMS=u---------)
⦁ /usr/local/nagios/etc/servicetemplates.cfg (OWNER=root, GROUP=root, PERMS=u---------)
⦁ /usr/local/nagios/etc/timeperiods.cfg (OWNER=root, GROUP=root, PERMS=u---------)
Each of these config files needs to be writable by the apache and nagios users. To fix this problem, follow these steps:
⦁ Login to your Nagios XI server via SSH as the root user
⦁ Execute the following commands:
⦁ /usr/local/nagiosxi/scripts/reset_config_perms.sh

I checked the /usr/local/Nagios/etc directory and none of the above .cfg files were there. I next tried executing the /usr/local/nagiosxi/scripts/reset_config_perms.sh script, as root, which didn't create the files. How do I get these files created?

Re: Missing .cfg files from Nagios XI Offline Install

Posted: Wed Oct 24, 2018 4:51 pm
by npolovenko
Hello, @HIINNS. Are you sure that there are no configs in the /usr/local/nagios/etc/ folder? This is unusual, especially since the verify config says that they're there but have wrong permissions.

Please run the following commands and show me the output:
chmod -R 777 -R /usr/local/nagios/etc
chown -R apache:nagios /usr/local/nagios/etc
service nagios restart
ls -l /usr/local/nagios/etc

Re: Missing .cfg files from Nagios XI Offline Install

Posted: Wed Oct 24, 2018 4:51 pm
by npolovenko
Hello, @HIINNS. Are you sure that there are no configs in the /usr/local/nagios/etc/ folder? This is unusual, especially since the verify config says that they're there but have wrong permissions.

Please run the following commands and show me the output:
chmod -R 777 -R /usr/local/nagios/etc
chown -R apache:nagios /usr/local/nagios/etc
service nagios restart
ls -l /usr/local/nagios/etc