Page 1 of 2
Unable to delete host
Posted: Wed May 14, 2014 2:55 pm
by klee
I placed a configuration file (see attached) into the path below. Now, Nagios sees a host named: Nas10, which I'm not able to delete, regardless of the fact that I deleted this isilon-service.cfg file (and rebooted).
/usr/local/nagios/etc/static/isilon-services.cfg
http://exchange.nagios.org/directory/Pl ... on/details
Please help.
Thanks,
-klee
Re: Unable to delete host
Posted: Wed May 14, 2014 3:00 pm
by slansing
Are you getting an error while trying to delete it? Did you run a nagios verification to see what might be causing it?
You should just be able to delete a static file using the standard *nix (rm) command. The static files do not show up in the CCM.
Re: Unable to delete host
Posted: Wed May 14, 2014 3:20 pm
by klee
I deleted the file manually in Linux but I'm still unable to delete the host definition via the GUI.
I ran a verification /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg > verify.txt
results are attached
Also, there's an alert stating Nagios "Monitoring Engine is not running"
Plus, I tried running a passive check test on one our hosts but no results in logs and GUI freezes. I rebooted the system again.
This alert show up on the top of page where I go to run passive check test:
External Command Interface
Last Updated: Wed May 14 16:17:54 EDT 2014
Nagios® Core⢠3.5.0 -
http://www.nagios.org
Logged in as nagiosadmin
Warning: Could not read program status information!
Re: Unable to delete host
Posted: Wed May 14, 2014 3:24 pm
by klee
This is what I get when I try to delete from XI Host Details. However, it does not exit in Core Config Manager.
------------------------------------------------------------------------------------------------
Host Deletion Error
nas10
Could not find a unique id for this host
Host cannot be deleted using this method
One or more errors were detected that prevent the host from being deleted.
Possible causes include...
The host is associated with other hosts, services, or objects that need to be deleted first
The host is maintained in a static or external configuration file
To resolve this issue...
Use the Nagios Core Configuration Manager to delete the host - or -
Manually delete the host definition from the appropriate external configuration file
Re: Unable to delete host
Posted: Wed May 14, 2014 4:01 pm
by klee
XI System Component Status displays an exclamation mark for Monitoring Engine.
When I float my the mouse arrow on top of exclamation mark, I see the following message:
no lock file found in /us/local/nagios/var/nagios.lock
Re: Unable to delete host
Posted: Wed May 14, 2014 4:28 pm
by abrist
klee wrote:Also, there's an alert stating Nagios "Monitoring Engine is not running"
This message is due to the fact that nagios is not currently running. Judging from your verify output, there are a few config errors that must be resolved in the ccm before the nagios process can be started.
Where have you specified these global event handlers?
Error: Global host event handler command 'nms_global_host_event_handler' is not defined anywhere!
Error: Global service event handler command 'nms_global_service_event_handler' is not defined anywhere!
No associated commands exist for these global event handler declarations, so the config errors out and does not apply/start nagios.
Did you change the global event handlers in nagios.cfg?
They should be:
Code: Select all
# GLOBAL EVENT HANDLERS
global_host_event_handler=xi_host_event_handler
global_service_event_handler=xi_service_event_handler
Re: Unable to delete host
Posted: Wed May 14, 2014 4:41 pm
by klee
Yes abrist, Global Event Handler configuration is as follows:
/usr/local/nagios/libexec/nms_global_host_change_handler.sh --host="%host%" --hoststate=%hoststate% --hoststateid=%hoststateid% --lasthoststate=%lasthoststate% --lasthoststateid=%lasthoststateid% --hoststatetype=%hoststatetype% --currentattempt=%currentattempt% --maxattempts=%maxattempts% --hosteventid=%hosteventid% --hostproblemid=%hostproblemid% --hostoutput="%hostoutput%" --hostdowntime=%hostdowntime%
/usr/local/nagios/libexec/nms_global_service_change_handler.sh --host="%host%" --service="%service%" --hoststate=%hoststate% --servicestate=%servicestate% --servicestateid=%servicestateid% --lastservicestate=%lastservicestate% --lastservicestateid=%lastservicestateid% --servicestatetype=%servicestatetype% --currentattempt=%currentattempt% --maxattempts=%maxattempts% --serviceeventid=%serviceeventid% --serviceproblemid=%serviceproblemid% --serviceoutput="%serviceoutput%" --servicedowntime=%servicedowntime%
Nagios.cfg entries:
global_host_event_handler=nms_global_host_event_handler
global_service_event_handler=nms_global_service_event_handler
I added also this to CCM commands (which we've determinded from the other thread, that I don't have to do, yes?). Please, where else do I have to define the command?
nms_global_host_change_handler $USER1$/nms_global_host_change_handler.sh
nms_global_service_change_handler $USER1$nms_global_service_change_handler.sh
Re: Unable to delete host
Posted: Wed May 14, 2014 4:48 pm
by klee
I already see that I entered this wrong; it's supposed to read _change_handler (not event_handler). Let me change this and reboot the system... I'll keep you posted. Sorry.
Nagios.cfg entries:
global_host_event_handler=nms_global_host_event_handler
global_service_event_handler=nms_global_service_event_handler
Re: Unable to delete host
Posted: Wed May 14, 2014 4:49 pm
by abrist
No idea if the following was a mistype, but your command names for your event handlers are different than what is specified in your config.
From the nagios.cfg:
klee wrote:global_host_event_handler=nms_global_host_event_handler
global_service_event_handler=nms_global_service_event_handler
From the CCM commands:
klee wrote:nms_global_host_change_handler $USER1$/nms_global_host_change_handler.sh
nms_global_service_change_handler $USER1$nms_global_service_change_handler.sh
I would suggest changing the ccm command names to:
Code: Select all
nms_global_host_event_handler
nms_global_service_event_handler
Re: Unable to delete host
Posted: Wed May 14, 2014 4:57 pm
by klee
Thanks Abrist, please see above post...
Yeah, I screwed up the config... sorry about that.
So you're saying Global Event Handlers do have to be configured in 3 different places?
1) Global Event Handler Component Configuration Page
2) nagios.cfg
3) CCM command?