Heartbeat 7.6 autodiscover

I am trying out Heartbeat 7.6 and still can't seem to get the autodiscover to discover nodes. The documentation is difficult to understand at best, can anyone help point me in the right direction?

My config is:

heartbeat.autodiscover:
  providers:
    - type: kubernetes
      host: ${NODE_NAME}
      include_labels:
        - "zone"
      resource: node
      scope: cluster
      templates:
        - condition:
            contains:
              kubernetes.labels.zone: "default"
          config:
            - type: icmp
              hosts: ["${data.host}"]
              schedule: '*/5 * * * * * *'
              mode: all
              ipv4: true
              timeout: 16s
              wait: 1s

# logging.json: true
logging.level: debug

output.file:
  path: "/usr/share/heartbeat/data"
  filename: heartbeat
  rotate_every_kb: 10000
  number_of_files: 5

I don't understand why all the nodes with label zone=default are not getting discovered and then added as an icmp ping target.

Can you share your debug logs? I'm also wondering if the k8's label condition is correct for your environment.

The debug logs are very verbose, is there something I can search for to help sort that out?

Maybe this short log snippet is helpful?

|2020-02-25T04:15:39.488Z|DEBUG|[autodiscover.node]|kubernetes/node.go:147|Generated builder event map[host: kubernetes:{"annotations":{"kubevirt":{"io/heartbeat":"2019-08-19T20:30:33Z"},"node":{"openshift":{"io/md5sum":"440b35ef364123f2a0073e68b53c3e2b"}},"volumes":{"kubernetes":{"io/controller-managed-attach-detach":"true"}}},"node":{"labels":{"zone":"default"},"name":"xxxxxxxxxxxxxxxxxxxxxxxx","uid":"c7f665cf-03b7-11e9-9f9c-001a4aa8658c"}}]|
|---|---|---|---|---|
|2020-02-25T04:15:39.488Z|DEBUG|[bus]|bus/bus.go:83|heartbeat: map[config:[] host: id:c7f665cf-03b7-11e9-9f9c-001a4aa8658c kubernetes:{"annotations":{"kubevirt":{"io/heartbeat":"2019-08-19T20:30:33Z"},"node":{"openshift":{"io/md5sum":"440b35ef364123f2a0073e68b53c3e2b"}},"volumes":{"kubernetes":{"io/controller-managed-attach-detach":"true"}}},"node":{"labels":{"zone":"default"},"name":"xxxxxxxxxxxxxxxxxxxxxxxx","uid":"c7f665cf-03b7-11e9-9f9c-001a4aa8658c"}} meta:{"kubernetes":{"node":{"labels":{"zone":"default"},"name":"xxxxxxxxxxxxxxxxxxxxxxxx","uid":"c7f665cf-03b7-11e9-9f9c-001a4aa8658c"}}} provider:5d554521-b025-4b6f-9fd5-e3d1d7767b75 stop:true]|
|2020-02-25T04:15:39.488Z|DEBUG|[autodiscover]|autodiscover/autodiscover.go:229|Got a stop event: map[config:[] host: id:c7f665cf-03b7-11e9-9f9c-001a4aa8658c kubernetes:{"annotations":{"kubevirt":{"io/heartbeat":"2019-08-19T20:30:33Z"},"node":{"openshift":{"io/md5sum":"440b35ef364123f2a0073e68b53c3e2b"}},"volumes":{"kubernetes":{"io/controller-managed-attach-detach":"true"}}},"node":{"labels":{"zone":"default"},"name":"xxxxxxxxxxxxxxxxxxxxxxxx","uid":"c7f665cf-03b7-11e9-9f9c-001a4aa8658c"}} meta:{"kubernetes":{"node":{"labels":{"zone":"default"},"name":"xxxxxxxxxxxxxxxxxxxxxxxx","uid":"c7f665cf-03b7-11e9-9f9c-001a4aa8658c"}}} provider:5d554521-b025-4b6f-9fd5-e3d1d7767b75 stop:true]|

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