Apply configuration succeeds but doesn't

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
bgmncwj
Posts: 14
Joined: Thu Sep 06, 2012 8:36 am

Apply configuration succeeds but doesn't

Post by bgmncwj »

Hello,
Whenever I go to change a service configuration (either in Core Config Manager or outside of it) when I go to apply the configuration it doesn't return any errors however the change isn't applied. After clicking Apply Configuration and returning to the services section of CCM it still shows "Changes detected! Apply configuration for new changes to take effect". Any ideas? We're running Nagios XI 2014R2.6 on a CentOS 7 machine (64bit), nothing really special about our install.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Apply configuration succeeds but doesn't

Post by lmiltchev »

Can you run the "reconfigure_nagios.sh" script from the command line successfully? Do you see any errors?

Code: Select all

cd /usr/local/nagiosxi/scripts
./reconfigure_nagios.sh
Be sure to check out our Knowledgebase for helpful articles and solutions!
bgmncwj
Posts: 14
Joined: Thu Sep 06, 2012 8:36 am

Re: Apply configuration succeeds but doesn't

Post by bgmncwj »

No errors besides some certificate warnings from wget, but I see everything runs with --no check-certificate so that shouldn't be the problem.

Code: Select all

WRITE CONFIGS SUCCESSFUL!
OUTPUT:
Nagios Core 4.0.8
Copyright (c) 2009-present Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 08-12-2014
License: GPL

Website: http://www.nagios.org
Reading configuration data...
   Read main config file okay...
   Read object config files okay...

Running pre-flight check on configuration data...

Checking objects...
	Checked 807 services.
	Checked 81 hosts.
	Checked 2 host groups.
	Checked 0 service groups.
	Checked 6 contacts.
	Checked 2 contact groups.
	Checked 124 commands.
	Checked 13 time periods.
	Checked 0 host escalations.
	Checked 0 service escalations.
Checking for circular paths...
	Checked 81 hosts
	Checked 0 service dependencies
	Checked 0 host dependencies
	Checked 13 timeperiods
Checking global event handlers...
Checking obsessive compulsive processor commands...
Checking misc settings...

Total Warnings: 0
Total Errors:   0

Things look okay - No serious problems were detected during the pre-flight check
RET: 0
Restarting nagios (via systemctl):                         [  OK  ]
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Apply configuration succeeds but doesn't

Post by lmiltchev »

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 post 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!
bgmncwj
Posts: 14
Joined: Thu Sep 06, 2012 8:36 am

Re: Apply configuration succeeds but doesn't

Post by bgmncwj »

Here's the output you requested

Code: Select all

......................................PROCESSING COMMAND ID 3816...
Setting new htaccess credentials
Updating password for user chad.jannusch
OUTPUT=
RETURNCODE=0
...............PROCESSING COMMAND ID 3817...
PROCESS COMMAND: CMD=17, DATA=
APPLYING NAGIOSCORE CONFIG...
CMDLINE=cd /usr/local/nagiosxi/scripts && ./reconfigure_nagios.sh
URL: https://localhost/nagiosxi/includes/components/ccm/
CMDLINE
--2015-03-27 08:04:54--  https://localhost/nagiosxi/includes/components/ccm/
Resolving localhost (localhost)... ::1, 127.0.0.1
Connecting to localhost (localhost)|::1|:443... connected.
WARNING: cannot verify localhost's certificate, issued by ‘/C=US/ST=Arizona/L=Scottsdale/O=GoDaddy.com, Inc./OU=http://certs.godaddy.com/repository//CN=Go Daddy Secure Certificate Authority - G2’:
  Unable to locally verify the issuer's authority.
WARNING: no certificate subject alternative name matches
	requested host name ‘localhost’.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: ‘nagiosql.login’

     0K ..........                                              991K=0.01s

2015-03-27 08:04:55 (991 KB/s) - ‘nagiosql.login’ saved [10422]

/usr/bin/wget --save-cookies nagiosql.cookies --keep-session-cookies https://localhost/nagiosxi/includes/components/ccm/ --no-check-certificate --post-data 'submit=Login&hidelog=true&loginSubmitted=true&username=nagiosxi&password=mhfekk' -O nagiosql.loginLOGIN SUCCESSFUL!
IMPORTING CONFIG FILES...URL: https://localhost/nagiosxi/includes/components/ccm/
Array
(
)
RESETTING PERMS
SETUID ROOT OK
URL: https://localhost/nagiosxi/includes/components/ccm/
CMDLINE
--2015-03-27 08:04:55--  https://localhost/nagiosxi/includes/components/ccm/
Resolving localhost (localhost)... ::1, 127.0.0.1
Connecting to localhost (localhost)|::1|:443... connected.
WARNING: cannot verify localhost's certificate, issued by ‘/C=US/ST=Arizona/L=Scottsdale/O=GoDaddy.com, Inc./OU=http://certs.godaddy.com/repository//CN=Go Daddy Secure Certificate Authority - G2’:
  Unable to locally verify the issuer's authority.
WARNING: no certificate subject alternative name matches
	requested host name ‘localhost’.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: ‘nagiosql.login’

     0K ..........                                              945K=0.01s

2015-03-27 08:04:55 (945 KB/s) - ‘nagiosql.login’ saved [10422]

/usr/bin/wget --save-cookies nagiosql.cookies --keep-session-cookies https://localhost/nagiosxi/includes/components/ccm/ --no-check-certificate --post-data 'submit=Login&hidelog=true&loginSubmitted=true&username=nagiosxi&password=mhfekk' -O nagiosql.loginLOGIN SUCCESSFUL!
URL: https://localhost/nagiosxi/includes/components/ccm/
CMDLINE:
/usr/bin/wget --load-cookies=nagiosql.cookies https://localhost/nagiosxi/includes/components/ccm/ --no-check-certificate --post-data 'cmd=apply&type=writeConfig' -O nagiosql.export.monitoring
--2015-03-27 08:04:55--  https://localhost/nagiosxi/includes/components/ccm/
Resolving localhost (localhost)... ::1, 127.0.0.1
Connecting to localhost (localhost)|::1|:443... connected.
WARNING: cannot verify localhost's certificate, issued by ‘/C=US/ST=Arizona/L=Scottsdale/O=GoDaddy.com, Inc./OU=http://certs.godaddy.com/repository//CN=Go Daddy Secure Certificate Authority - G2’:
  Unable to locally verify the issuer's authority.
WARNING: no certificate subject alternative name matches
	requested host name ‘localhost’.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: ‘nagiosql.export.monitoring’

     0K .......... ..                                          24.1K=0.5s

2015-03-27 08:04:56 (24.1 KB/s) - ‘nagiosql.export.monitoring’ saved [13278]

WRITE CONFIGS SUCCESSFUL!
OUTPUT:
Nagios Core 4.0.8
Copyright (c) 2009-present Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 08-12-2014
License: GPL

Website: http://www.nagios.org
Reading configuration data...
   Read main config file okay...
   Read object config files okay...

Running pre-flight check on configuration data...

Checking objects...
	Checked 807 services.
	Checked 81 hosts.
	Checked 2 host groups.
	Checked 0 service groups.
	Checked 6 contacts.
	Checked 2 contact groups.
	Checked 124 commands.
	Checked 13 time periods.
	Checked 0 host escalations.
	Checked 0 service escalations.
Checking for circular paths...
	Checked 81 hosts
	Checked 0 service dependencies
	Checked 0 host dependencies
	Checked 13 timeperiods
Checking global event handlers...
Checking obsessive compulsive processor commands...
Checking misc settings...

Total Warnings: 0
Total Errors:   0

Things look okay - No serious problems were detected during the pre-flight check
RET: 0
Restarting nagios (via systemctl):  [  OK  ]
OUTPUT=Restarting nagios (via systemctl):  [  OK  ]
RETURNCODE=0
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Apply configuration succeeds but doesn't

Post by abrist »

Lets check for multiple nagios parent processes:

Code: Select all

ps -aef | grep nagios.cfg
Do the new services appear in the core UI? (browse to http://<server>/nagios/)
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
bgmncwj
Posts: 14
Joined: Thu Sep 06, 2012 8:36 am

Re: Apply configuration succeeds but doesn't

Post by bgmncwj »

Hi abrist,
The service doesn't appear in the core UI. Here's the output from that command:

Code: Select all

nagios   16672     1  0 08:04 ?        00:00:27 /usr/local/nagios/bin/nagios -d /usr/local/nagios/etc/nagios.cfg
nagios   16746 16672  0 08:04 ?        00:00:00 /usr/local/nagios/bin/nagios -d /usr/local/nagios/etc/nagios.cfg
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Apply configuration succeeds but doesn't

Post by lmiltchev »

Is SELinux enabled on this machine?

Code: Select all

getenforce
If it is, disable it:

Code: Select all

setenforce 0
and try to apply configuration again.
Be sure to check out our Knowledgebase for helpful articles and solutions!
bgmncwj
Posts: 14
Joined: Thu Sep 06, 2012 8:36 am

Re: Apply configuration succeeds but doesn't

Post by bgmncwj »

Doesn't look like SELinux is enabled

Code: Select all

[root@nagios ~]# getenforce
Disabled
cmerchant
Posts: 546
Joined: Wed Sep 24, 2014 11:19 am

Re: Apply configuration succeeds but doesn't

Post by cmerchant »

Go to CCM --> Tools --> write config files, Click delete , Click write , and Click verify and then do the apply.
Locked