Processes filtering


(Alberto Gonzalez) #1

I am trying to filter processes to just get postgress and httpd process and tried several way but didnt work.

I am trying this and it doesnt work and collect everything:

  • process
    processes: ['postgres|httpd']

What is the way to just collect all postgres and http process, from sample ps -ef:

postgres 4316 4254 0 Jan11 ? 00:00:00 postgres: logger process
postgres 4323 4254 0 Jan11 ? 00:00:01 postgres: checkpointer process
postgres 4324 4254 0 Jan11 ? 00:00:01 postgres: writer process
postgres 4325 4254 0 Jan11 ? 00:00:00 postgres: wal writer process
postgres 10384 4254 0 Jan11 ? 00:00:05 postgres: postgres bpdb [local] idle
postgres 10402 4254 0 Jan11 ? 00:00:00 postgres: postgres bpdb [local] idle
postgres 10405 4254 0 Jan11 ? 00:00:05 postgres: postgres bpdb [local] idle
postgres 14648 4254 0 Jan13 ? 00:00:00 postgres: postgres bpdb [local] idle
postgres 14657 4254 0 Jan13 ? 00:00:01 postgres: postgres bpdb [local] idle
postgres 17246 4254 0 Jan11 ? 00:00:00 postgres: postgres bpdb [local] idle


(Andrew Kroh) #2

Try using:

metricbeat.modules:
- module: system
  metricsets: [process]
  processes: ['^postgres$', '^httpd$']

(Alberto Gonzalez) #3

Thanks that worked!


(system) #4

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