Page 3 of 4
Re: Nagios XI 5.2.0 upgrade - Apply configuration not workin
Posted: Wed Nov 04, 2015 5:40 pm
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.
Re: Nagios XI 5.2.0 upgrade - Apply configuration not workin
Posted: Mon Nov 09, 2015 11:59 am
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?
Re: Nagios XI 5.2.0 upgrade - Apply configuration not workin
Posted: Mon Nov 09, 2015 12:06 pm
by tmcdonald
Sounds like you have multiple nagios processes running. What is the output of the following?
ps -ef | grep bin/nagios
Re: Nagios XI 5.2.0 upgrade - Apply configuration not workin
Posted: Mon Nov 09, 2015 1:07 pm
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
Re: Nagios XI 5.2.0 upgrade - Apply configuration not workin
Posted: Mon Nov 09, 2015 3:57 pm
by amit.ahuja
Already removed that file in /usr/local/nagios/etc/static. But it keeps saying the same thing when apply configuration.
Re: Nagios XI 5.2.0 upgrade - Apply configuration not workin
Posted: Mon Nov 09, 2015 6:39 pm
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?
Re: Nagios XI 5.2.0 upgrade - Apply configuration not workin
Posted: Tue Nov 10, 2015 12:00 pm
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?
Re: Nagios XI 5.2.0 upgrade - Apply configuration not workin
Posted: Tue Nov 10, 2015 1:26 pm
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?
Re: Nagios XI 5.2.0 upgrade - Apply configuration not workin
Posted: Tue Nov 10, 2015 1:39 pm
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 *
Re: Nagios XI 5.2.0 upgrade - Apply configuration not workin
Posted: Tue Nov 10, 2015 3:55 pm
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?