Unable to delete host

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
klee
Posts: 147
Joined: Fri Apr 04, 2014 2:31 pm

Unable to delete host

Post 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
You do not have the required permissions to view the files attached to this post.
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Unable to delete host

Post 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.
klee
Posts: 147
Joined: Fri Apr 04, 2014 2:31 pm

Re: Unable to delete host

Post 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!
You do not have the required permissions to view the files attached to this post.
Last edited by klee on Wed May 14, 2014 4:04 pm, edited 1 time in total.
klee
Posts: 147
Joined: Fri Apr 04, 2014 2:31 pm

Re: Unable to delete host

Post 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
klee
Posts: 147
Joined: Fri Apr 04, 2014 2:31 pm

Re: Unable to delete host

Post 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
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Unable to delete host

Post 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
Former 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.
klee
Posts: 147
Joined: Fri Apr 04, 2014 2:31 pm

Re: Unable to delete host

Post 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
klee
Posts: 147
Joined: Fri Apr 04, 2014 2:31 pm

Re: Unable to delete host

Post 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
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Unable to delete host

Post 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
Former 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.
klee
Posts: 147
Joined: Fri Apr 04, 2014 2:31 pm

Re: Unable to delete host

Post 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?
Locked