3

I have the following basic metricbeats config

metricbeat.modules:
- module: system
  metricsets:
    - cpu
    - filesystem
    - memory
    - network
    - process
  enabled: true
  period: 10s
  processes: ['.*']
  cpu_ticks: false

Now I want to monitor only a specific process with process id (pid) = 27056. I know that I have to do some modifications under the "processes" field of the above config file. Can any please help on how to proceed further?

Arun Mohan
  • 898
  • 3
  • 18
  • 37
  • Does the process name changes dynamically each time the process starts? if not you can add your process name in the field processes:['your_process_name'] – Ram Aug 15 '17 at 18:36

1 Answers1

6

You can monitor the processes which match any of a list of expressions you pass. For example, this reports on all processes running with nginx, java or python in the command line.

 processes: ['nginx','java', 'python']
David Hall
  • 341
  • 2
  • 8
  • Sorry, I see that I'm not addressing your desire to monitor a single pid. But, keep in mind, the pid will change whenever the process restarts or host is rebooted. So, you're better off determining how to find the process of interest with some kind of expression. – David Hall Sep 18 '17 at 06:04