How to reduce Metricbeat index file size?

Hi,

How can I reduce the metricbeat index file size as it is taking more storage for per day logs, please help me.

Thanks & regards,
Nitin Bisht

You have two options basically, reduce the metrics you are monitoring or increase the monitoring interval.

Per default metricbeat uses a 10 seconds interval, you could increase it to 15 or higher to reduce the amount of data.

Thanks! @leandrojmp for your reply.
Could you please suggest me how we can reduce the metrics or increase the monitoring interval time.

Thanks! @leandrojmp for your reply.
Could you please suggest me how we can reduce the metrics or increase the monitoring interval time.

It is in the documentation, did you check it?

You would need to edit each module you are using in metricbeat and change the period value to increase it.

Depending on the module you are using you can also remove metricsets that you do not want, for example, the system module you may edit it and leave only metrics about cpu, load and memory.

It is a compromising, or you increase the disk size or you reduce the data you collect, there is not much else to do.

1 Like

Thanks @leandrojmp, your solution is helpful. I have change period 10s to 30s and remove metricsets from metricbeat.yml file which I do not want. Also I have changed period 10s to 30s from all enable module files and observed its behavior for few days. Now, the size of index is half as compared to earlier.

metricbeat.modules:

#-------------------------------- System Module --------------------------------
- module: system
  metricsets:
    - cpu             # CPU usage
    #- load            # CPU load averages
    - memory          # Memory usage
    - network         # Network IO
    - process         # Per process metrics
    - process_summary # Process summary
    - uptime          # System Uptime
    #- socket_summary  # Socket summary
    #- Users
    #- uptime
    #- core           # Per CPU core usage
    #- diskio         # Disk IO
    #- filesystem     # File system usage for each mountpoint
    #- fsstat         # File system summary metrics
    #- raid           # Raid
    #- socket         # Sockets and connection info (linux only)
    #- service        # systemd service information
  enabled: true
  period: 30s
  processes: ['.*']

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