# ECK Metricbeat running as deamonset not showind data for field/value metricset.name : "process"

**URL:** https://discuss.elastic.co/t/eck-metricbeat-running-as-deamonset-not-showind-data-for-field-value-metricset-name-process/336282
**Category:** Elastic Cloud on Kubernetes (ECK)
**Tags:** docker
**Created:** [June 17, 2023, 4:38pm UTC](https://discuss.elastic.co/t/eck-metricbeat-running-as-deamonset-not-showind-data-for-field-value-metricset-name-process/336282 "2023-06-17T16:38:25Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![Carlos\_T](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/carlos_t/32/97624_2.png) [@Carlos\_T](https://discuss.elastic.co/u/Carlos_T)
#### Post date: [June 17, 2023, 4:38pm UTC](https://discuss.elastic.co/t/eck-metricbeat-running-as-deamonset-not-showind-data-for-field-value-metricset-name-process/336282/1 "2023-06-17T16:38:26Z")

</div>

Hi all

I've install a ECK cluster in a 5 workers nodes K8s.  
In the deployment I used a Metricbeat runs as DaemonSet for each worker node.

 ![imagen](https://us1.discourse-cdn.com/elastic/original/3X/1/1/112015e14a5ead8d7a6e42aa0f343efb39612ecb.png)

The problem Im having is that I'm not getting any document with information about the field/value metricset.name : "process".  
I don't know why as 'process' has been included in my metricsets list.  
This is how I set it:

```auto
apiVersion: beat.k8s.elastic.co/v1beta1
kind: Beat
metadata:
  name: metricbeat
spec:
  type: metricbeat
  version: 8.6.2
  elasticsearchRef:
    name: elasticsearch
  kibanaRef:
    name: kibana
  config:
    metricbeat:
      autodiscover:
        providers:
        - hints:
            default_config: {}
            enabled: "true"
          node: ${NODE_NAME}
          type: kubernetes
      modules:
      - module: system
        period: 10s
        metricsets:
        - cpu
        - load
        - memory
        - network
        - process
        - process_summary
        process:
          include_top_n:
            by_cpu: 5
            by_memory: 5
        processes:
        - .*
      - module: system
        period: 1m
        metricsets:
        - filesystem
        - fsstat
        - uptime
        processors:
        - drop_event:
            when:
              regexp:
                system:
                  filesystem:
                    mount_point: ^/(sys|cgroup|proc|dev|etc|host|lib)($|/)
      - module: kubernetes
        period: 10s
        node: ${NODE_NAME}
        hosts:
        - https://${NODE_NAME}:10250
        bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token
        ssl:
          verification_mode: none
        metricsets:
        - node
        - system
        - pod
        - container
        - volume
    processors:
    - add_cloud_metadata: {}
    - add_host_metadata: {}
    - add_fields:
        fields:
          cliente: "MiCliente"
  daemonSet:
    podTemplate:
      spec:
        serviceAccountName: metricbeat
        automountServiceAccountToken: true # some older Beat versions are depending on this settings presence in k8s context
        containers:
        - args:
          - -e
          - -c
          - /etc/beat.yml
          - -system.hostfs=/hostfs
          name: metricbeat
          volumeMounts:
          - mountPath: /hostfs/sys/fs/cgroup
            name: cgroup
          - mountPath: /var/run/docker.sock
            name: dockersock
          - mountPath: /hostfs/proc
            name: proc
          env:
          - name: NODE_NAME
            valueFrom:
              fieldRef:
                fieldPath: spec.nodeName
        dnsPolicy: ClusterFirstWithHostNet
        hostNetwork: true # Allows to provide richer host metadata
        securityContext:
          runAsUser: 0
        terminationGracePeriodSeconds: 30
        volumes:
        - hostPath:
            path: /sys/fs/cgroup
          name: cgroup
        - hostPath:
            path: /var/run/docker.sock
          name: dockersock
        - hostPath:
            path: /proc
          name: proc

```

The thing im not having any data for the metricset.name : "process"

 ![imagen](https://us1.discourse-cdn.com/elastic/original/3X/f/f/ff20902a279b0493fcd0bb69925ec88efd808c6e.png)

for any of the workers nodes of the clusters. For other onpremise servers it works well and show data, but not for my workers where I have my metricbeat running as deamonset.

Any idea why this is like this?

Thank you very much and regards.

Carlos T

---

<div class="post-metadata">

### Author: ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)
#### Post date: [June 17, 2023, 5:19pm UTC](https://discuss.elastic.co/t/eck-metricbeat-running-as-deamonset-not-showind-data-for-field-value-metricset-name-process/336282/2 "2023-06-17T17:19:16Z")

</div>

perhaps try

` - '.*'`

Single quotes or the documented

` processes: ['.*']`

---

<div class="post-metadata">

### Author: ![Carlos\_T](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/carlos_t/32/97624_2.png) [@Carlos\_T](https://discuss.elastic.co/u/Carlos_T)
#### Post date: [June 18, 2023, 10:05am UTC](https://discuss.elastic.co/t/eck-metricbeat-running-as-deamonset-not-showind-data-for-field-value-metricset-name-process/336282/3 "2023-06-18T10:05:18Z")

</div>

Hi Stephen. Thank you for the fast answer.

I've tried both ways without success.

Anyway I've got an other environment with k3s where I will try the same config to get more conclutions.

Just so everybody has more info I get here the whole metricbeat config. Maybe I didnt provide something I didnt consider important:

```auto
---
apiVersion: beat.k8s.elastic.co/v1beta1
kind: Beat
metadata:
  name: metricbeat
spec:
  type: metricbeat
  version: 8.6.2
  elasticsearchRef:
    name: elasticsearch
  kibanaRef:
    name: kibana
  config:
    metricbeat:
      autodiscover:
        providers:
        - hints:
            default_config: {}
            enabled: "true"
          node: ${NODE_NAME}
          type: kubernetes
      modules:
      - module: system
        period: 10s
        metricsets:
        - cpu
        - load
        - memory
        - network
        - process
        - process_summary
        processes: ['.*']
        process:
          include_top_n:
            by_cpu: 5
            by_memory: 5
      - module: system
        period: 1m
        metricsets:
        - filesystem
        - fsstat
        - uptime
        processors:
        - drop_event:
            when:
              regexp:
                system:
                  filesystem:
                    mount_point: ^/(sys|cgroup|proc|dev|etc|host|lib)($|/)
      - module: kubernetes
        period: 10s
        node: ${NODE_NAME}
        hosts:
        - https://${NODE_NAME}:10250
        bearer_token_file: /var/run/secrets/kubernetes.io/serviceaccount/token
        ssl:
          verification_mode: none
        metricsets:
        - node
        - system
        - pod
        - container
        - volume
    processors:
    - add_cloud_metadata: {}
    - add_host_metadata: {}
    - add_fields:
        fields:
          cliente: "MyClient"
  daemonSet:
    podTemplate:
      spec:
        serviceAccountName: metricbeat
        automountServiceAccountToken: true # some older Beat versions are depending on this settings presence in k8s context
        containers:
        - args:
          - -e
          - -c
          - /etc/beat.yml
          - -system.hostfs=/hostfs
          name: metricbeat
          volumeMounts:
          - mountPath: /hostfs/sys/fs/cgroup
            name: cgroup
          - mountPath: /var/run/docker.sock
            name: dockersock
          - mountPath: /hostfs/proc
            name: proc
          env:
          - name: NODE_NAME
            valueFrom:
              fieldRef:
                fieldPath: spec.nodeName
        dnsPolicy: ClusterFirstWithHostNet
        hostNetwork: true # Allows to provide richer host metadata
        securityContext:
          runAsUser: 0
        terminationGracePeriodSeconds: 30
        volumes:
        - hostPath:
            path: /sys/fs/cgroup
          name: cgroup
        - hostPath:
            path: /var/run/docker.sock
          name: dockersock
        - hostPath:
            path: /proc
          name: proc
---
# permissions needed for metricbeat
# source: https://www.elastic.co/guide/en/beats/metricbeat/current/metricbeat-module-kubernetes.html
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
  name: metricbeat
rules:
- apiGroups:
  - ""
  resources:
  - nodes
  - namespaces
  - events
  - pods
  verbs:
  - get
  - list
  - watch
- apiGroups:
  - "extensions"
  resources:
  - replicasets
  verbs:
  - get
  - list
  - watch
- apiGroups:
  - apps
  resources:
  - statefulsets
  - deployments
  - replicasets
  verbs:
  - get
  - list
  - watch
- apiGroups:
  - ""
  resources:
  - nodes/stats
  verbs:
  - get
- nonResourceURLs:
  - /metrics
  verbs:
  - get
---
apiVersion: v1
kind: ServiceAccount
metadata:
  name: metricbeat
  namespace: monitoring
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
  name: metricbeat
subjects:
- kind: ServiceAccount
  name: metricbeat
  namespace: monitoring
roleRef:
  kind: ClusterRole
  name: metricbeat
  apiGroup: rbac.authorization.k8s.io

```

Could it be something to do with my kubernetes config?  
Thank you again

---

<div class="post-metadata">

### Author: ![Carlos\_T](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/carlos_t/32/97624_2.png) [@Carlos\_T](https://discuss.elastic.co/u/Carlos_T)
#### Post date: [June 18, 2023, 4:38pm UTC](https://discuss.elastic.co/t/eck-metricbeat-running-as-deamonset-not-showind-data-for-field-value-metricset-name-process/336282/4 "2023-06-18T16:38:09Z")

</div>

Hi all again!

I've just used the same deployment in my house lab environment with k3s as kubernetes cluster with a master and a worker node.

It worked perfectly well. So I guess this is something to do with my cluster's settings. I will ask to my colleagues who installed to check if they have a clue.

Thank you very much all anyway

Thanks a lot Stephen 🙂

Carlos T.

---

<div class="post-metadata">

### Author: ![Sunile\_Manjee](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sunile_manjee/32/111461_2.png) [@Sunile\_Manjee](https://discuss.elastic.co/u/Sunile_Manjee)
#### Post date: [June 22, 2023, 4:14am UTC](https://discuss.elastic.co/t/eck-metricbeat-running-as-deamonset-not-showind-data-for-field-value-metricset-name-process/336282/5 "2023-06-22T04:14:22Z")

</div>

out of pure curiosity, did you enable capturing cluster metrics using elastic k8s integration with ksm?

---

<div class="post-metadata">

### Author: ![Carlos\_T](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/carlos_t/32/97624_2.png) [@Carlos\_T](https://discuss.elastic.co/u/Carlos_T)
#### Post date: [June 27, 2023, 11:54am UTC](https://discuss.elastic.co/t/eck-metricbeat-running-as-deamonset-not-showind-data-for-field-value-metricset-name-process/336282/6 "2023-06-27T11:54:01Z")

</div>

Hi Sunile.

No, I havent enabled that.

Regards.

---

<div class="post-metadata">

### Author: ![Sunile\_Manjee](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/sunile_manjee/32/111461_2.png) [@Sunile\_Manjee](https://discuss.elastic.co/u/Sunile_Manjee)
#### Post date: [June 30, 2023, 3:31am UTC](https://discuss.elastic.co/t/eck-metricbeat-running-as-deamonset-not-showind-data-for-field-value-metricset-name-process/336282/7 "2023-06-30T03:31:21Z")

</div>

My .02 (opinion) if you are trying to fetch host and/or pod level metrics, leverage KSM + Elastic KSM integration.

---

<div class="post-metadata">

### Author: ![Carlos\_T](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/carlos_t/32/97624_2.png) [@Carlos\_T](https://discuss.elastic.co/u/Carlos_T)
#### Post date: [June 30, 2023, 12:24pm UTC](https://discuss.elastic.co/t/eck-metricbeat-running-as-deamonset-not-showind-data-for-field-value-metricset-name-process/336282/8 "2023-06-30T12:24:39Z")

</div>

Not the case, thank you Sunile.  
I've used the options provided in the AllInOne.yaml file found in the samples section of the ECK oficial website.

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [July 28, 2023, 12:24pm UTC](https://discuss.elastic.co/t/eck-metricbeat-running-as-deamonset-not-showind-data-for-field-value-metricset-name-process/336282/9 "2023-07-28T12:24:50Z")

</div>

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