Filter Down hosts from list of unknown service statuses

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
andrewatmacys
Posts: 114
Joined: Tue Feb 06, 2018 9:25 am

Filter Down hosts from list of unknown service statuses

Post 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?
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: Filter Down hosts from list of unknown service statuses

Post 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.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
andrewatmacys
Posts: 114
Joined: Tue Feb 06, 2018 9:25 am

Re: Filter Down hosts from list of unknown service statuses

Post 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?
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Filter Down hosts from list of unknown service statuses

Post 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
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
andrewatmacys
Posts: 114
Joined: Tue Feb 06, 2018 9:25 am

Re: Filter Down hosts from list of unknown service statuses

Post 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?
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Filter Down hosts from list of unknown service statuses

Post 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
andrewatmacys
Posts: 114
Joined: Tue Feb 06, 2018 9:25 am

Re: Filter Down hosts from list of unknown service statuses

Post by andrewatmacys »

Thank you so much! You can mark this as closed now, thanks again!
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Filter Down hosts from list of unknown service statuses

Post by scottwilkerson »

andrewatmacys wrote:Thank you so much! You can mark this as closed now, thanks again!
Great! Locking thread
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
Locked