# Filesystem metricset of metricbeat (running in docker ) system module can't get host filesystem statistics

**URL:** <https://discuss.elastic.co/t/filesystem-metricset-of-metricbeat-running-in-docker-system-module-cant-get-host-filesystem-statistics/152987>\
**Category:** Beats\
**Tags:** metricbeat\
**Created:** [October 18, 2018, 11:12am UTC](https://discuss.elastic.co/t/filesystem-metricset-of-metricbeat-running-in-docker-system-module-cant-get-host-filesystem-statistics/152987 "2018-10-18T11:12:38Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jun\_Zhang](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jun_zhang/32/25863_2.png) [@Jun\_Zhang](https://discuss.elastic.co/u/Jun_Zhang)\
**Post date:** [October 18, 2018, 11:12am UTC](https://discuss.elastic.co/t/filesystem-metricset-of-metricbeat-running-in-docker-system-module-cant-get-host-filesystem-statistics/152987/1 "2018-10-18T11:12:39Z")

</div>

My metcibeat yaml is following：

```auto
apiVersion: extensions/v1beta1
kind: DaemonSet
metadata:
  name: metricbeat
  namespace: metricbeat
  labels:
    k8s-app: metricbeat
spec:
  template:
    metadata:
      labels:
        k8s-app: metricbeat
    spec:
      serviceAccountName: metricbeat-new
      terminationGracePeriodSeconds: 30
      hostNetwork: true
      dnsPolicy: ClusterFirstWithHostNet
      containers:
      - name: metricbeat
        image: docker.elastic.co/beats/metricbeat:6.4.1
        args: [
          "-c", "/etc/metricbeat.yml",
          "-e",
          "-system.hostfs=/hostfs",
        ]
        env:
        - name: ELASTICSEARCH_HOST
          value: "172.27.128.69"
        - name: ELASTICSEARCH_PORT
          value: "9200"
        - name: KIBANA_HOST
          value: "http://172.27.128.69:5601"
        - name: NODE_NAME
          valueFrom:
            fieldRef:
              fieldPath: spec.nodeName
        - name: NODE_IP
          valueFrom:
            fieldRef:
              fieldPath: status.podIP
        securityContext:
          runAsUser: 0
        resources:
          limits:
            memory: 1Gi
          requests:
            cpu: 100m
            memory: 1Gi
        volumeMounts:
        - name: config
          mountPath: /etc/metricbeat.yml
          readOnly: true
          subPath: metricbeat.yml
        - name: modules
          mountPath: /usr/share/metricbeat/modules.d
          readOnly: true
        - name: dockersock
          mountPath: /var/run/docker.sock
        - name: proc
          mountPath: /hostfs/proc
          readOnly: true
        - name: cgroup
          mountPath: /hostfs/sys/fs/cgroup
          readOnly: true
        - name: etc
          mountPath: /hostfs/etc
          readOnly: true
      volumes:
      - name: proc
        hostPath:
          path: /proc
      - name: cgroup
        hostPath:
          path: /sys/fs/cgroup
      - name: etc
        hostPath:
          path: /etc
      - name: dockersock
        hostPath:
          path: /var/run/docker.sock
      - name: config
        configMap:
          defaultMode: 0600
          name: metricbeat-daemonset-config
      - name: modules
        configMap:
          defaultMode: 0600
          name: metricbeat-daemonset-modules
      - name: data
        hostPath:
          path: /var/lib/metricbeat-data
          type: DirectoryOrCreate
---
apiVersion: v1
kind: ConfigMap
metadata:
  name: metricbeat-daemonset-modules
  namespace: metricbeat
  labels:
    k8s-app: metricbeat
data:
  system.yml: |-
    - module: system
      period: 30s
      metricsets:
        - cpu
        - load
        - memory
        - network
        - process
        - process_summary
        - core
        - diskio
        - socket
      cpu.metrics: [percentages, normalized_percentages, ticks]
      diskio.include_devices: []
      processes: ['.*']
      process.include_top_n:
        by_cpu: 5 # include top 5 processes by CPU
        by_memory: 5 # include top 5 processes by memory
    - module: system
      period: 1m
      metricsets:
        - filesystem
        - fsstat
      processors:
      - drop_event.when.regexp:
          system.filesystem.mount_point: '^/(sys|cgroup|proc|dev|etc|host|lib)($|/)'

```

However，filesystem metricset can't get host filesystem statistics:

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/6/c/6c496805e62a4ebde81439f3f7f196cc5a31a929.png)

---

<div class="post-metadata">

**Author:** ![exekias](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/exekias/32/28718_2.png) [@exekias](https://discuss.elastic.co/u/exekias)\
**Post date:** [October 22, 2018, 9:03pm UTC](https://discuss.elastic.co/t/filesystem-metricset-of-metricbeat-running-in-docker-system-module-cant-get-host-filesystem-statistics/152987/2 "2018-10-22T21:03:02Z")

</div>

Hi @Jun_Zhang,

This is a current limitation of Metricbeat, can you please open a new enhancement request under [https://github.com/elastic/beats/issues](https://github.com/elastic/beats/issues)?

Best regards

---

<div class="post-metadata">

**Author:** ![Jun\_Zhang](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jun_zhang/32/25863_2.png) [@Jun\_Zhang](https://discuss.elastic.co/u/Jun_Zhang)\
**Post date:** [October 23, 2018, 2:48pm UTC](https://discuss.elastic.co/t/filesystem-metricset-of-metricbeat-running-in-docker-system-module-cant-get-host-filesystem-statistics/152987/3 "2018-10-23T14:48:53Z")

</div>

Done.

> <https://github.com/elastic/beats/issues/8701>

---

<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:** [November 20, 2018, 2:48pm UTC](https://discuss.elastic.co/t/filesystem-metricset-of-metricbeat-running-in-docker-system-module-cant-get-host-filesystem-statistics/152987/4 "2018-11-20T14:48:53Z")

</div>

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