Proper Method to Remove a Host / 24x7 Timeperiod
Proper Method to Remove a Host / 24x7 Timeperiod
For all support requests, we need to know:
Linux Distribution and version?
32 or 64bit?
VMware Image or Manual Install of XI?
Are there specials configurations on your system, ie; is Gnome installed? Are you using a proxy? Are you using SSL?
**If you are encountering multiple issues that may not be related, start a thread for each issue
-64 bit
- Vmware Image
- Using a Proxy
2012.r3 attempting upgrade to 2012.r8 (Nagios reports I am on .r8 in the gui, but the installation had 3 Errors).
Hosts that have been removed from XI via the Core Config Manager have lingered; cannot re-add or otherwise via the GUI because the update fails.
Errors are complaining about a host having a non-existing 24x7 time period attached to them.
(I had the 24x7 vs. xi_timeperiod_24x7 problem last fall) - 24x7 was removed in order to fix this.
Questions to be answered:
What is the proper way to Get Rid of Hosts via the GUI? I can see the darn'd config files in /etc but I says not to remove them manually!
Linux Distribution and version?
32 or 64bit?
VMware Image or Manual Install of XI?
Are there specials configurations on your system, ie; is Gnome installed? Are you using a proxy? Are you using SSL?
**If you are encountering multiple issues that may not be related, start a thread for each issue
-64 bit
- Vmware Image
- Using a Proxy
2012.r3 attempting upgrade to 2012.r8 (Nagios reports I am on .r8 in the gui, but the installation had 3 Errors).
Hosts that have been removed from XI via the Core Config Manager have lingered; cannot re-add or otherwise via the GUI because the update fails.
Errors are complaining about a host having a non-existing 24x7 time period attached to them.
(I had the 24x7 vs. xi_timeperiod_24x7 problem last fall) - 24x7 was removed in order to fix this.
Questions to be answered:
What is the proper way to Get Rid of Hosts via the GUI? I can see the darn'd config files in /etc but I says not to remove them manually!
-
slansing
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: Proper Method to Remove a Host / 24x7 Timeperiod
Can you give us the exact errors the upgrade script is outputting? It also sounds like you are getting configuration based issues, but lets make sure we can get you up to date first.
Re: Proper Method to Remove a Host / 24x7 Timeperiod
Hi slansing,
You are correct, these are configuration issues. -> I cannot provide the exact error message, but the latest is "Duplicate time period found in timeperiods.cfg" between 24x7 and nagios_timeperoid)24x7.
The upgrade seems to think it has succeeded, and the dashboard is reporting 2012R1.8. I would love to create the diagnostic package for you guys, but it contains sensitive information... (Like private Ip address, (thank you NERC/CIP Standards)).
Given that if you still need the exact error I will redouble my efforts tomorrow with a follow-up.
You are correct, these are configuration issues. -> I cannot provide the exact error message, but the latest is "Duplicate time period found in timeperiods.cfg" between 24x7 and nagios_timeperoid)24x7.
The upgrade seems to think it has succeeded, and the dashboard is reporting 2012R1.8. I would love to create the diagnostic package for you guys, but it contains sensitive information... (Like private Ip address, (thank you NERC/CIP Standards)).
Given that if you still need the exact error I will redouble my efforts tomorrow with a follow-up.
Re: Proper Method to Remove a Host / 24x7 Timeperiod
Were you able to solve your issue?Given that if you still need the exact error I will redouble my efforts tomorrow with a follow-up.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Proper Method to Remove a Host / 24x7 Timeperiod
Sorry for the delay in reply, my issue is not currently solved.
Re: Proper Method to Remove a Host / 24x7 Timeperiod
You may have the xi_timeperiod_24x7 declared twice, once in your timeperiods config, and once in the nagios xi static objects config. Try commenting out the section below in the config /usr/local/nagios/etc/static/xiobjects.cfg:
And then restart nagios:
Code: Select all
define timeperiod {
timeperiod_name xi_timeperiod_24x7
alias 24x7
name xi_timeperiod_24x7
saturday 00:00-24:00
friday 00:00-24:00
thursday 00:00-24:00
wednesday 00:00-24:00
tuesday 00:00-24:00
monday 00:00-24:00
sunday 00:00-24:00
}Code: Select all
service nagios restartFormer 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.
"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.
Re: Proper Method to Remove a Host / 24x7 Timeperiod
Thank you abrist, I will try that soon!
Re: Proper Method to Remove a Host / 24x7 Timeperiod
Let us know if you have any more issues.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Proper Method to Remove a Host / 24x7 Timeperiod
Sorry for the late reply on this -> The nagios service wasn't able to restart due to a configuration error.
Nagios Core 3.4.1
Copyright (c) 2009-2011 Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 05-11-2012
License: GPL
Website: http://www.nagios.org
Reading configuration data...
Read main config file okay...
Processing object config directory '/usr/local/nagios/etc/static'...
Processing object config file '/usr/local/nagios/etc/static/xiobjects.cfg'...
Processing object config file '/usr/local/nagios/etc/static/xitemplates.cfg'...
Processing object config file '/usr/local/nagios/etc/static/xitest.cfg'...
Processing object config file '/usr/local/nagios/etc/contacttemplates.cfg'...
Processing object config file '/usr/local/nagios/etc/contactgroups.cfg'...
Processing object config file '/usr/local/nagios/etc/contacts.cfg'...
Processing object config file '/usr/local/nagios/etc/timeperiods.cfg'...
Warning: Duplicate definition found for timeperiod 'xi_timeperiod_24x7' (config file '/usr/local/nagios/etc/timeperiods.cfg', starting on line 221)
Error: Could not add object property in file '/usr/local/nagios/etc/timeperiods.cfg' on line 222.
Error processing object config files!
***> One or more problems was encountered while processing the config files...
Check your configuration file(s) to ensure that they contain valid
directives and data defintions. If you are upgrading from a previous
version of Nagios, you should be aware that some variables/definitions
may have been removed or modified in this version. Make sure to read
the HTML documentation regarding the config files, as well as the
'Whats New' section to find out what has changed.
Nagios Core 3.4.1
Copyright (c) 2009-2011 Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 05-11-2012
License: GPL
Website: http://www.nagios.org
Reading configuration data...
Read main config file okay...
Processing object config directory '/usr/local/nagios/etc/static'...
Processing object config file '/usr/local/nagios/etc/static/xiobjects.cfg'...
Processing object config file '/usr/local/nagios/etc/static/xitemplates.cfg'...
Processing object config file '/usr/local/nagios/etc/static/xitest.cfg'...
Processing object config file '/usr/local/nagios/etc/contacttemplates.cfg'...
Processing object config file '/usr/local/nagios/etc/contactgroups.cfg'...
Processing object config file '/usr/local/nagios/etc/contacts.cfg'...
Processing object config file '/usr/local/nagios/etc/timeperiods.cfg'...
Warning: Duplicate definition found for timeperiod 'xi_timeperiod_24x7' (config file '/usr/local/nagios/etc/timeperiods.cfg', starting on line 221)
Error: Could not add object property in file '/usr/local/nagios/etc/timeperiods.cfg' on line 222.
Error processing object config files!
***> One or more problems was encountered while processing the config files...
Check your configuration file(s) to ensure that they contain valid
directives and data defintions. If you are upgrading from a previous
version of Nagios, you should be aware that some variables/definitions
may have been removed or modified in this version. Make sure to read
the HTML documentation regarding the config files, as well as the
'Whats New' section to find out what has changed.
-
sreinhardt
- -fno-stack-protector
- Posts: 4366
- Joined: Mon Nov 19, 2012 12:10 pm
Re: Proper Method to Remove a Host / 24x7 Timeperiod
To quote Abrist, have you tried:
You may have the xi_timeperiod_24x7 declared twice, once in your timeperiods config, and once in the nagios xi static objects config. Try commenting out the section below in the config /usr/local/nagios/etc/static/xiobjects.cfg:
Code: Select all
define timeperiod { timeperiod_name xi_timeperiod_24x7 alias 24x7 name xi_timeperiod_24x7 saturday 00:00-24:00 friday 00:00-24:00 thursday 00:00-24:00 wednesday 00:00-24:00 tuesday 00:00-24:00 monday 00:00-24:00 sunday 00:00-24:00 }
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.