Feature #1820

Child hosts

Added by mzac over 2 years ago. Updated over 2 years ago.

Status:ResolvedStart date:08/15/2011
Priority:NormalDue date:
Assignee:dnsmichi% Done:

100%

Category:Information
Target version:Icinga 1.x - 1.6

Description

I was wondering if the Icinga team has plans to add an option into the classic web interface to be able to find what are the child hosts of a host? For example, when I have a multiple blocking outages and multiple hosts that are unreachable, I want to be able to see a list (and not a map) of what hosts are affected. Thruk GUI for Nagios/Icinga has already done something like this but I'd REALLY like to see this in Icinga! I'm currently working on a deployment to monitor over 6k hosts with about 20k services so this would be a very good feature to have!

classicui_extinfo_add_child_hosts.png (8.34 KB) dnsmichi, 10/06/2011 07:13 pm

classicui_extinfo_add_child_hosts_immediate_and_all.png (11.7 KB) dnsmichi, 10/20/2011 12:24 pm


Related issues

Related to Classic UI - Feature #1981: add multiple hosts/services to status.cgi GET as done wit... Resolved 10/06/2011
Related to Docs - Feature #1982: add new extinfo_show_child_hosts option to cgi.cfg Resolved 10/06/2011

Associated revisions

Revision 15569280
Added by dnsmichi over 2 years ago

  • classic ui: add opt-in extinfo_show_child_hosts to show child hosts in extinfo.cgi #1820

by default disabled, because it will loop through all available hosts,
and then checking the the host is an immediate child which will invoke
at least another loop, and causing longer loading times.

works the same as hostgroups and dependencies.

refs #1820

Revision 01a7fbe6
Added by ricardo over 2 years ago

classic-ui: enhanced extinfo_show_child_hosts to show child hosts in extinfo.cgi #1820

refs: #1820

  • changes config option to
    0 = disabled
    1 = only show immediate child hosts
    2 = show immediate and all child hosts
  • you have to click the + icon next to the text to see child hosts
    this prevents the page from "overflowing" when host has lots of
    child hosts.

History

#1 Updated by dnsmichi over 2 years ago

  • Status changed from New to Feedback
  • Target version set to 1.6

that will need a new search using is_host_immediate_child_of_host(parent_host, child_host) and running through all available hosts. could be a performance killer on large environments, so i'd expect that to be enabled via cgi.cfg and disabled by default.

#2 Updated by mzac over 2 years ago

I was wondering, when you have a blocking outage it shows the number of hosts affected. Maybe this option could be more easily added to the blocking outage page where you could click on the number of hosts affected. If it has this calculation already does it have the hosts?

Severity    Host         State   Notes   State Duration   # Hosts Affected    # Services Affected    Actions
210         ether-sw1    DOWN    N/A     0d 0h 12m 15s    150                 242         
                                                          ^-- Click on this to see which hosts are affected

#3 Updated by mjbrooks over 2 years ago

It has the count, but which hosts they are would have to be built in the manner dnsmichi described and has the drawback he alluded to.

I do like the idea too though.

#4 Updated by dnsmichi over 2 years ago

some test configs.

define host{
        use                     linux-server            ; Name of host template to use
                                                        ; This host definition will inherit all variables that are defined
                                                        ; in (or inherited by) the linux-server host template definition.
        host_name               localhost-test
        alias                   localhost-test
        address                 127.0.0.1
        action_url              http://wiki/.../SvcView?hostgroup=$HOSTGROUPNAME$&hostname=$HOSTNAME$
        }

define host{
        use                     linux-server            ; Name of host template to use
                                                        ; This host definition will inherit all variables that are defined
                                                        ; in (or inherited by) the linux-server host template definition.
        host_name               localhost-test-p1
        alias                   localhost-test-p1
        address                 127.0.0.1
        action_url              http://wiki/.../SvcView?hostgroup=$HOSTGROUPNAME$&hostname=$HOSTNAME$
        parents                 localhost-test
        }

define host{
        use                     linux-server            ; Name of host template to use
                                                        ; This host definition will inherit all variables that are defined
                                                        ; in (or inherited by) the linux-server host template definition.
        host_name               localhost-test-p2
        alias                   localhost-test-p2
        address                 127.0.0.1
        action_url              http://wiki/.../SvcView?hostgroup=$HOSTGROUPNAME$&hostname=$HOSTNAME$
        parents                 localhost-test
        }

a shiny pic how it would look like in extinfo.cgi

#5 Updated by dnsmichi over 2 years ago

the outages.cgi and the count below can't be taken just because of the fact that there is no filter for that on the status.cgi - you might pass a seperated list of hosts to be shown though, if this would be implemented - see #1981

#6 Updated by dnsmichi over 2 years ago

  • Status changed from Feedback to Assigned
  • Assignee set to dnsmichi

made it a config option on the cgi.cfg so this can be used further.

# SHOW CHILD HOSTS IN EXTINFO OPTION
# This Option allows you to specify if the extended host information
# cgi will show all direct child hosts.
# By default disabled, as this could be a performance killer.

extinfo_show_child_hosts=0

#7 Updated by dnsmichi over 2 years ago

pushed to dev/cgis for internal verification, if ok merge to test/cgis pls @ Ricardo.

#8 Updated by ricardo over 2 years ago

  • Status changed from Assigned to Feedback

reworked it a bit.

  • changes config option to
    0 = disabled
    1 = only show immediate child hosts
    2 = show immediate and all child hosts
  • you have to click the + icon next to the text to see child hosts
    this prevents the page from "overflowing" when host has lots of
    child hosts.

in current "test/cgi" please test test test!

#9 Updated by dnsmichi over 2 years ago

if so, please update the docs issue too!

i will test the changes once i'll get my hands on my dev box again (later next week).

#10 Updated by dnsmichi over 2 years ago

defined another bunch of configs, adding a deeper leave.

define host{
        use                     linux-server            ; Name of host template to use
                                                        ; This host definition will inherit all variables that are defined
                                                        ; in (or inherited by) the linux-server host template definition.
        host_name               localhost-test
        alias                   localhost-test
        address                 127.0.0.1
        action_url              http://wiki/.../SvcView?hostgroup=$HOSTGROUPNAME$&hostname=$HOSTNAME$
        }

define host{
        use                     linux-server            ; Name of host template to use
                                                        ; This host definition will inherit all variables that are defined
                                                        ; in (or inherited by) the linux-server host template definition.
        host_name               localhost-test-p1
        alias                   localhost-test-p1
        address                 127.0.0.1
        action_url              http://wiki/.../SvcView?hostgroup=$HOSTGROUPNAME$&hostname=$HOSTNAME$
        parents                 localhost-test
        }

define host{
        use                     linux-server            ; Name of host template to use
                                                        ; This host definition will inherit all variables that are defined
                                                        ; in (or inherited by) the linux-server host template definition.
        host_name               localhost-test-p2
        alias                   localhost-test-p2
        address                 127.0.0.1
        action_url              http://wiki/.../SvcView?hostgroup=$HOSTGROUPNAME$&hostname=$HOSTNAME$
        parents                 localhost-test
        }

define host{
        use                     linux-server            ; Name of host template to use
                                                        ; This host definition will inherit all variables that are defined
                                                        ; in (or inherited by) the linux-server host template definition.
        host_name               localhost-test-p1-2
        alias                   localhost-test-p1-2
        address                 127.0.0.1
        action_url              http://wiki/.../SvcView?hostgroup=$HOSTGROUPNAME$&hostname=$HOSTNAME$
        parents                 localhost-test-p1
        }

localhost-test-p1-2 will only be shown if 2 is enabled in cgi.cfg

screenshot reflects that, with 1 the above behavior works, with 0 nothing shown. the + js icon makes sense.

#11 Updated by dnsmichi over 2 years ago

  • Category set to Information
  • % Done changed from 0 to 100

#12 Updated by dnsmichi over 2 years ago

  • Status changed from Feedback to Resolved

Also available in: Atom PDF