Hi,
We have just installed Nagios xi offline, installation completed successfully.
Somehow the installation seems to be incomplete, when entering Nagios xi we see the following error:
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---------)
Problem is the these files does not exist, how do we go about this?
-Claus
Nagios xi offline install missing .cfg files
-
- Posts: 1288
- Joined: Tue Jun 01, 2021 1:27 pm
Re: Nagios xi offline install missing .cfg files
Hello @swackle
Thanks for reaching out, appears that we are missing some Core components and want to have you run through the install:
Then run through the reconfig:
If things are not coming across please provide the install.log located in the Nagios xi install directory.
Thanks,
Perry
Thanks for reaching out, appears that we are missing some Core components and want to have you run through the install:
Code: Select all
cd <thedirectorywheretheinstalleris>/nagiosxi/subcomponents/nagioscore
./install
Code: Select all
/usr/local/nagiosxi/scripts/reconfigure_nagios.sh
Thanks,
Perry
-
- Posts: 16
- Joined: Thu Aug 20, 2020 5:43 am
Re: Nagios xi offline install missing .cfg files
Hi Perry,
We are doing a offline installation so do not have that option running the ./install.
Are there any other way we can go about to make sure that all components are correct installed.
-Claus
We are doing a offline installation so do not have that option running the ./install.
Are there any other way we can go about to make sure that all components are correct installed.
-Claus
-
- Posts: 1288
- Joined: Tue Jun 01, 2021 1:27 pm
Re: Nagios xi offline install missing .cfg files
Hello @swackle
Thanks for following up, the install.log is located in the 'nagiosxi' install directory, which provides the full install results.
I also verified that the './install' or './upgrade' that I sent you in the previous post do not go out on to the internet:
Perry
Thanks for following up, the install.log is located in the 'nagiosxi' install directory, which provides the full install results.
I also verified that the './install' or './upgrade' that I sent you in the previous post do not go out on to the internet:
Verify the Core Configuration Manager by:@swackle
Thanks for reaching out, appears that we are missing some Core components and want to have you run through the install:
Then run through the reconfig:Code: Select all
cd <thedirectorywheretheinstalleris>/nagiosxi/subcomponents/nagioscore ./install
If things are not coming across please provide the install.log located in the Nagios xi install directory.Code: Select all
/usr/local/nagiosxi/scripts/reconfigure_nagios.sh
- Head over to the Nagios xi web console ==> Core Configuration Manager (CCM) ==> Config File Management ==> [Delete Files] ==> [Write Files] ==> [Verify Files]
- Core Configuration Manager (CCM) ==> Under Quick Tools ==> "Apply Configuration"
- Restart nagios.service by terminal command: systemctl restart nagios
- Verify
Perry
-
- Posts: 16
- Joined: Thu Aug 20, 2020 5:43 am
Re: Nagios xi offline install missing .cfg files
Hi Perry,
Tried on two different servers now with same result.
nagios core is not running.
# systemctl status nagios
● nagios.service - Nagios Core 4.4.6
Loaded: loaded (/usr/lib/systemd/system/nagios.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Fri 2022-03-04 08:14:25 CET; 25s ago
Docs: https://www.nagios.org/documentation
Process: 30192 ExecStopPost=/bin/rm -f /usr/local/nagios/var/rw/nagios.cmd (code=exited, status=0/SUCCESS)
Process: 30189 ExecStartPre=/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg (code=exited, status=1/FAILURE)
cfg files are missing and most log files including install.log is not present.
Offline install was completed with no errors (install.log not present so cant see there?)
running ./upgrade end with: "Nothing to do"
prerequisites packages installed as stated here: https://assets.nagios.com/downloads/nag ... onment.pdf
Sudoers is looking like this:
User_Alias NAGIOSxi=nagios
User_Alias NAGIOSxiWEB=apache
NAGIOSxi hostnames = NOPASSWD:/etc/init.d/nagios start
NAGIOSxi hostnames = NOPASSWD:/etc/init.d/nagios stop
NAGIOSxi hostnames = NOPASSWD:/etc/init.d/nagios restart
NAGIOSxi hostnames = NOPASSWD:/etc/init.d/nagios reload
NAGIOSxi hostnames = NOPASSWD:/etc/init.d/nagios status
NAGIOSxi hostnames = NOPASSWD:/etc/init.d/nagios checkconfig
NAGIOSxi hostnames = NOPASSWD:/etc/init.d/npcd start
NAGIOSxi hostnames = NOPASSWD:/etc/init.d/npcd stop
NAGIOSxi hostnames = NOPASSWD:/etc/init.d/npcd restart
NAGIOSxi hostnames = NOPASSWD:/etc/init.d/npcd reload
NAGIOSxi hostnames = NOPASSWD:/etc/init.d/npcd status
NAGIOSxi hostnames = NOPASSWD:/usr/bin/php /usr/local/nagiosxi/scripts/components/autodiscover_new.php *
NAGIOSxi hostnames = NOPASSWD:/usr/bin/php /usr/local/nagiosxi/scripts/send_to_nls.php *
NAGIOSxi hostnames = NOPASSWD:/usr/bin/php /usr/local/nagiosxi/scripts/migrate/migrate.php *
NAGIOSxi hostnames = NOPASSWD:/usr/local/nagiosxi/scripts/components/getprofile.sh
NAGIOSxi hostnames = NOPASSWD:/usr/local/nagiosxi/scripts/upgrade_to_latest.sh
NAGIOSxi hostnames = NOPASSWD:/usr/local/nagiosxi/scripts/change_timezone.sh
NAGIOSxi hostnames = NOPASSWD:/usr/local/nagiosxi/scripts/manage_services.sh *
NAGIOSxi hostnames = NOPASSWD:/usr/local/nagiosxi/scripts/reset_config_perms.sh
NAGIOSxi hostnames = NOPASSWD:/usr/local/nagiosxi/scripts/manage_ssl_config.sh *
NAGIOSxi hostnames = NOPASSWD:/usr/local/nagiosxi/scripts/backup_xi.sh *
NAGIOSxiWEB hostnames = NOPASSWD:/etc/init.d/snmptt restart
NAGIOSxiWEB hostnames = NOPASSWD:/usr/bin/tail -100 /var/log/messages
NAGIOSxiWEB hostnames = NOPASSWD:/usr/bin/tail -100 /var/log/httpd/error_log
NAGIOSxiWEB hostnames = NOPASSWD:/usr/bin/tail -100 /var/log/mysqld.log
NAGIOSxiWEB hostnames = NOPASSWD:/usr/bin/php /usr/local/nagiosxi/scripts/components/autodiscover_new.php *
So seems to be a issue with some setup on our offline RHEL hosts since we end up with same result on two servers.
-Claus
Tried on two different servers now with same result.
nagios core is not running.
# systemctl status nagios
● nagios.service - Nagios Core 4.4.6
Loaded: loaded (/usr/lib/systemd/system/nagios.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Fri 2022-03-04 08:14:25 CET; 25s ago
Docs: https://www.nagios.org/documentation
Process: 30192 ExecStopPost=/bin/rm -f /usr/local/nagios/var/rw/nagios.cmd (code=exited, status=0/SUCCESS)
Process: 30189 ExecStartPre=/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg (code=exited, status=1/FAILURE)
cfg files are missing and most log files including install.log is not present.
Offline install was completed with no errors (install.log not present so cant see there?)
running ./upgrade end with: "Nothing to do"
prerequisites packages installed as stated here: https://assets.nagios.com/downloads/nag ... onment.pdf
Sudoers is looking like this:
User_Alias NAGIOSxi=nagios
User_Alias NAGIOSxiWEB=apache
NAGIOSxi hostnames = NOPASSWD:/etc/init.d/nagios start
NAGIOSxi hostnames = NOPASSWD:/etc/init.d/nagios stop
NAGIOSxi hostnames = NOPASSWD:/etc/init.d/nagios restart
NAGIOSxi hostnames = NOPASSWD:/etc/init.d/nagios reload
NAGIOSxi hostnames = NOPASSWD:/etc/init.d/nagios status
NAGIOSxi hostnames = NOPASSWD:/etc/init.d/nagios checkconfig
NAGIOSxi hostnames = NOPASSWD:/etc/init.d/npcd start
NAGIOSxi hostnames = NOPASSWD:/etc/init.d/npcd stop
NAGIOSxi hostnames = NOPASSWD:/etc/init.d/npcd restart
NAGIOSxi hostnames = NOPASSWD:/etc/init.d/npcd reload
NAGIOSxi hostnames = NOPASSWD:/etc/init.d/npcd status
NAGIOSxi hostnames = NOPASSWD:/usr/bin/php /usr/local/nagiosxi/scripts/components/autodiscover_new.php *
NAGIOSxi hostnames = NOPASSWD:/usr/bin/php /usr/local/nagiosxi/scripts/send_to_nls.php *
NAGIOSxi hostnames = NOPASSWD:/usr/bin/php /usr/local/nagiosxi/scripts/migrate/migrate.php *
NAGIOSxi hostnames = NOPASSWD:/usr/local/nagiosxi/scripts/components/getprofile.sh
NAGIOSxi hostnames = NOPASSWD:/usr/local/nagiosxi/scripts/upgrade_to_latest.sh
NAGIOSxi hostnames = NOPASSWD:/usr/local/nagiosxi/scripts/change_timezone.sh
NAGIOSxi hostnames = NOPASSWD:/usr/local/nagiosxi/scripts/manage_services.sh *
NAGIOSxi hostnames = NOPASSWD:/usr/local/nagiosxi/scripts/reset_config_perms.sh
NAGIOSxi hostnames = NOPASSWD:/usr/local/nagiosxi/scripts/manage_ssl_config.sh *
NAGIOSxi hostnames = NOPASSWD:/usr/local/nagiosxi/scripts/backup_xi.sh *
NAGIOSxiWEB hostnames = NOPASSWD:/etc/init.d/snmptt restart
NAGIOSxiWEB hostnames = NOPASSWD:/usr/bin/tail -100 /var/log/messages
NAGIOSxiWEB hostnames = NOPASSWD:/usr/bin/tail -100 /var/log/httpd/error_log
NAGIOSxiWEB hostnames = NOPASSWD:/usr/bin/tail -100 /var/log/mysqld.log
NAGIOSxiWEB hostnames = NOPASSWD:/usr/bin/php /usr/local/nagiosxi/scripts/components/autodiscover_new.php *
So seems to be a issue with some setup on our offline RHEL hosts since we end up with same result on two servers.
-Claus
-
- Posts: 1288
- Joined: Tue Jun 01, 2021 1:27 pm
Re: Nagios xi offline install missing .cfg files
Hello @swackle
Thanks for following up and would like to take a look at your Nagios xi System Profile so we can see what that looks like.
To send us your system profile.
Perry
Thanks for following up and would like to take a look at your Nagios xi System Profile so we can see what that looks like.
To send us your system profile.
- Login to the Nagios xi GUI using a web browser.
- Click the "Admin" > "System Profile" Menu
- Click the "Download Profile" button
- Save the profile.zip file and share via Private Message
Perry
-
- Posts: 16
- Joined: Thu Aug 20, 2020 5:43 am
Re: Nagios xi offline install missing .cfg files
Hi Perry,
Profile send in a PM.
-Claus
Profile send in a PM.
-Claus
-
- Posts: 1288
- Joined: Tue Jun 01, 2021 1:27 pm
Re: Nagios xi offline install missing .cfg files
Hello @swackle
Want to circle back a bit, appears that we are missing some components from the fullinstall, and want to find out if you were able to verify that the rpm's were created locally.
"https://assets.nagios.com/downloads/nag ... onment.pdf"
Let's also get some system info to help us out:
Please run through the 'fullinstall' and provide the install.log along with the results listed.
Thanks,
Perry
Want to circle back a bit, appears that we are missing some components from the fullinstall, and want to find out if you were able to verify that the rpm's were created locally.
"https://assets.nagios.com/downloads/nag ... onment.pdf"
Let's also get some system info to help us out:
Code: Select all
cat /usr/local/nagiosxi/var/xiversion | grep full
sudo cat /etc/os-release
cat /etc/os-release
uname -a
lsb_release -a
hostnamectl
php -v
php -r 'phpinfo();'
sestatus
rpm -qa > /tmp/results.txt ##found in /tmp/results.txt
Thanks,
Perry
-
- Posts: 16
- Joined: Thu Aug 20, 2020 5:43 am
Re: Nagios xi offline install missing .cfg files
Hi Perry,
./fullinstall ends the same with "nothing to do", runs through all the RPMs and says noting to update.
Have PM all the system info requested.
Attached the xi.install.log and results.log.
-Claus
./fullinstall ends the same with "nothing to do", runs through all the RPMs and says noting to update.
Have PM all the system info requested.
Attached the xi.install.log and results.log.
-Claus
You do not have the required permissions to view the files attached to this post.
-
- Posts: 1288
- Joined: Tue Jun 01, 2021 1:27 pm
Re: Nagios xi offline install missing .cfg files
Hello @swackle
Thanks for following up with the results, appears that it is hitting on an issue with the sudoers and boto3 (even though boto3 is not a show stopper). See that we provided the 'nagiosxi.sudoers' to append to the /etc/sudoers and want to take a look at what that looks like so we can verify:
Please send over a copy of the '/tmp/list.txt'.
Thanks,
Perry
Thanks for following up with the results, appears that it is hitting on an issue with the sudoers and boto3 (even though boto3 is not a show stopper). See that we provided the 'nagiosxi.sudoers' to append to the /etc/sudoers and want to take a look at what that looks like so we can verify:
Code: Select all
cat /etc/sudoers /etc/sudoers.d/* > /tmp/list.txt
- https://support.nagios.com/kb/print-39.html
- root ALL=(ALL) ALL
Code: Select all
python --version
sudo python -m pip install boto3
Thanks,
Perry
You do not have the required permissions to view the files attached to this post.