# Field reference sprintf example

**URL:** https://discuss.elastic.co/t/field-reference-sprintf-example/46808
**Category:** Logstash
**Created:** [April 8, 2016, 1:15pm UTC](https://discuss.elastic.co/t/field-reference-sprintf-example/46808 "2016-04-08T13:15:37Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![landro](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/landro/32/9001_2.png) [@landro](https://discuss.elastic.co/u/landro)
#### Post date: [April 8, 2016, 1:15pm UTC](https://discuss.elastic.co/t/field-reference-sprintf-example/46808/1 "2016-04-08T13:15:37Z")

</div>

Hi there,

I'm currently using the http output plugin to send notifications to a monitoring solution whenever topbeat signals disk usage \> some percentage.

I reference the field like so: %{[fs][used\_p]}, but then the monitoring app sees the percentage like

0.34E0

and similar.

I need it to be

0.34

How cant I achieve this using the sprintf syntax? I have found no examples in the docs, so I fell kinda lost

---

<div class="post-metadata">

### Author: ![magnusbaeck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/magnusbaeck/32/44943_2.png) [@magnusbaeck](https://discuss.elastic.co/u/magnusbaeck)
#### Post date: [April 8, 2016, 2:47pm UTC](https://discuss.elastic.co/t/field-reference-sprintf-example/46808/2 "2016-04-08T14:47:46Z")

</div>

I don't think this is possible without using a ruby filter to format the float into a custom string field and use that later on.

---

<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: [July 6, 2017, 5:03am UTC](https://discuss.elastic.co/t/field-reference-sprintf-example/46808/3 "2017-07-06T05:03:06Z")

</div>


