cannot change parent once it is configured

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
rba
Posts: 9
Joined: Mon Oct 24, 2016 10:17 am

cannot change parent once it is configured

Post by rba »

Hello,

This is was a manual install of CentOS 7.3 64 bit on a fresh vm. Attached is the profile.

I can configure a parent but once it has been configured I cannot change it.
Applying changes from CCM reports success and shows the new parent but the parents are not actually updated in the config file.
Trying to change the parent through configure host- also reports success but after it's completed it show's the original parent not the new one, which is true.

Looking at the config in /usr/local/nagios/etc/hosts/host.cfg the original parent is still there

Changing parents manually in host.cfg does work... and is reflected in the maps

###############################################################################
#
# Host configuration file
#
# Created by: Nagios Core Config Manager 2.6.5
# Date: 2017-02-27 17:09:01
# Version: Nagios 3.x config file
#
# --- DO NOT EDIT THIS FILE BY HAND ---
# Nagios CCM will overwrite all manual settings during the next update if you
# would like to edit files manually, place them in the 'static' directory or
# import your configs into the CCM by placing them in the 'import' directory.
#
###############################################################################

define host {
host_name aic231r2
use xiwizard_switch_host
address aic231r2
parents wan231h10 <<< never changes
max_check_attempts 5
check_interval 5
retry_interval 1
check_period xi_timeperiod_24x7
contacts nagiosadmin
notification_interval 60
notification_period xi_timeperiod_24x7
icon_image switch.png
statusmap_image switch.png
_xiwizard switch
register 1
}


Any suggestions, or should i move the config files to static directory?

Thanks
You do not have the required permissions to view the files attached to this post.
avandemore
Posts: 1597
Joined: Tue Sep 27, 2016 4:57 pm

Re: cannot change parent once it is configured

Post by avandemore »

What is the output from the following?

Code: Select all

grep "date.timezone" /etc/php.ini
ls -l /etc/localtime
php -r 'echo date("D M j G:i:s T Y")."\n";'
date
mysql -unagiosxi -pn@gweb -e "SELECT NOW();"
Previous Nagios employee
rba
Posts: 9
Joined: Mon Oct 24, 2016 10:17 am

Re: cannot change parent once it is configured

Post by rba »

hmm- maybe the timezone needs to be PST everywhere?


[root@nms231s15 etc]# grep "date.timezone" /etc/php.ini
; http://php.net/date.timezone
date.timezone = UTC
[root@nms231s15 etc]# ls -l /etc/localtime
lrwxrwxrwx. 1 root root 41 Feb 1 13:43 /etc/localtime -> ../usr/share/zoneinfo/America/Los_Angeles
[root@nms231s15 etc]# php -r 'echo date("D M j G:i:s T Y")."\n";'
Mon Feb 27 23:46:31 UTC 2017
[root@nms231s15 etc]# date
Mon Feb 27 15:46:39 PST 2017
[root@nms231s15 etc]# mysql -unagiosxi -pn@gweb -e "SELECT NOW();"
+---------------------+
| NOW() |
+---------------------+
| 2017-02-27 15:46:50 |
+---------------------+
rba
Posts: 9
Joined: Mon Oct 24, 2016 10:17 am

Re: cannot change parent once it is configured

Post by rba »

Where would i change that?
Thanks
avandemore
Posts: 1597
Joined: Tue Sep 27, 2016 4:57 pm

Re: cannot change parent once it is configured

Post by avandemore »

Yes, that is a problem. To reset all the timezones to a consistent state, the easiest way is:

XI > Admin > System Settings > Timezone Settings > Toggle to random TZ > Update Settings
XI > Admin > System Settings > Timezone Settings > Toggle to correct TZ > Update Settings

Then if you rerun the previous command, it should look better.
Previous Nagios employee
rba
Posts: 9
Joined: Mon Oct 24, 2016 10:17 am

Re: cannot change parent once it is configured

Post by rba »

That did it, Thanks for your help!
avandemore
Posts: 1597
Joined: Tue Sep 27, 2016 4:57 pm

Re: cannot change parent once it is configured

Post by avandemore »

Thanks for using Nagios! If you have further issues, please open a new thread or ticket.
Previous Nagios employee
Locked