Disk IO not configured properly

Hello Team,

I'm trying to add disk IO to metricbeat in system.yml. I'm using AWS EC2. The only option that is causing the problem is DiskIO, when I comment it, metricbeat starts.

Here is my config:

- module: system
  period: 10s
  metricsets:
    - cpu
    - load
    - memory
    - network
    - process
    - process_summary
    #- core
    - diskio:
        include_devices: ["nvme1n1","nvme0n1","nvme2n1p1"]
    #- socket
  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)($|/)'

- module: system
  period: 15m
  metricsets:
    - uptime

Please help me out here. Please give the exact change that I need to make as I'm new to this.

Regards,
Ash.

Could you share your log file when you start with diskio enabled?

Hello Ruflin,

Here is my metricbeat log:

2019-02-14T13:41:24.714+0530    INFO    [monitoring]    log/log.go:152  Total non-zero metrics  {"monitoring": {"metrics": {"beat":{"cpu":{"system":{"ticks":20,"time":{"ms":22}},"total":{"ticks":50,"time":{"ms":53},"value":0},"user":{"ticks":30,"time":{"ms":31}}},"handles":{"limit":{"hard":4096,"soft":1024},"open":6},"info":{"ephemeral_id":"f4a78969-e67b-4648-b2cb-1589d259f91c","uptime":{"ms":28}},"memstats":{"gc_next":6289520,"memory_alloc":3980112,"memory_total":9612248,"rss":36241408}},"libbeat":{"config":{"module":{"running":0}},"output":{"type":"elasticsearch"},"pipeline":{"clients":0,"events":{"active":0}}},"system":{"cpu":{"cores":8},"load":{"1":0.72,"15":0.85,"5":0.87,"norm":{"1":0.09,"15":0.1063,"5":0.1088}}}}}}
2019-02-14T13:41:24.714+0530    INFO    [monitoring]    log/log.go:153  Uptime: 31.008117ms
2019-02-14T13:41:24.714+0530    INFO    [monitoring]    log/log.go:130  Stopping metrics logging.
2019-02-14T13:41:24.714+0530    INFO    instance/beat.go:410    metricbeat stopped.
2019-02-14T13:41:24.716+0530    ERROR   instance/beat.go:800    Exiting: 1 error: can not convert 'object' into 'string' accessing '0.metricsets.6' (source:'/etc/metricbeat/modules.d/system.yml')

I hope this helps, I'm sure there is some other way around this.

Regards,
Ash.

Hello Ruflin,

I figured it out. Using the command metricbeat test modules, it gave me an error:

Error getting metricbeat modules: error loading config files: invalid config: yaml: line 14: mapping values are not allowed in this context

So, I commented the diskio in that section and created a new one, here is my new system.yml:

# Module: system
# Docs: https://www.elastic.co/guide/en/beats/metricbeat/6.5/metricbeat-module-system.html

- module: system
  period: 10s
  metricsets:
    - cpu
    - load
    - memory
    - network
    - process
    - process_summary
    #- core
    #- diskio
    #    include_devices: nvme1n1
    #- socket
  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)($|/)'

- module: system
  period: 15m
  metricsets:
    - uptime
    #- diskio
     
- module: system
  metricsets: ["diskio"]
  diskio.include_devices: ["nvme0n1", "nvme1n1","nvme2n1"]

Regards,
Ash.

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