Nagios XI 5.2.0 upgrade - Apply configuration not working

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Nagios XI 5.2.0 upgrade - Apply configuration not workin

Post by lmiltchev »

Can you run the "reconfigure_nagios.sh" successfully as nagios user?

Code: Select all

su nagios
cd /usr/local/nagiosxi/scripts
./reconfigure_nagios.sh
Run the following command to begin capturing log output:

Code: Select all

tail -f /usr/local/nagiosxi/var/cmdsubsys.log &> /tmp/cmd.txt
Attempt to Apply Configuration from the web interface. After the browser has returned some output to the screen, press "Ctrl+c" to stop the log tail, and upload the "cmd.txt" file that was generated in the "/tmp/" directory by the above instructions.
Be sure to check out our Knowledgebase for helpful articles and solutions!
amit.ahuja
Posts: 113
Joined: Fri May 15, 2015 8:20 am

Re: Nagios XI 5.2.0 upgrade - Apply configuration not workin

Post by amit.ahuja »

./reconfigure_nagios.sh in command line is working fine but not in web console. it keeps complaining there's some configuration error for some file in /usr/local/nagios/etc/static/. I removed everything in that location and apply configuration again in console but it keeps saying the same thing. Do you know how to fix this?
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Nagios XI 5.2.0 upgrade - Apply configuration not workin

Post by tmcdonald »

Sounds like you have multiple nagios processes running. What is the output of the following?

ps -ef | grep bin/nagios
Former Nagios employee
amit.ahuja
Posts: 113
Joined: Fri May 15, 2015 8:20 am

Re: Nagios XI 5.2.0 upgrade - Apply configuration not workin

Post by amit.ahuja »

]# ps -ef | grep bin/nagios
nagios 9034 1 0 11:52 ? 00:00:00 /usr/local/nagios/bin/nagios -d /usr/local/nagios/etc/nagios.cfg
nagios 9036 9034 0 11:52 ? 00:00:00 /usr/local/nagios/bin/nagios --worker /usr/local/nagios/var/rw/nagios.qh
nagios 9037 9034 0 11:52 ? 00:00:00 /usr/local/nagios/bin/nagios --worker /usr/local/nagios/var/rw/nagios.qh
nagios 9038 9034 0 11:52 ? 00:00:00 /usr/local/nagios/bin/nagios --worker /usr/local/nagios/var/rw/nagios.qh
nagios 9039 9034 0 11:52 ? 00:00:00 /usr/local/nagios/bin/nagios --worker /usr/local/nagios/var/rw/nagios.qh
nagios 9040 9034 0 11:52 ? 00:00:00 /usr/local/nagios/bin/nagios --worker /usr/local/nagios/var/rw/nagios.qh
nagios 9041 9034 0 11:52 ? 00:00:00 /usr/local/nagios/bin/nagios --worker /usr/local/nagios/var/rw/nagios.qh
nagios 9046 9034 0 11:52 ? 00:00:00 /usr/local/nagios/bin/nagios -d /usr/local/nagios/etc/nagios.cfg
amit.ahuja
Posts: 113
Joined: Fri May 15, 2015 8:20 am

Re: Nagios XI 5.2.0 upgrade - Apply configuration not workin

Post by amit.ahuja »

Already removed that file in /usr/local/nagios/etc/static. But it keeps saying the same thing when apply configuration.
You do not have the required permissions to view the files attached to this post.
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: Nagios XI 5.2.0 upgrade - Apply configuration not workin

Post by Box293 »

I would like to see you do the following steps:

Code: Select all

tail -f /usr/local/nagiosxi/var/cmdsubsys.log &> /tmp/cmd.txt
Then go and apply configuration.

After the browser has failed, press "Ctrl+c" to stop the log tail, and upload the "cmd.txt" file that was generated in the "/tmp/" directory by the above instructions.

Also, what is the output of these steps:

Go into CCM
Tools > Write Config Files
Click the Delete button
It will say "Successfully deleted all Host / Service Config Files"
Click the Write Button
It will show an output of all the files it creates
Click the Verify button
What errors do you get, if any?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
amit.ahuja
Posts: 113
Joined: Fri May 15, 2015 8:20 am

Re: Nagios XI 5.2.0 upgrade - Apply configuration not workin

Post by amit.ahuja »

I don't get any errors when doing these steps. Also, I have attached cmd.txt.

Go into CCM
Tools > Write Config Files
Click the Delete button
It will say "Successfully deleted all Host / Service Config Files"
Click the Write Button
It will show an output of all the files it creates
Click the Verify button
What errors do you get, if any?
You do not have the required permissions to view the files attached to this post.
User avatar
tgriep
Madmin
Posts: 9190
Joined: Thu Oct 30, 2014 9:02 am

Re: Nagios XI 5.2.0 upgrade - Apply configuration not workin

Post by tgriep »

Could you post your /etc/sudoers file here so we can review it?
Are you using LDAP/AD for unix logins on the XI system?
Be sure to check out our Knowledgebase for helpful articles and solutions!
amit.ahuja
Posts: 113
Joined: Fri May 15, 2015 8:20 am

Re: Nagios XI 5.2.0 upgrade - Apply configuration not workin

Post by amit.ahuja »

we log in as root. It's working fine on older version. Only has issue after upgrading to 5.2.0.

these are in sudoers file:


Defaults:nagios !requiretty
Defaults:apache !requiretty
nagios ALL=NOPASSWD: /usr/local/nagios/libexec/check_init_service
nagios ALL=NOPASSWD: /usr/local/nagios/libexec/check_linux_stats.pl

User_Alias NAGIOSXI=nagios
User_Alias NAGIOSXIWEB=apache
NAGIOSXI ALL = NOPASSWD:/etc/init.d/nagios start
NAGIOSXI ALL = NOPASSWD:/etc/init.d/nagios stop
NAGIOSXI ALL = NOPASSWD:/etc/init.d/nagios restart
NAGIOSXI ALL = NOPASSWD:/etc/init.d/nagios reload
NAGIOSXI ALL = NOPASSWD:/etc/init.d/nagios status
NAGIOSXI ALL = NOPASSWD:/etc/init.d/nagios checkconfig
NAGIOSXI ALL = NOPASSWD:/etc/init.d/ndo2db start
NAGIOSXI ALL = NOPASSWD:/etc/init.d/ndo2db stop
NAGIOSXI ALL = NOPASSWD:/etc/init.d/ndo2db restart
NAGIOSXI ALL = NOPASSWD:/etc/init.d/ndo2db reload
NAGIOSXI ALL = NOPASSWD:/etc/init.d/ndo2db status
NAGIOSXI ALL = NOPASSWD:/etc/init.d/npcd start
NAGIOSXI ALL = NOPASSWD:/etc/init.d/npcd stop
NAGIOSXI ALL = NOPASSWD:/etc/init.d/npcd restart
NAGIOSXI ALL = NOPASSWD:/etc/init.d/npcd reload
NAGIOSXI ALL = NOPASSWD:/etc/init.d/npcd status
NAGIOSXI ALL = NOPASSWD:/usr/bin/php /usr/local/nagiosxi/html/includes/components/autodiscovery/scripts/autodiscover_new.php *
NAGIOSXI ALL = NOPASSWD:/usr/local/nagiosxi/html/includes/components/profile/getprofile.sh
NAGIOSXI ALL = NOPASSWD:/usr/local/nagiosxi/scripts/upgrade_to_latest.sh
NAGIOSXI ALL = NOPASSWD:/usr/local/nagiosxi/scripts/change_timezone.sh
NAGIOSXI ALL = NOPASSWD:/usr/local/nagiosxi/scripts/manage_services.sh *
NAGIOSXI ALL = NOPASSWD:/usr/local/nagiosxi/scripts/reset_config_perms.sh
NAGIOSXIWEB ALL = NOPASSWD:/usr/bin/tail -100 /var/log/messages
NAGIOSXIWEB ALL = NOPASSWD:/usr/bin/tail -100 /var/log/httpd/error_log
NAGIOSXIWEB ALL = NOPASSWD:/usr/bin/tail -100 /var/log/mysqld.log
NAGIOSXIWEB ALL = NOPASSWD:/usr/bin/php /usr/local/nagiosxi/html/includes/components/autodiscovery/scripts/autodiscover_new.php *
NAGIOSXIWEB ALL = NOPASSWD:/usr/local/nagiosxi/html/includes/components/profile/getprofile.sh
NAGIOSXIWEB ALL = NOPASSWD:/etc/init.d/snmptt restart
NAGIOSXIWEB ALL = NOPASSWD:/usr/local/nagiosxi/scripts/repair_databases.sh
NAGIOSXIWEB ALL = NOPASSWD:/usr/local/nagiosxi/scripts/manage_services.sh *
amit.ahuja
Posts: 113
Joined: Fri May 15, 2015 8:20 am

Re: Nagios XI 5.2.0 upgrade - Apply configuration not workin

Post by amit.ahuja »

I only have this issue in web console. Static directory is empty and ./reconfigure_nagios.sh on the box is fine. I only have issue when apply configuration using web console GUI. Is there a place where I can delete cached data in web console or in db to resolve this issue?
Locked