Configuration is not applying

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
Cpt.Ackbar
Posts: 31
Joined: Thu Aug 17, 2017 7:14 am

Configuration is not applying

Post by Cpt.Ackbar »

Hi,

I am facing issue with Nagios XI. When I make changes via CCM these changes are not visible in overview and is not taken into considiration during monitoring.

It started after kernel update and nagios upgrade.

I have server in EU which has been upgraded this way:
- upgrade to Nagios XI 5.5.8
- kernel upgrade of CentOS 6.10 -> 2.6.32-754.9.1.el6.x86_64

By these steps Nagios stopped to apply changes.

I have also boxes in China and US which were upgraded differently:
- kernel upgrade of CentOS 6.10 -> 2.6.32-754.9.1.el6.x86_64
- upgrade to Nagios XI 5.5.8

By these steps Nagios work without any issues.

I have also script for restarting nagios services becasuse of use mod gearman. Script has these lines:

Code: Select all

#Service Stop Order:
service nagios stop
service mod_gearman_worker stop
service gearmand stop
#Service Start Order:
service gearmand start
#service mod_gearman_worker start
service nagios start
service nagios status
If I aaply it on broken server in EU I am getting this output:

Code: Select all

[root@frkgnagxip1 user]# ./fixworkers.sh
Stopping nagios: kill: usage: kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l [sigspec]
done.
Stopping mod_gearman_worker.... Not running.
Stopping gearmand:                                         [  OK  ]
Starting gearmand:                                         [  OK  ]
Starting nagios: done.
nagios is not running
If I apply it on OK server output is:

Code: Select all

[root@KUNGNAGIOSXIP1 user]# ./fixworkers.sh
Stopping nagios: .done.
Stopping gearmand:                                         [  OK  ]
Starting gearmand:                                         [  OK  ]
Starting nagios: done.
nagios (pid 53302) is running...
So I guess something went wrong with nagios service during kernel upgrade. If I switch to old kernel issue still persists.

After applying this command, issue still persists:

Code: Select all

[root@frkgnagxip1 user]# /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
I tried these steps https://support.nagios.com/kb/article/n ... ce-39.html:

I am getting this:

Code: Select all

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 CCM script permissions
> Setting script permissions
> Setting special component script permissions
> Setting configuration file/directory permissions
> Setting perfdata directory and RRD permissions
> Setting NOM checkpoint user:group permissions
> + Setting Nagios Core corelog.newobjects user:group permissions
> + Setting CCM configuration file 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
[b]PHP Warning:  Invalid argument supplied for foreach() in /usr/local/nagiosxi/html/includes/components/nagiosim/nagiosim.inc.php on line 491[/b]
  Finished writing out configuraton
--------------------------------------

--------------------------------------
> Verifying configuration with Nagios Core
> Output:
Nagios Core 4.2.4
Copyright (c) 2009-present Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 12-07-2016
License: GPL

Website: https://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 3593 services.
        Checked 513 hosts.
        Checked 104 host groups.
        Checked 19 service groups.
        Checked 90 contacts.
        Checked 30 contact groups.
        Checked 166 commands.
        Checked 86 time periods.
        Checked 1500 host escalations.
        Checked 11957 service escalations.
Checking for circular paths...
        Checked 513 hosts
        Checked 716 service dependencies
        Checked 0 host dependencies
        Checked 86 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
> Return Code: 0
--------------------------------------
kill: usage: kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l [sigspec]
Stopping nagios: done.
Starting nagios: done.
OUTPUT=Starting nagios: done.
RETURNCODE=0
PROCESSING COMMAND ID 6774...
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
..........^C
I googled error and get this link (https://support.nagios.com/forum/viewto ... 16&t=49375) but I am not able to see post as our contract has expired and we are waiting for our incredibly slow financial department to pay bill for another year.

Could you please help? It is quite crucial.

Thanks a lot and in case you need more details let me know.
bolson

Re: Configuration is not applying

Post by bolson »

Hello Cpt.Ackbar,

Click on the Admin top menu item and check the status of the Database Backend. If it's not running, Clicking on the Actions wheel will start it. Let us know if this resolves your issue,

Thank you for visiting the Nagios Support Forum!
Cpt.Ackbar
Posts: 31
Joined: Thu Aug 17, 2017 7:14 am

Re: Configuration is not applying

Post by Cpt.Ackbar »

Database backend was running. Just to be sure I restarted database backend service via Actions -> Restart. But issue still persists.
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: Configuration is not applying

Post by npolovenko »

@Cpt.Ackbar, Looks like the nagios process wasn't running on the broken server in the EU. Can you run the following commands on the broken server and show me the output?
cat /etc/rc.d/init.d/nagios | grep NagiosRunFile=
cat /usr/local/nagiosxi/scripts/nom_restore_nagioscore_checkpoint.sh | grep lockfile=
cat /usr/local/nagiosxi/scripts/nom_restore_nagioscore_checkpoint_specific.sh | grep lockfile=
cat /usr/local/nagios/etc/nagios.cfg | grep lock
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Cpt.Ackbar
Posts: 31
Joined: Thu Aug 17, 2017 7:14 am

Re: Configuration is not applying

Post by Cpt.Ackbar »

Code: Select all

[root@frkgnagxip1 user]# cat /etc/rc.d/init.d/nagios | grep NagiosRunFile=
NagiosRunFile=/var/run/nagios.lock
[root@frkgnagxip1 user]# cat /usr/local/nagiosxi/scripts/nom_restore_nagioscore_checkpoint.sh | grep lockfile=
lockfile="/var/run/nagios.lock"
[root@frkgnagxip1 user]# cat /usr/local/nagiosxi/scripts/nom_restore_nagioscore_checkpoint_specific.sh | grep lockfile=
lockfile="/var/run/nagios.lock"
[root@frkgnagxip1 user]# cat /usr/local/nagios/etc/nagios.cfg | grep lock
lock_file=/usr/local/nagios/var/nagios.lock
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Configuration is not applying

Post by scottwilkerson »

We need to edit this line in /usr/local/nagios/etc/nagios.cfg

from this

Code: Select all

lock_file=/usr/local/nagios/var/nagios.lock
to this

Code: Select all

lock_file=/var/run/nagios.lock
then run the following

Code: Select all

service nagios stop
killall -9 nagios
rm -f /var/run/nagios.lock /usr/local/nagios/var/nagios.lock
service nagios start
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
Cpt.Ackbar
Posts: 31
Joined: Thu Aug 17, 2017 7:14 am

Re: Configuration is not applying

Post by Cpt.Ackbar »

I have done it. It seems it is working now. Let me double check it tomorrow during my working hours and then we can close this issue. Thanks for your help
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Configuration is not applying

Post by scottwilkerson »

Cpt.Ackbar wrote:I have done it. It seems it is working now. Let me double check it tomorrow during my working hours and then we can close this issue. Thanks for your help
Sounds good, let us know
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
Cpt.Ackbar
Posts: 31
Joined: Thu Aug 17, 2017 7:14 am

Re: Configuration is not applying

Post by Cpt.Ackbar »

Confirming functionality. You can close this one.
Thanks
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Configuration is not applying

Post by scottwilkerson »

Cpt.Ackbar wrote:Confirming functionality. You can close this one.
Thanks
Locking thread
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
Locked