How to include metrics for a specific process when using process.include_top_n

Hi,

I have a requirement, where I will need to collect data for top 10 resource consuming processes on the VM along with having to collect resource utilization data for metricbeat. First part was pretty simple, but when it comes to having to include resource utilization data for metricbeat process along with top 10 resource utilizing processes, I haven't been able to come up with a logic on how to do that. Can someone please help throw in any ideas on how I could possibly do this?

for Top 10 processes data, am using below command.

  processes: ['.*']
  process.include_top_n:
    by_cpu: 10      # include top 10 processes by CPU
    by_memory: 10   # include top 10 processes by memory

Appreciate your time and help with this :slight_smile:

Thanks,

Vishnu

How about doing it like this:

metricbeat.modules:
- name: system
  metricsets: [process]
  processes: ['^metricbeat$']
- name: system
  metricsets: [process]
  processes: ['.*']
  process.include_top_n:
    by_cpu: 10
    by_memory: 10

It instantiates two instances of the process metricset.

FYI: In the upcoming 6.2 release we are adding central monitoring for Beats that will give you the resource utilization for each of the Beats as part of X-Pack monitoring. https://www.elastic.co/blog/brewing-in-beats-monitoring-beats-cpu-usage

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