Page 3 of 4
Re: mv .cfg for switch I don't want to monitor crashes Nagio
Posted: Fri Mar 21, 2014 1:24 pm
by billperrotta
ahgmonitor:~ # grep -R 'Amsterdam Court' /etc/nagios/objects/* | grep -i 'host_name'
/etc/nagios/objects/computers/hotels/amcourt.cfg: host_name Amsterdam Court
/etc/nagios/objects/computers/hotels/amcourt.cfg: host_name Amsterdam Court
/etc/nagios/objects/computers/hotels/amcourt.cfg: host_name Amsterdam Court
ahgmonitor:~ # grep -R 'AMCourt innGate' /etc/nagios/objects/* | grep -i 'host_name'
/etc/nagios/objects/devices/inngates/ant_amcourt.cfg: host_name AMCourt innGate
ahgmonitor:~ #
Would those be the files? "Amsterdam Court and AMCourt innGate"
To make it clear "I do not want to remove the Amcourt parent" I want to remove the Amcourt inngate without crashing the whole system.
amcourt.cfg below
hostgroups hotel-servers
parents AH-AMCourt
}
5>
define service{
use generic-service
host_name Amsterdam Court
service_description C:\ Drive Space
check_command check_nt!USEDDISKSPACE!-l C -w 80 -c 90
notification_interval 1440
notification_options w,r
notification_period work-holiday
servicegroups drivespace
}
{>
(>define service{
use generic-service
host_name Amsterdam Court
service_description D:\ Drive Space
check_command check_nt!USEDDISKSPACE!-l D -w 90 -c 95
notification_interval 1440
notification_options w,r
.> notification_period work-holiday
I wanted to remove the .cfg to this node "sw_amct.cfg" nothing more. would commenting #AH-Parent out of those two files remove whole site?
or maybe I need to make a different object the parent?
Re: mv .cfg for switch I don't want to monitor crashes Nagio
Posted: Fri Mar 21, 2014 2:10 pm
by sreinhardt
Yes commenting out or removing the parent line is what you are looking to do. Then do another nagios -v command to verify your configs and report back the output. Hopefully it says everything is ok or only has warnings.
Re: mv .cfg for switch I don't want to monitor crashes Nagio
Posted: Fri Mar 21, 2014 2:18 pm
by billperrotta
Can I edit it without stopping nagios?
will flight check work and then if it fails put it right back ask for more help?
And allow me to remove the amcourt_sw.cfg file?
Re: mv .cfg for switch I don't want to monitor crashes Nagio
Posted: Fri Mar 21, 2014 2:22 pm
by sreinhardt
Can I edit it without stopping nagios?
Yep, not an issue at all
will flight check work and then if it fails put it right back ask for more help?
That sounds fine, provided you send us the output of the potentially failed verification.
And allow me to remove the amcourt_sw.cfg file?
You can certainly try, however it is impossible for us to know without having your actual config files to check against ourselves as to where there might be other dependencies on items within that configuration.
Re: mv .cfg for switch I don't want to monitor crashes Nagio
Posted: Fri Mar 21, 2014 2:28 pm
by billperrotta
Do i have to make sure I remove the file that broke it also to make sure?
So pounding out the parent statements will still allow those objects to be monitored but allow me to remove the switch.cfg child with out crashing nagipos?
however if there is another parent still out there somewhere it will still crash?
Re: mv .cfg for switch I don't want to monitor crashes Nagio
Posted: Mon Mar 24, 2014 12:43 pm
by scottwilkerson
As sreinhardt said, it is impossible for us to know without seeing all the configs, you can however make your changes and then try verifying the configuration to see if it will be sucessful before restarting nagios.
Re: mv .cfg for switch I don't want to monitor crashes Nagio
Posted: Mon Mar 24, 2014 1:40 pm
by billperrotta
That worked However it took out a piece of my pie on the map.
May see what the other guys think about it.
Its fine that host is gone the desired effect.
I backed up the object just in case.
I mastered adding nodes I guess I have to start somewhere to learn removing them.
is there a way to fill in the blank white spot in the map where the node was?
With green to complete the circle diagram?
Re: mv .cfg for switch I don't want to monitor crashes Nagio
Posted: Mon Mar 24, 2014 4:35 pm
by tmcdonald
Can you post a screenshot of what you mean?
Re: mv .cfg for switch I don't want to monitor crashes Nagio
Posted: Tue Mar 25, 2014 7:06 am
by billperrotta
See word doc below. Ah-Amcourt used to be in the inner most circle and the other two completed the circle on the top. after removing the parent ah- amcourt there is a white space on top,and the green circle is no longer complete. This is not a huge deal only cosmetic. but was wondering if there was away to fill it in with greene?
Re: mv .cfg for switch I don't want to monitor crashes Nagio
Posted: Tue Mar 25, 2014 4:25 pm
by scottwilkerson
In the map I cannot see what "Layout Method:" you have specified?
What version of Nagios Core is this?