Apply rule 'Service' does not match anywhere! - debugging

Hello,

I get this warning on one of the satellites.

I would like to get more insight into this warning. I ran “icinga2 daemon -C -x debug” but other than warning , I don’t see any other related details.

How do I debug the apply rule on a satellite ?

Please advise

Thanks

https://icinga.com/docs/icinga-2/latest/doc/20-script-debugger/

@monigacom
Can you show us the service apply rule and maybe on of the host configs that it should apply to?

Here is the config info

apply Service "App2" {
    import "generic-service"
       check_command = "appcheck"
       vars.user = "test"
       if ( host.vars.tcp_ports ) { vars.portarg = true }
       check_interval = 5m
       assign where check_ifapp2host(host) 

}

object Host "test_host" {
  import "generic-linux-host"

  address = "X.X.X.X"
  vars.app = ["App2"]
  vars.location = "DC"
}

Thanks

I tried to use “debugger” on the satellite in the service config in /var/lib/icinga2/api… but it didn’t work while using 'icinga2 daemon -C -X"

So I’m not sure how to debug such problem at the satellite end.

Thanks

Does the function “check_ifapp2host” return true for the host in question?

Yes , it does.

The issue turned out that one of the satellites was running a newer version of “icinga2” version. As soon as I downgraded it, the apply rule worked on it.

Still want to understand… how to troubleshoot such issue on a satellite though…

Thanks