Set zone or 2 satellites as command_endpoint for check

Hi there.

My colleague created a topic on old forum. But I’ll move it there.

Problem is that we’ve multi master and multi satellite setup for our configuration. After migration to agents we need to specify command_endpoint for icmp checks. Before migration check was triggered by master randomly from one of satellites. After I didn’t find any example for this situation in documentation (or could be i missed it).
I had an idea to specify zone as command_endpoint object but this doesn’t work. And I assume atm only host could be specified as command_endpoint.
Maybe you can help me with ideas how to resolve this issue?

Hi,

There’s already a Feature Request for that.

Anyway, adding the Service to correct zone should do the trick, too. Either automatically by putting it in the right zone directory or adding it to a host a sepcific zone or by explicitely set to zone parameter.

See

https://www.icinga.com/docs/icinga2/latest/doc/09-object-types/#service

For details.

1 Like

Yeah, atm we specified one of satellites as command_endpoint.
And correct zone works for setup without agents. But we’re migrating to master-satellite-agent setup.
Thank you very much for link. I’ll hope it would be implemented shortly :slight_smile:

You should be able to move single checks to a parent zone. e.g. have all checks in the agent zone but only http in the zone of the satellite the agents depend on. It helps to add a custom attribute like vars.parent_zone to every host (via template) and set zone = host.vars.parent_zone.

Remember this only works upwards not downwards in the tree of masters and satellites. :slight_smile:

1 Like

Ahhh… So just using

apply Service “PING” {

zone = <some_parent_zone_name>

}

?
Yeah, should work. I’ll try it and write after test. Many thanks Thomas for pointing me.

Yes, that should do the trick. Just let us know here if it worked out and flag my reply as an solution if you want to be nice. :pray:

As for the feature request - Please comment on github and express your needs over there. From a technical POV, is is rather complicated, still it is worth the discussion and fresh ideas.

Cheers,
Michael

1 Like

Finally, I was able to test this configuration in our configuration. Zone definition in service works for me. @widhalmt, I marked your answer as solution. Thank you very much for help.

Great! I’m happy, it worked out.