# Metribeat module system output to elasticsearch with incorrect period

**URL:** <https://discuss.elastic.co/t/metribeat-module-system-output-to-elasticsearch-with-incorrect-period/135470>\
**Category:** Beats\
**Tags:** metricbeat\
**Created:** [June 12, 2018, 7:03am UTC](https://discuss.elastic.co/t/metribeat-module-system-output-to-elasticsearch-with-incorrect-period/135470 "2018-06-12T07:03:18Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![geXingW](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/gexingw/32/39113_2.png) [@geXingW](https://discuss.elastic.co/u/geXingW)\
**Post date:** [June 12, 2018, 7:03am UTC](https://discuss.elastic.co/t/metribeat-module-system-output-to-elasticsearch-with-incorrect-period/135470/1 "2018-06-12T07:03:18Z")

</div>

I set my metricbeat system module output to elasticsearch hosts('192.168.2.1:9200', '192.168.2.2:9200') with 5s period.  
But elasticsearch seems save data every ten seconds:

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

Here's my metribeat.yaml:

```
- module: system
  period: 5s
  metricsets: 
    - cpu
    #- load
    - memory
    #- fsstat
    #- network
    #- process
    #- process_summary
    #- core
    #- diskio
    #- socket
  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: 5s
  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

```

Is ther any way to fix it? Thank you for your help.

---

<div class="post-metadata">

**Author:** ![kvch](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kvch/32/72058_2.png) [@kvch](https://discuss.elastic.co/u/kvch)\
**Post date:** [June 12, 2018, 8:09am UTC](https://discuss.elastic.co/t/metribeat-module-system-output-to-elasticsearch-with-incorrect-period/135470/2 "2018-06-12T08:09:13Z")

</div>

Could you please share your full config as text formatted using `</>`?

---

<div class="post-metadata">

**Author:** ![geXingW](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/gexingw/32/39113_2.png) [@geXingW](https://discuss.elastic.co/u/geXingW)\
**Post date:** [June 12, 2018, 8:47am UTC](https://discuss.elastic.co/t/metribeat-module-system-output-to-elasticsearch-with-incorrect-period/135470/3 "2018-06-12T08:47:58Z")

</div>

Sorry for that. Here is the **metricbeat.yml** content:

```
#========================== Modules configuration ============================

metricbeat.config.modules:
  # Glob pattern for configuration loading
  path: ${path.config}/modules.d/system.yml

  # Set to true to enable config reloading
  reload.enabled: false

  # Period on which files under path should be checked for changes
  #reload.period: 10s

  #- module: system
  # metricsets:
  # - cpu 
  # enabled: true
  # period: 1s

#==================== Elasticsearch template setting ==========================

setup.template.settings:
  index.number_of_shards: 1
  index.codec: best_compression
  #_source.enabled: false

setup.template.name: "metricbeat"
setup.template.pattern: "metricbeat-*"

#================================ General =====================================

# The name of the shipper that publishes the network data. It can be used to group
# all the transactions sent by a single shipper in the web interface.
#name:

# The tags of the shipper are included in their own field with each
# transaction published.
#tags: ["service-X", "web-tier"]

# Optional fields that you can specify to add additional information to the
# output.
#fields:
# env: staging
#output.elasticsearch:
# host: ["http://localhost:9200"]
# index: "metricbeat-test-{+yyyy.MM.dd}"

#================================ Outputs =====================================

#================================ Process =====================================
processors:
  - drop_fields:
      fields: []

# Configure what output to use when sending the data collected by the beat.

#-------------------------- Elasticsearch output ------------------------------
output.elasticsearch:
  # Array of hosts to connect to.
  hosts: ["192.168.2.1:9200", "192.168.2.2:9200"]
  index: "metricbeat-%{[beat.version]}-%{+yyyy.MM.dd}"  

  # Optional protocol and basic auth credentials.
  #protocol: "https"
  #username: "elastic"
  #password: "changeme"

```

**${path.config}** located at **./modules.d**. And here is **${path.config}/modules.d/system.yml** content:

```
- module: system
  period: 5s
  metricsets: 
    - cpu
    - memory
  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: 5s
  metricsets:
    - fsstat
  processors:
    - drop_event.when.regexp:
       system.filesystem.mount_point: '^/(sys|cgroup|proc|dev|etc|host|lib)($|/)'

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

```

Metribeat version is '6.2.4', I installed metribeat on ubuntu 16 server by apt-get command.

Thank you for your help!

---

<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 10, 2018, 8:57am UTC](https://discuss.elastic.co/t/metribeat-module-system-output-to-elasticsearch-with-incorrect-period/135470/4 "2018-07-10T08:57:15Z")

</div>

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