Heartbeat auto discover not working

Hello everyone

I have recently deploy heartbeat 7.16.3 in my k8s cluster and after deployment I am not able see heartbeat.autodiscover config inside pod config yaml but its there in my deployment yaml file.

Can you please tell me its normal behaviour or I am doing something wrong.
How I can enable debugging logs in the pod so that I can see what is my pod is doing ?

My heartbeat deployment yml file

apiVersion: beat.k8s.elastic.co/v1beta1
kind: Beat
metadata:
  name: heartbeat
  labels: 
    app: heartbeat
    release: "heartbeat"
    heritage: Helm
spec:
  type: heartbeat
---
# Source: heartbeat/templates/heartbeat.yaml
apiVersion: beat.k8s.elastic.co/v1beta1
kind: Beat
metadata:
  name: heartbeat
  labels: 
    app: heartbeat
    release: "heartbeat"
    heritage: Helm
spec:
  type: heartbeat
  version: 7.16.3
  elasticsearchRef:
    name: "elasticsearch"
  config:
    heartbeat.autodiscover:
      providers:
        - type: docker
          hints.enabled: true
          templates:
            - condition:
                contains:
                  docker.container.image: receiver-service:1.33.0
              config:
                - type: tcp
                  hosts: ["${data.host}:${data.port}"]
                  schedule: "@every 1s"
                  timeout: 1s
  config:
    heartbeat.monitors:
    - hosts:
      - 172.20.xxx.xxx:9200
      name: Elasticsearch
      schedule: '@every 5s'
      type: tcp

    name: heartbeat-monitoring
    output:
      elasticsearch:
        hosts:
        - ${ELASTICSEARCH_HOST:elasticsearch}:${ELASTICSEARCH_PORT:9200}
        password: ${ELASTICSEARCH_PASSWORD}
        ssl.verification_mode: none
        username: ${ELASTICSEARCH_USERNAME}
  deployment:
    replicas: 1
    podTemplate:
      metadata:
        labels:
          app.kubernetes.io/name: elastic
          app.kubernetes.io/component: heartbeat
      spec:
        dnsPolicy: ClusterFirstWithHostNet
        containers:
        - name: "heartbeat"
          image: "docker-virtual.artifactory.com/eck/heartbeat:7.16.3"

          env:
            - name: ELASTICSEARCH_HOST
              value: https://elasticsearch.svc.cluster.local
            - name: ELASTICSEARCH_PORT
              value: "9200"
            - name: ELASTICSEARCH_USERNAME
              value: admin
            - name: ELASTICSEARCH_PASSWORD
              valueFrom:
                secretKeyRef:
                  key: elastic
                  name: elasticsearch-es-elastic-user
        affinity:
          null
        securityContext:
          runAsUser: 0

Inside the pod I cant see heartbeat.autodiscover config.
#kubectl apply -f heartbeat.yml -n monitoring |grep heartbeat
beat.beat.k8s.elastic.co/heartbeat created
#kubectl get pod -n monitoring |grep heartbeat
heartbeat-beat-heartbeat-7db678967d-jqxdz 1/1 Running 0 25s
exec -it heartbeat-beat-heartbeat-7db678967d-jqxdz -n monitoring -- bash
[root@heartbeat-beat-heartbeat-7db678967d-jqxdz heartbeat]# cat /etc/beat.yml
heartbeat:
monitors:

  • hosts:
    • 172.20.13.116:9200
      name: Elasticsearch
      schedule: '@every 5s'
      type: tcp
      name: heartbeat-monitoring
      output:
      elasticsearch:
      hosts:
    • https://elasticsearch-es-http.monitoring.svc:9200
    • ${ELASTICSEARCH_HOST:elasticsearch}:${ELASTICSEARCH_PORT:9200}
      password: ${ELASTICSEARCH_PASSWORD}
      ssl:
      certificate_authorities:
      • /mnt/elastic-internal/elasticsearch-certs/ca.crt
        verification_mode: none
        username: ${ELASTICSEARCH_USERNAME}

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