Heartbeat Kubernetes Autodiscover

I am trying to have heartbeat deployed in kubernetes as a daemonset in which each heartbeat daemon icmp pings all other nodes in a cluster. I was planning on doing this with the kubernetes autodiscover provider however I have been unsuccessful in getting it to recognize and ping more than just the pod on the same node. Can someone point me at a configuration that the provider recognizes all nodes in a cluster rather than just the node the daemon is running on.

My heartbeat configuration resembles this:

fields:
  site.name: testcluster
fields_under_root: true

heartbeat.config.monitors:
  # Directory + glob pattern to search for configuration files
  path: /usr/share/heartbeat/monitors.d/*.yml
  # If enabled, heartbeat will periodically check the config.monitors path for changes
  reload.enabled: true
  # How often to check for changes
  reload.period: 15s

logging.json: true

heartbeat.autodiscover:
  providers:
    - type: kubernetes
      include_labels: "k8s-app"
      # host: ${NODE_NAME}
      # namespace: test-heartbeat
      templates:
        - condition:
            contains:
              kubernetes.labels.k8s-app: heartbeat
          config:
            - type: icmp
              hosts: ["${data.kubernetes.node.name}"]
              schedule: '*/5 * * * * * *'
              mode: all
              ipv4: true
              timeout: 16s
              wait: 1s

@akrzos apologies for the delay here in replying. It looks like we've merged support for discovering across the entire cluster in 7.6 (which is our upcoming release). You can find the new scope option in our 7.6 docs https://www.elastic.co/guide/en/beats/heartbeat/7.6/configuration-autodiscover.html . So, unless we find something terribly wrong with the code it should be in our 7.6 release.

Thanks @Andrew_Cholakian1 I look forward to trying out heartbeat 7.6 once it is released!

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.