Has anyone succeeded to filter out metricbeat events with metricbeat-5.0.0-rc1-x86_64.rpm? What I try to do is to get the memory and CPU load statistics only from few selected processes. How ever, I am not able to get the filters to work as expected.
I was not able to do this with 'processes' field where I tried syntax variations like processes: ['kafka.|zookeeper.']. I was also not sure to what process fields this maps. Then I tried to create inverted regexp match with drop_event but I was not able to get the basic filtering out of an event to work with example /1/.
Has anyone created a filter with rc1 that enables getting CPU and memory only from selected processes?
Is it possible to create inverted drop filter based regexp on on different keys like /2/? Some processes are running with specific user and some of them are running as root which requires using different fields to filter the data.
The optimization that I am trying to do is that I have only a single node Elasticsearch to store measurements but multiple nodes that produce the data. The amount of events gets pretty large with default configuration if there are start to get more than 10 nodes that produce the data.
Thanks.
/1/
-
module: system
metricsets:CPU stats
- cpu
System Load stats
- load
Per CPU core stats
#- core
IO stats
- diskio
Per filesystem stats
- filesystem
File system summary stats
- fsstat
Memory stats
- memory
Network stats
- network
Per process stats
- process
enabled: true
period: 10s
processes: ['.*']
processors: - drop_event:
when:
regexp:
system.process.username: 'nerve'
/2/
processors:
- drop_event:
when:
regexp:
system.process.username: '^nerve|^synapse'
system.process.cmdline: '(^.synapse.)|(^.nerve.)'