sni / Thruk

Thruk is a multibackend monitoring webinterface for Naemon, Nagios, Icinga and Shinken using the Livestatus API.
http://www.thruk.org
Other
408 stars 148 forks source link

Truncated servicedependency when using hostgroups #930

Closed riton closed 5 years ago

riton commented 5 years ago

Describe the bug This bug report follows a discussion initiated on IRC #naemon with @sni . I've created this repository to hold the full configuration used to reproduce the bug. The infrastructure as been created only for this bug report.

To make it quick, with the following configuration:

define servicedependency {
    hostgroup_name                      httpd_worker,httpd_proxy
    service_description                 check httpd proc
    dependent_host_name                 http-client
    dependent_service_description       check get http app health,check get http app statistics
    execution_failure_criteria          w,u,c
    notification_failure_criteria       w,u,c
}

Only one host dependency (one from the _httpdworker hostgroup) shows up in Livestatus or Thruk when 3 hosts should be expanded from the hostgroups _httpdworker and _httpdproxy.

Thruk Version

[root@b878445f165c /]# rpm -qa '*naemon*'
naemon-1.0.10-0.noarch
naemon-livestatus-1.0.10-0.x86_64
naemon-thruk-1.0.10-0.noarch
libnaemon-1.0.10-0.x86_64
naemon-core-1.0.10-0.x86_64
[root@b878445f165c /]# rpm -qa '*thruk*'
thruk-base-2.28-1.x86_64
thruk-2.28-1.x86_64
libthruk-2.26-0.x86_64
thruk-plugin-reporting-2.28-1.x86_64
naemon-thruk-1.0.10-0.noarch

To Reproduce Steps to reproduce the behavior:

  1. Run naemon with this objects definition file
  2. Go to the check get http app health service
  3. See that the Depends On list is not complete (according to my understanding)

Expected behavior From my understanding of the servicedependency object and the documentation, I'm expecting to see the following list in the Depends On display:

Screenshots infrastructure

check_get_http_app_health_service_dep

Additional context Livestatus reports the same truncated informations:

[root@b878445f165c /]# echo -e "GET services\nFilter: description = check get http app health\nColumns: depends_exec, depends_notify\n" | unixcat /var/cache/naemon/live
;http-server-2|check httpd proc
sni commented 5 years ago

i am able to reproduce that. But as you already noticed, this seems to be a naemon issue. Could you create/move the issue to naemon/naemon-core please?

sni commented 5 years ago

since i was working on dependencies anyway, should be fixed with: https://github.com/naemon/naemon-core/pull/294