Page 1 of 1

Filter Down hosts from list of unknown service statuses

Posted: Wed Dec 05, 2018 3:58 pm
by andrewatmacys
When running a report, I can see unknown service statuses, but I would like to filter out hosts that are down, showing only hosts that are up/pingable. Is there a way to do this with the report function or the API?

Re: Filter Down hosts from list of unknown service statuses

Posted: Wed Dec 05, 2018 5:14 pm
by npolovenko
Hello, @andrewatmacys. What kind of report are you looking for? There is no way to run reports against hosts in OK state only, but you can create a hostgroup for these hosts and run a report against a hostgroup.

Re: Filter Down hosts from list of unknown service statuses

Posted: Fri Dec 07, 2018 8:31 am
by andrewatmacys
That's pretty much exactly what I was wondering if I could do, if that makes sense.

I take it that means that there's no way to do that through the API as well?

Re: Filter Down hosts from list of unknown service statuses

Posted: Fri Dec 07, 2018 10:25 am
by scottwilkerson
You can do this through the api

If you are using the objects/hoststatus API you would just add the following to the API URL

Code: Select all

&current_state=0

Re: Filter Down hosts from list of unknown service statuses

Posted: Wed Dec 12, 2018 10:58 am
by andrewatmacys
Thank you!

One more question, is there a way to see when a host was added to a hostgroup, like a date? Say if I added a host to Linux-servers yesterday, it would come back telling me it was added on 12/11/2018?

Re: Filter Down hosts from list of unknown service statuses

Posted: Wed Dec 12, 2018 5:34 pm
by ssax
Unfortunately you probably won't be able to get that information. The closest you could get would be that the Admin > Audit Log or Configure > Core Config Manage > CCM > Audit log shows:

Code: Select all

2018-12-12 16:29:43	228	Core Config Manager	MODIFY	nagiosadmin	localhost	Host group modified: linux-servers
But it doesn't show what hosts were added/removed from it.

I've requested that a feature be added:

FR: XI - Audit Log: Show which hosts/services were added/removed from hostgroups/servicegroups in the audit logs

Re: Filter Down hosts from list of unknown service statuses

Posted: Thu Dec 13, 2018 9:21 am
by andrewatmacys
Thank you so much! You can mark this as closed now, thanks again!

Re: Filter Down hosts from list of unknown service statuses

Posted: Thu Dec 13, 2018 3:00 pm
by scottwilkerson
andrewatmacys wrote:Thank you so much! You can mark this as closed now, thanks again!
Great! Locking thread