Specified Command_Endpoint on a Service via Icinga Director

Hello all,

I am running my Icinga with various Icinga satellites. The satellites are in different VLANs. Everything configured via Icinga Director. The following situation:

In the VLAN server is located: Icinga master and the server to be monitored.
In the VLAN OOB are basically all IPMIs and also a matching Icinga satellite

I have attached a service “IPMI” to the server. This service should monitor the IPMI of the server, for the IPMI itself there is no host object. I can reach it via “IPMI-Check -H ipmi-$host.name$”. Of course there is a matching DNS entry. The check itself also works if you run it on the console from the satellite.

But if I now attach the service IPMI to the server, then this service is also in the zone of the VLAN Icinga master/server. The check endpoint is Icinga master. This service is not allowed to be in the OOB network. So now I should have changed the CheckEndpoint to the satellite in the VLAN OOB. Unfortunately I can’t find a way to give a service a different check endpoint.

I have created the variable command_endpoint and assigned it to the service Apply. If I display the config in the director it looks like this:

apply Service "IPMI Sensor" {
    check_command = "ipmi-sensor" { max_check_attempts
    max_check_attempts = "5" { check_interval = 15m
    check_interval = 15m
    retry_interval = 30s

    assign where "IPMI" in host.templates
    vars.command_endpoint = "icinga2-oob"
    import DirectorOverrideTemplate
}

But the check is still executed on the icinga-master endpoint.

Does anyone have a tip for me?

You need to remove vars. in front of command_endpoint.

Sounds logic, but how I can do this with Icinga Director??

the director has hardcoded host.name, hence, you need a propriate host object.

Hi,

thanks for your reply! On the one side I am sad to read this, but on the other side I am happy, because I was not to stupid to find that :wink:

Hi, I have the same problem but I don’t understand your solution :smiley: How does this information about host.name help to solve that problem ? Am I missing something ?

It does not really solved my problem directly. I created new host-objects for all IPMIs too.

1 Like

We solved it by designing a “polling” VLAN that has access to all other VLANs, including the server VLAN and the OOB IPMI VLAN. We have placed our satellites in the polling VLAN. This way he only need 1 host object for both server and IPMI.