How to setup Host dependency in icinga [ssh agentless setup]

  • I have configured 100 servers with ssh agentless setup , All servers are only accessible through a port forwarding server 192.168.60.2, But sometimes this port forwarding server may not reachable which causes icinga to assume all 100 hosts are down, How can I prevent such behaviour in icinga by setting a dependency to "port forwarding server 192.168.60.2" and stop all related service & host notifications ?

    Sample Host configs


  • Thanks for the quick reply Dnsmichi ,

    Is there any syntax errors in below code ?


  • apply Dependency "portforward-gateway" to Services

    must be : apply Dependency "portforward-gateway" to Service.

    dependencies that tie to services need both of the below example set:

    Code
    1. parent_host_name = "thehost" parent_service_name = "the_service_i_am_depending_on"

    Why dont you validate your config using icinga2 daemon --validate, it would have told you instantly...

  • must be : apply Dependency "portforward-gateway" to Service.

    dependencies that tie to services need both of the below example set:

    Code
    1. parent_host_name = "thehost" parent_service_name = "the_service_i_am_depending_on"

    Why dont you validate your config using icinga2 daemon --validate, it would have told you instantly...


    Actually I meant "is this syntax correct ?" , Yes I do check validation by "service icinga checkconfig "