Beats: System module - Strange behavior when disabled metricsets will still collect metrics

Created on 19 Oct 2020  路  10Comments  路  Source: elastic/beats

Events from other metricsets coming in although they have been disabled.

  • when I run the cpu metricset even though I disable process and network in the system.yml config file metricset they are still running.
    Example config:
- module: system
  period: 10s
  metricsets:
    - cpu
    #- load
    #- memory
    #- network
    #- process
    #- process_summary
    #- socket_summary
    #- entropy
    #- core
    #- diskio
    #- socket
    #- service
    #- users
  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|snap)($|/)'

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

#- module: system
#  period: 5m
#  metricsets:
#    - raid
#  raid.mount_point: '/'
  • same I run the memory metricset then process_summary and socket_summary events are also coming in, this behavior happens with the others also.

Windows 10, 64 bit

Services bug v7.10.0

All 10 comments

Pinging @elastic/integrations-platforms (Team:Platforms)

Pinging @elastic/integrations-services (Team:Services)

Honestly not sure what's going on here. I'm able to reproduce this on linux as well. Starting up with the exact config posted above, I see this:

2020-10-19T12:27:15.022-0700    DEBUG   [module]        module/wrapper.go:127   Starting Wrapper[name=system, len(metricSetWrappers)=1]
2020-10-19T12:27:15.023-0700    DEBUG   [module]        module/wrapper.go:189   Starting metricSetWrapper[module=system, name=cpu, host=]

Which looks correct, and then this shortly after:

2020-10-19T12:27:15.034-0700    DEBUG   [reload]        cfgfile/list.go:105     Starting runner: RunnerGroup{system [metricsets=1], system [metricsets=1], s
ystem [metricsets=1], system [metricsets=1], system [metricsets=1], system [metricsets=1], system [metricsets=1], system [metricsets=1]}
2020-10-19T12:27:15.034-0700    DEBUG   [module]        module/wrapper.go:127   Starting Wrapper[name=system, len(metricSetWrappers)=1]
2020-10-19T12:27:15.035-0700    DEBUG   [module]        module/wrapper.go:127   Starting Wrapper[name=system, len(metricSetWrappers)=1]
2020-10-19T12:27:15.035-0700    DEBUG   [module]        module/wrapper.go:127   Starting Wrapper[name=system, len(metricSetWrappers)=1]
2020-10-19T12:27:15.035-0700    DEBUG   [module]        module/wrapper.go:189   Starting metricSetWrapper[module=system, name=socket_summary, host=]
2020-10-19T12:27:15.035-0700    DEBUG   [module]        module/wrapper.go:127   Starting Wrapper[name=system, len(metricSetWrappers)=1]
2020-10-19T12:27:15.035-0700    DEBUG   [module]        module/wrapper.go:127   Starting Wrapper[name=system, len(metricSetWrappers)=1]
2020-10-19T12:27:15.035-0700    DEBUG   [module]        module/wrapper.go:127   Starting Wrapper[name=system, len(metricSetWrappers)=1]
2020-10-19T12:27:15.035-0700    DEBUG   [module]        module/wrapper.go:127   Starting Wrapper[name=system, len(metricSetWrappers)=1]
2020-10-19T12:27:15.035-0700    DEBUG   [module]        module/wrapper.go:189   Starting metricSetWrapper[module=system, name=network, host=]
2020-10-19T12:27:15.035-0700    DEBUG   [module]        module/wrapper.go:189   Starting metricSetWrapper[module=system, name=process_summary, host=]
2020-10-19T12:27:15.035-0700    DEBUG   [module]        module/wrapper.go:189   Starting metricSetWrapper[module=system, name=load, host=]

@narph can you post the rest of the metricbeat.yml config?

Looks like a few people have tested this on master, and it's fine. This is something on 7.10 BC2.

This is some kind of formatting or logic issue that's not exclusive to 7.10. This config works just fine:

- module: system
  period: 10s
  metricsets:
    - cpu
    #- load
    #- memory
    #- network
    #- process
    #- process_summary
    #- socket_summary
    #- entropy
    #- core
    #- diskio
    #- socket
    #- service
    #- users
  process.include_top_n:
    by_cpu: 5      # include top 5 processes by CPU
    by_memory: 5   # include top 5 processes by memory

Was able to reproduce this on 7.9 as well.

Okay, figured it out, it doesn't like this:

- module: system
  period: 1m
  metricsets:
    #- filesystem
    #- fsstat
  processors:
  - drop_event.when.regexp:
      system.filesystem.mount_point: '^/(sys|cgroup|proc|dev|etc|host|lib|snap)($|/)'

It treats that as a config with no metricset, hence it reverts to defaults.

Yes, same on macbook. It's the metricsets part that's causing the issue:

metricsets:
    #- filesystem
    #- fsstat

I tried with commenting out the processors and that didn't help.

I have used the default metricbeat.yml file and only enabled debug logging.

@fearful-symmetry , it makes sense , I did not reproduce this on Linux because I have not disabled fsstat or filesystem. Will close the issue, seems like expected behavior.

Was this page helpful?
0 / 5 - 0 ratings