# Logstash and Beat float compare

**URL:** <https://discuss.elastic.co/t/logstash-and-beat-float-compare/205274>\
**Category:** Logstash\
**Created:** [October 25, 2019, 2:00pm UTC](https://discuss.elastic.co/t/logstash-and-beat-float-compare/205274 "2019-10-25T14:00:26Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![odlevakp](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/odlevakp/32/56620_2.png) [@odlevakp](https://discuss.elastic.co/u/odlevakp)\
**Post date:** [October 25, 2019, 2:00pm UTC](https://discuss.elastic.co/t/logstash-and-beat-float-compare/205274/1 "2019-10-25T14:00:27Z")

</div>

I am sending metricbeat data via logstash input into elasticsearch and would like to set up a notification on low disk space.

I tried something like:

```
output {
  if [type] == "beats" and [metricset][name] == "filesystem" and
  [system][filesystem][used][pct] >= 0.5000 and "throttled" not in [tags] {
    #
    # Send notification.
    #
  }
}

```

But I am getting an error:

```
ClassCastException: class org.jruby.RubyFloat cannot be cast to class java.lang.Long
(org.jruby.RubyFloat is in unnamed module of loader 'app'; java.lang.Long 
is in module java.base of loader 'bootstrap'),

```

Is there an elegant way to trigger based on beat disk usage `[system][filesystem][used][pct]`?

---

<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:** [November 22, 2019, 2:00pm UTC](https://discuss.elastic.co/t/logstash-and-beat-float-compare/205274/2 "2019-11-22T14:00:27Z")

</div>

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