# \[help\]how to write config for multiplication

**URL:** <https://discuss.elastic.co/t/help-how-to-write-config-for-multiplication/246448>\
**Category:** Logstash\
**Created:** [August 26, 2020, 12:04pm UTC](https://discuss.elastic.co/t/help-how-to-write-config-for-multiplication/246448 "2020-08-26T12:04:37Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![manojb1-in.ibm.com](https://avatars.discourse-cdn.com/v4/letter/m/c68b51/32.png) [@manojb1-in.ibm.com](https://discuss.elastic.co/u/manojb1-in.ibm.com)\
**Post date:** [August 26, 2020, 12:04pm UTC](https://discuss.elastic.co/t/help-how-to-write-config-for-multiplication/246448/1 "2020-08-26T12:04:37Z")

</div>

I am writing logstash config for iostat output of aix\_server. sample lines is given Below

> ```
> Disks: xfers read write queue time
> -------------------- -------------------------------- ------------------------------------ ------------------------------------ -------------------------------------- ---------
> %tm bps tps bread bwrtn rps avg min max time fail wps avg min max time fail avg min max avg avg serv
> act serv serv serv outs serv serv serv outs time time time wqsz sqsz qfull
> hdisk5 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0 0 0.0 0.0 0.0 0.0 0 0 0.0 0.0 0.0 0.0 0.0 0.0 13:00:11
> hdisk4 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0 0 0.0 0.0 0.0 0.0 0 0 0.0 0.0 0.0 0.0 0.0 0.0 13:00:11
> hdisk3 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0 0 0.0 0.0 0.0 0.0 0 0 0.0 0.0 0.0 0.0 0.0 0.0 13:00:11
> hdisk2 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0 0 0.0 0.0 0.0 0.0 0 0 0.0 0.0 0.0 0.0 0.0 0.0 13:00:11
> hdisk0 0.2 15.2K 0.0 0.0 15.2K 0.0 0.0 0.0 0.0 0 0 3.1 1.9 0.3 6.3 0 0 0.0 0.0 0.0 0.0 0.0 0.0 13:00:11
> hdisk1 0.0 819.2 0.0 409.6 409.6 0.1 1.0 1.0 1.0 0 0 0.1 0.5 0.5 0.5 0 0 0.0 0.0 0.0 0.0 0.0 0.0 13:00:11
> 
> ```

My requirement is whenever there is the letter "K'( ex: the row starting with hdisk0, there 15.2K ) , i should get the number multiplied by 1024( eg: 15.2x1024).

Could any one help to write the logstash config?

---

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [August 26, 2020, 4:20pm UTC](https://discuss.elastic.co/t/help-how-to-write-config-for-multiplication/246448/2 "2020-08-26T16:20:47Z")

</div>

A [bytes](https://www.elastic.co/guide/en/logstash/current/plugins-filters-bytes.html) filter will help with that.

---

<div class="post-metadata">

**Author:** ![manojb1-in.ibm.com](https://avatars.discourse-cdn.com/v4/letter/m/c68b51/32.png) [@manojb1-in.ibm.com](https://discuss.elastic.co/u/manojb1-in.ibm.com)\
**Post date:** [August 26, 2020, 5:17pm UTC](https://discuss.elastic.co/t/help-how-to-write-config-for-multiplication/246448/3 "2020-08-26T17:17:38Z")

</div>

there is no direct internet available in the server. Downloaded the package of "bytes" and tried to install. But I was getting error

```
/usr/share/logstash/bin/logstash-plugin install file:///app/required_rpms/logstash-filter-bytes-1.0.0.zip
Installing file: /app/required_rpms/logstash-filter-bytes-1.0.0.zip
ERROR: Invalid pack for: file:///app/required_rpms/logstash-filter-bytes-1.0.0.zip, reason: The pack must contains at least one plugin, message: The pack must contains at least one plugin
```

---

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [August 26, 2020, 6:05pm UTC](https://discuss.elastic.co/t/help-how-to-write-config-for-multiplication/246448/4 "2020-08-26T18:05:44Z")

</div>

Did you build the pack yourself following the instructions [here](https://www.elastic.co/guide/en/logstash/current/offline-plugins.html)?

---

<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:** [September 23, 2020, 6:05pm UTC](https://discuss.elastic.co/t/help-how-to-write-config-for-multiplication/246448/5 "2020-09-23T18:05:50Z")

</div>

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