Monitor kubernetes ingress resources with elastic heartbeat

1/25/2020

Is there any way to configure elastic heartbeat to automatically detect the ingress resources in a cluster and run a simple health-check against each of them ?

Otherwise, what would be a simple alternative to that ? Like an operator that subscribes to Ingress resources events and for each of the active Ingress resources run a GET on a preconfigured health-check endpoint.

-- Laurentiu Soica
elastic-beats
elasticsearch
kubernetes

1 Answer

1/26/2020

Ok, based on the current heartbeat (actually common for all beats) codebase, I assume there is not.

    switch config.Resource {
case "pod":
    p.eventer, err = NewPodEventer(uuid, c, client, p.publish)
case "node":
    p.eventer, err = NewNodeEventer(uuid, c, client, p.publish)
case "service":
    p.eventer, err = NewServiceEventer(uuid, c, client, p.publish)
default:
    return nil, fmt.Errorf("unsupported autodiscover resource %s", config.Resource)
}
-- Laurentiu Soica
Source: StackOverflow