Nagios Upgrade via importing Config files

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
Dusan.Mandic
Posts: 60
Joined: Mon Apr 06, 2020 2:30 pm

Nagios Upgrade via importing Config files

Post by Dusan.Mandic »

Hello all!

We are currently upgrading our Nagios XI 5.6.5 to a new server (7.8 Maipo), running 5.7.1

We decided to not migrate the database due to simultaneous errors we receiving before (had to run rebuild script a couple times in the past 4-5 months) so using the backups to upgrade isnt in the cards for us ATM.

I decided to install a newer version directly on VM (5.7.1) and import the config files over from the old server. I used the method described in the KB and made sure that the file permissions were correct on the new Nagios server (/usr/local/nagiosxi/scripts/reset_config_perms.sh)

I was able to get all hosts/services/groups/cmds/etc to show in CCM as active, but unable to see hosts in actual monitoring host/status summaries.

The hosts show up as expected in our old Nagios server. Any ideas?
Screen Shot 2020-09-15 at 4.53.10 PM.png
Screen Shot 2020-09-15 at 4.51.42 PM.png
You do not have the required permissions to view the files attached to this post.
benjaminsmith
Posts: 5324
Joined: Wed Aug 22, 2018 4:39 pm
Location: saint paul

Re: Nagios Upgrade via importing Config files

Post by benjaminsmith »

Hi @Dusan.Mandic,

Welcome to the Nagios Customer Support Forum!

Let's run the following tail command from the shell on the Nagios XI server and then Apply Configuration to review any possible errors.

Code: Select all

tail -f /usr/local/nagiosxi/var/cmdsubsys.log
Then navigate to Configure > Core Config Manager > Quick Tools (left sidebar) > Apply Configuration

Also, if you could PM the system profile, that would be helpful for troubleshooting the configuraitons. Thanks, Benjamin

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 in a private message or upload it to the post/ticket, and then reply to this post to bring it up in the queue.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.

Be sure to check out our Knowledgebase for helpful articles and solutions!
Dusan.Mandic
Posts: 60
Joined: Mon Apr 06, 2020 2:30 pm

Re: Nagios Upgrade via importing Config files

Post by Dusan.Mandic »

I am unable to PM you via Forum (says permissions issue) would you be able to enable or provide an email?

tail output:
PROCESSING COMMAND ID 271...
PROCESS COMMAND: CMD=17, DATA=
APPLYING NAGIOSCORE CONFIG...
CMDLINE=cd /usr/local/nagiosxi/scripts && ./reconfigure_nagios.sh
No entry for terminal type "unknown";
using dumb terminal settings.

--- reset_config_perms.sh ------------
> Setting script permissions
> Setting CCM script permissions
> Setting special script permissions
> Setting special component script permissions
> Setting configuration file/directory permissions
> Setting perfdata directory and RRD permissions
> Setting libexec directory permissions
> Setting Nagios XI config permissions
> Setting NOM checkpoint user:group permissions
> + Setting Recurring Downtime file user:group permissions
> + Setting BPI configuration file user:group permissions
--------------------------------------

--- ccm_import.php -------------------
> Setting import directory: /usr/local/nagios/etc/import/
> Importing config files into the CCM
No files to import
--------------------------------------

--- ccm_export.php -------------------
> Writing CCM configuration to Nagios files
Finished writing out configuraton
--------------------------------------

--------------------------------------
> Verifying configuration with Nagios Core
> Output:
Nagios Core 4.4.6
Copyright (c) 2009-present Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 2020-04-28
License: GPL

Website: https://www.nagios.org
Reading configuration data...
Read main config file okay...
WARNING: The normal_check_interval attribute is deprecated and will be removed in future versions. Please use check_interval instead.
WARNING: The retry_check_interval attribute is deprecated and will be removed in future versions. Please use retry_interval instead.
Warning: Duplicate definition found for service 'check_QZLSSERVER' on host 'S78100' (config file '/usr/local/nagios/etc/services/S78100.cfg', starting on line 266)
Warning: Duplicate definition found for service 'check_DAYEND' on host 'S78100' (config file '/usr/local/nagios/etc/services/S78100.cfg', starting on line 86)
Warning: Duplicate definition found for service 'check_CRTPFRDTA' on host 'S78100' (config file '/usr/local/nagios/etc/services/S78100.cfg', starting on line 70)
Warning: Duplicate definition found for service 'Cron Scheduling Daemon' on host 'NPSLACNX701' (config file '/usr/local/nagios/etc/services/RHEL Cron Scheduling Daemon.cfg', starting on line 16)
Warning: Duplicate definition found for service 'Memory Usage' on host 'NPSLACNX701' (config file '/usr/local/nagios/etc/services/RHEL Memory Usage.cfg', starting on line 16)
Warning: Duplicate definition found for service 'Total Processes' on host 'NPSLACNX701' (config file '/usr/local/nagios/etc/services/RHEL Total Processes.cfg', starting on line 16)
Warning: Duplicate definition found for service 'Swap Usage' on host 'NPSLACNX701' (config file '/usr/local/nagios/etc/services/RHEL Swap Usage.cfg', starting on line 16)
Warning: Duplicate definition found for service 'System Logging Service' on host 'NPSLACNX701' (config file '/usr/local/nagios/etc/services/RHEL System Logging Service.cfg', starting on line 16)
Warning: Duplicate definition found for service 'Postgres-9.2 Service' on host 'NPSLACNX701' (config file '/usr/local/nagios/etc/services/RHEL Postgres-9.2 Service.cfg', starting on line 16)
Warning: Duplicate definition found for service 'CPU Stats' on host 'NPSLACNX701' (config file '/usr/local/nagios/etc/services/RHEL CPU Stats.cfg', starting on line 16)
Warning: Duplicate definition found for service 'SSH Server' on host 'NPSLACNX701' (config file '/usr/local/nagios/etc/services/RHEL SSH Server.cfg', starting on line 16)
Warning: Duplicate definition found for service 'NTP' on host 'NPSLACNX701' (config file '/usr/local/nagios/etc/services/RHEL NTP.cfg', starting on line 16)
Read object config files okay...

Running pre-flight check on configuration data...

Checking objects...
Warning: Service 'Memory Utilization' on host 'BMS02' has a notification interval less than its check interval! Notifications are only re-sent after checks are made, so the effective notification interval will be that of the check interval.
Warning: Service 'check_ACTIVE_JOBS' on host 'BMS02' has a notification interval less than its check interval! Notifications are only re-sent after checks are made, so the effective notification interval will be that of the check interval.
Warning: Service 'Memory Utilization' on host 'DEMO01' has a notification interval less than its check interval! Notifications are only re-sent after checks are made, so the effective notification interval will be that of the check interval.
Warning: Service 'check_ACTIVE_JOBS' on host 'DEMO01' has a notification interval less than its check interval! Notifications are only re-sent after checks are made, so the effective notification interval will be that of the check interval.
Warning: Service 'Memory Utilization' on host 'EDUC02' has a notification interval less than its check interval! Notifications are only re-sent after checks are made, so the effective notification interval will be that of the check interval.
Warning: Service 'check_ACTIVE_JOBS' on host 'EDUC02' has a notification interval less than its check interval! Notifications are only re-sent after checks are made, so the effective notification interval will be that of the check interval.
Warning: Service 'Memory Utilization' on host 'FCCTL1' has a notification interval less than its check interval! Notifications are only re-sent after checks are made, so the effective notification interval will be that of the check interval.
Warning: Service 'check_ACTIVE_JOBS' on host 'FCCTL1' has a notification interval less than its check interval! Notifications are only re-sent after checks are made, so the effective notification interval will be that of the check interval.
Warning: Service 'Memory Utilization' on host 'HMSPINS' has a notification interval less than its check interval! Notifications are only re-sent after checks are made, so the effective notification interval will be that of the check interval.
Warning: Service 'check_ACTIVE_JOBS' on host 'HMSPINS' has a notification interval less than its check interval! Notifications are only re-sent after checks are made, so the effective notification interval will be that of the check interval.
Warning: Service 'Memory Utilization' on host 'IIP01' has a notification interval less than its check interval! Notifications are only re-sent after checks are made, so the effective notification interval will be that of the check interval.
Warning: Service 'check_ACTIVE_JOBS' on host 'IIP01' has a notification interval less than its check interval! Notifications are only re-sent after checks are made, so the effective notification interval will be that of the check interval.
Warning: Service 'Memory Utilization' on host 'IIP02' has a notification interval less than its check interval! Notifications are only re-sent after checks are made, so the effective notification interval will be that of the check interval.
Warning: Service 'check_ACTIVE_JOBS' on host 'IIP02' has a notification interval less than its check interval! Notifications are only re-sent after checks are made, so the effective notification interval will be that of the check interval.
Warning: Service 'Memory Utilization' on host 'IMPSUP01' has a notification interval less than its check interval! Notifications are only re-sent after checks are made, so the effective notification interval will be that of the check interval.
Warning: Service 'check_ACTIVE_JOBS' on host 'IMPSUP01' has a notification interval less than its check interval! Notifications are only re-sent after checks are made, so the effective notification interval will be that of the check interval.
Warning: Service 'Memory Utilization' on host 'IMPSUP03' has a notification interval less than its check interval! Notifications are only re-sent after checks are made, so the effective notification interval will be that of the check interval.
Warning: Service 'check_ACTIVE_JOBS' on host 'IMPSUP03' has a notification interval less than its check interval! Notifications are only re-sent after checks are made, so the effective notification interval will be that of the check interval.
Warning: Service 'Memory Utilization' on host 'MU01' has a notification interval less than its check interval! Notifications are only re-sent after checks are made, so the effective notification interval will be that of the check interval.
Warning: Service 'check_ACTIVE_JOBS' on host 'MU01' has a notification interval less than its check interval! Notifications are only re-sent after checks are made, so the effective notification interval will be that of the check interval.
Warning: Service 'Memory Utilization' on host 'RELVER2' has a notification interval less than its check interval! Notifications are only re-sent after checks are made, so the effective notification interval will be that of the check interval.
Warning: Service 'check_ACTIVE_JOBS' on host 'RELVER2' has a notification interval less than its check interval! Notifications are only re-sent after checks are made, so the effective notification interval will be that of the check interval.
Warning: Service 'Memory Utilization' on host 'S78100' has a notification interval less than its check interval! Notifications are only re-sent after checks are made, so the effective notification interval will be that of the check interval.
Warning: Service 'check_ACTIVE_JOBS' on host 'S78100' has a notification interval less than its check interval! Notifications are only re-sent after checks are made, so the effective notification interval will be that of the check interval.
Checked 12667 services.
Warning: Host 'event_handler_test' has no default contacts or contactgroups defined!
Checked 766 hosts.
Checked 26 host groups.
Checked 2 service groups.
Checked 59 contacts.
Checked 16 contact groups.
Checked 365 commands.
Checked 77 time periods.
Checked 0 host escalations.
Checked 0 service escalations.
Checking for circular paths...
Checked 766 hosts
Checked 0 service dependencies
Checked 0 host dependencies
Checked 77 timeperiods
Checking global event handlers...
Checking obsessive compulsive processor commands...
Checking misc settings...

Total Warnings: 25
Total Errors: 0

Things look okay - No serious problems were detected during the pre-flight check
> Return Code: 0
--------------------------------------
OUTPUT=--------------------------------------
RETURNCODE=0
PROCESSING COMMAND ID 272...
PROCESS COMMAND: CMD=1160, DATA=
CMDLINE=/bin/true
OUTPUT=
RETURNCODE=0
PROCESSING COMMAND ID 273...
PROCESS COMMAND: CMD=1150, DATA=remove
CMDLINE=php /usr/local/nagiosxi/html/includes/components/nagiosbpi/api_tool.php --cmd=syncall
CMD: syncall
MSG: BPI configuration applied successfully! BPI configuration applied successfully!
OUTPUT=MSG: BPI configuration applied successfully! BPI configuration applied successfully!
RETURNCODE=0
Dusan.Mandic
Posts: 60
Joined: Mon Apr 06, 2020 2:30 pm

Re: Nagios Upgrade via importing Config files

Post by Dusan.Mandic »

profile.zip
You do not have the required permissions to view the files attached to this post.
Dusan.Mandic
Posts: 60
Joined: Mon Apr 06, 2020 2:30 pm

Re: Nagios Upgrade via importing Config files

Post by Dusan.Mandic »

benjaminsmith wrote:Hi @Dusan.Mandic,

Welcome to the Nagios Customer Support Forum!

Let's run the following tail command from the shell on the Nagios XI server and then Apply Configuration to review any possible errors.

Code: Select all

tail -f /usr/local/nagiosxi/var/cmdsubsys.log
Then navigate to Configure > Core Config Manager > Quick Tools (left sidebar) > Apply Configuration

Also, if you could PM the system profile, that would be helpful for troubleshooting the configuraitons. Thanks, Benjamin

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 in a private message or upload it to the post/ticket, and then reply to this post to bring it up in the queue.
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Nagios Upgrade via importing Config files

Post by ssax »

Technically, you should be able to add this to your /usr/local/nagios/etc/nagios.cfg:

Code: Select all

broker_module=/usr/local/nagios/bin/ndo.so /usr/local/nagios/etc/ndo.cfg
Then restart nagios:

Code: Select all

systemctl restart nagios
Then apply configuration and they should show up (you are missing that line).

If that doesn't resolve it for you or you see any other weird web interface not updating issues, that means you are hitting a bug in XI 5.7+ that some systems have (a known issue), please follow these instructions to downgrade NDO3 back to NDO2DB (XI version stays the same), XI 5.7.4 should be released soon and is expected to resolve the issue.

Please do this to downgrade NDO3 to NDO2DB (they are entirely different) and it should resolve your issues (run commands as root):

Code: Select all

systemctl stop nagios
cd /tmp
rm -rf /tmp/nagiosxi
wget https://assets.nagios.com/downloads/nagiosxi/5/xi-5.6.14.tar.gz
tar zxf xi-5.6.14.tar.gz
cd /tmp/nagiosxi
./init.sh
cd /tmp/nagiosxi/subcomponents/ndoutils
./install
systemctl enable ndo2db
systemctl start ndo2db
Then edit your /usr/local/nagios/etc/nagios.cfg and make sure this line is uncommented:

Code: Select all

broker_module=/usr/local/nagios/bin/ndomod.o config_file=/usr/local/nagios/etc/ndomod.cfg
Make sure this line is commented:

Code: Select all

#broker_module=/usr/local/nagios/bin/ndo.so /usr/local/nagios/etc/ndo.cfg
Then start the nagios service:

Code: Select all

systemctl start nagios
Dusan.Mandic
Posts: 60
Joined: Mon Apr 06, 2020 2:30 pm

Re: Nagios Upgrade via importing Config files

Post by Dusan.Mandic »

Awesome! Looks like that line in the nagios.cfg did it! Thanks!
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Nagios Upgrade via importing Config files

Post by scottwilkerson »

Dusan.Mandic wrote:Awesome! Looks like that line in the nagios.cfg did it! Thanks!
Great!

Locking thread
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked