Search found 2120 matches

by eloyd
Thu Nov 21, 2024 5:03 pm
Forum: Nagios XI
Topic: Is it possible to delete custom macros from the API?
Replies: 4
Views: 675

Re: Is it possible to delete custom macros from the API?

Thanks! As long as we're feature-requesting API issues, can you add this to it: I'd like to be able to either add an entity or modify an existing entity and mark it as "not active" similar to what you can do with the "Active" checkbox in the CCM. As far as I can tell, there is no...
by eloyd
Thu Nov 21, 2024 3:31 pm
Forum: Nagios XI
Topic: Is it possible to delete custom macros from the API?
Replies: 4
Views: 675

Re: Is it possible to delete custom macros from the API?

@DoubleDoubleA do you care to chime in here? :P
by eloyd
Thu Nov 21, 2024 3:29 pm
Forum: Nagios XI
Topic: Is it possible to delete custom macros from the API?
Replies: 4
Views: 675

Is it possible to delete custom macros from the API?

Okay, back to APIs for a moment. Let's say I have a host called TESTAPIHOST and I use the API to PUT a config/host/.../_alice=foo custom variable onto the host. Works great. Next day, I decide that _foo was not the correct name and we want to use _bob instead. There does not seem to be a way from th...
by eloyd
Thu Oct 17, 2024 10:09 am
Forum: Nagios XI
Topic: New Install on Ubuntu 22.04
Replies: 17
Views: 6144

Re: New Install on Ubuntu 22.04

OMG. That was like two months ago! :-) I'll have to go see what we did specifically, but I think it was: Install Ubuntu, download the XI tarball, untar it, and then edit the perf file as per viewtopic.php?p=358065#p358065 and went from there.
by eloyd
Fri Oct 04, 2024 10:49 am
Forum: Nagios XI
Topic: AP: Is there a way to delete a host from the list of hosts that the service runs on without deleting the entire service?
Replies: 17
Views: 4048

Re: AP: Is there a way to delete a host from the list of hosts that the service runs on without deleting the entire serv

danderson wrote: Fri Oct 04, 2024 10:44 am I think I get what you're saying, you want an API call that will basically add the host=!SOMEHOST line to the service config file and/or you want to preexisting delete command for a service to be able to handle that.
Yes!
by eloyd
Thu Oct 03, 2024 2:31 pm
Forum: Nagios XI
Topic: AP: Is there a way to delete a host from the list of hosts that the service runs on without deleting the entire service?
Replies: 17
Views: 4048

Re: AP: Is there a way to delete a host from the list of hosts that the service runs on without deleting the entire serv

Yes. For us, that's quite easy, because we've written an API pre-processor script. So it would be:

Code: Select all

# napi --api --config -t hostgroupmembers -hg <hostgroup> -o h -o C
host1,host2,host3,host4
:-)
by eloyd
Thu Oct 03, 2024 1:41 pm
Forum: Nagios XI
Topic: AP: Is there a way to delete a host from the list of hosts that the service runs on without deleting the entire service?
Replies: 17
Views: 4048

Re: AP: Is there a way to delete a host from the list of hosts that the service runs on without deleting the entire serv

What you've posted technically works because it creates a correct Nagios Core configuration file. However, it's....cumbersome. :-)
by eloyd
Thu Oct 03, 2024 12:43 pm
Forum: Nagios XI
Topic: AP: Is there a way to delete a host from the list of hosts that the service runs on without deleting the entire service?
Replies: 17
Views: 4048

Re: AP: Is there a way to delete a host from the list of hosts that the service runs on without deleting the entire serv

I am not looking for a way to temporarily disable service check execution. I am asking for a way to flip the active/inactive bit on the service, just like one can do in the GUI. Flipping it inactive will cause it to be ignored when XI Applies Configuration and it will not be written to the Nagios Co...
by eloyd
Thu Oct 03, 2024 10:10 am
Forum: Nagios XI
Topic: AP: Is there a way to delete a host from the list of hosts that the service runs on without deleting the entire service?
Replies: 17
Views: 4048

Re: AP: Is there a way to delete a host from the list of hosts that the service runs on without deleting the entire serv

I thought I was clear, but maybe I wasn't. You can do the same thing via the API if you know what the underlying config file should look like. But I don't think that the API DELETE command should delete the entire service check if only one host is specified, and more hosts are still listed on the se...