# Processes filtering

**URL:** <https://discuss.elastic.co/t/processes-filtering/71776>\
**Category:** Beats\
**Tags:** metricbeat\
**Created:** [January 16, 2017, 7:08pm UTC](https://discuss.elastic.co/t/processes-filtering/71776 "2017-01-16T19:08:07Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![agonzalez](https://avatars.discourse-cdn.com/v4/letter/a/ba8739/32.png) [@agonzalez](https://discuss.elastic.co/u/agonzalez)\
**Post date:** [January 16, 2017, 7:08pm UTC](https://discuss.elastic.co/t/processes-filtering/71776/1 "2017-01-16T19:08:07Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![andrewkroh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/andrewkroh/32/3784_2.png) [@andrewkroh](https://discuss.elastic.co/u/andrewkroh)\
**Post date:** [January 16, 2017, 11:24pm UTC](https://discuss.elastic.co/t/processes-filtering/71776/2 "2017-01-16T23:24:34Z")

</div>

Try using:

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

```

---

<div class="post-metadata">

**Author:** ![agonzalez](https://avatars.discourse-cdn.com/v4/letter/a/ba8739/32.png) [@agonzalez](https://discuss.elastic.co/u/agonzalez)\
**Post date:** [January 16, 2017, 11:49pm UTC](https://discuss.elastic.co/t/processes-filtering/71776/3 "2017-01-16T23:49:26Z")

</div>

> [@andrewkroh](#):
>
> processes: ['^postgres$', '^httpd$']

Thanks that worked!

---

<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:** [February 13, 2017, 11:49pm UTC](https://discuss.elastic.co/t/processes-filtering/71776/4 "2017-02-13T23:49:30Z")

</div>

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