# Drop\_event equals condition does not work on floats

**URL:** <https://discuss.elastic.co/t/drop-event-equals-condition-does-not-work-on-floats/82433>\
**Category:** Beats\
**Created:** [April 14, 2017, 5:21pm UTC](https://discuss.elastic.co/t/drop-event-equals-condition-does-not-work-on-floats/82433 "2017-04-14T17:21:25Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Darien\_Rrushi](https://avatars.discourse-cdn.com/v4/letter/d/6f9a4e/32.png) [@Darien\_Rrushi](https://discuss.elastic.co/u/Darien_Rrushi)\
**Post date:** [April 14, 2017, 5:21pm UTC](https://discuss.elastic.co/t/drop-event-equals-condition-does-not-work-on-floats/82433/1 "2017-04-14T17:21:25Z")

</div>

In using the metricbeat with the system module, I'm trying to drop process events where certain conditions are true. I have configured my yml file with the below processor and the configuration tests ok. However the events are still output to my kafka broker. What am I doing wrong?

```auto

#========================== Modules configuration ============================
metricbeat.modules:

#------------------------------- System Module -------------------------------
- module: system
  metricsets:
    - 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==============

processors:
  - drop_event:
          when:
           and:
            - equals:
                 system.process.cpu.total.pct: 0
            - equals:
                 system.process.memory.rss.bytes: 0

#================================ Outputs =====================================

# Configure what outputs to use when sending the data collected by the beat.
# Multiple outputs may be used.
output.kafka:
  hosts: ["my_host@port"]
  topic: 'metricbeat'
  partition.round_robin:
    reachable_only: false
  version: "0.10.0.0"

#================================ Logging =====================================

# Sets log level. The default log level is error.
# Available log levels are: critical, error, warning, info, debug
#logging.level: debug

# At debug level, you can selectively enable logging only for some components.
# To enable all selectors use ["*"]. Examples of other selectors are "beat",
# "publish", "service".
logging.selectors: ["*"]
logging.level: debug
logging.files:
  path: /var/log/mybeat

```

---

<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:** [April 14, 2017, 6:47pm UTC](https://discuss.elastic.co/t/drop-event-equals-condition-does-not-work-on-floats/82433/2 "2017-04-14T18:47:03Z")

</div>

Based on the docs, [equals](https://www.elastic.co/guide/en/beats/metricbeat/current/configuration-processors.html#condition-equals) works on integers and strings. But the `pct` is a float inside of metricbeat. Could you try:

```auto
processors:
  - drop_event:
          when:
           and:
            - range:
                 system.process.cpu.total.pct:
                   lte: 0.0
            - equals:
                 system.process.memory.rss.bytes: 0

```

---

<div class="post-metadata">

**Author:** ![Darien\_Rrushi](https://avatars.discourse-cdn.com/v4/letter/d/6f9a4e/32.png) [@Darien\_Rrushi](https://discuss.elastic.co/u/Darien_Rrushi)\
**Post date:** [April 14, 2017, 7:11pm UTC](https://discuss.elastic.co/t/drop-event-equals-condition-does-not-work-on-floats/82433/3 "2017-04-14T19:11:32Z")

</div>

Thank you Andrew! That works.  
Perhaps this level of detail can be included in the Processor section?

---

<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:** [May 5, 2017, 5:30pm UTC](https://discuss.elastic.co/t/drop-event-equals-condition-does-not-work-on-floats/82433/4 "2017-05-05T17:30:44Z")

</div>

This topic was automatically closed after 21 days. New replies are no longer allowed.
