# MySQL num\_fields as string?

**URL:** <https://discuss.elastic.co/t/mysql-num-fields-as-string/68722>\
**Category:** Beats\
**Tags:** packetbeat\
**Created:** [December 12, 2016, 2:30pm UTC](https://discuss.elastic.co/t/mysql-num-fields-as-string/68722 "2016-12-12T14:30:29Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![aros](https://avatars.discourse-cdn.com/v4/letter/a/47e85d/32.png) [@aros](https://discuss.elastic.co/u/aros)\
**Post date:** [December 12, 2016, 2:30pm UTC](https://discuss.elastic.co/t/mysql-num-fields-as-string/68722/1 "2016-12-12T14:30:29Z")

</div>

Hi,

I was wondering why the packetbeat template declares mysql.num\_fields and mysql.num\_rows as keywords, as it has number in its name already. I am sure there is an explanation but calculating an average or getting the maximum value is kind of complicated that way.

If that is not by mistake, would it make sense to add a field as number as well?

Thanks,  
Andrej

---

<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:** [December 12, 2016, 11:28pm UTC](https://discuss.elastic.co/t/mysql-num-fields-as-string/68722/2 "2016-12-12T23:28:16Z")

</div>

Looks like a bug to me. Internal to Packetbeat these values are integers so the index template just needs to be changed to mark these fields as longs.

These two entries are missing `type: long`. [https://github.com/elastic/beats/blob/v5.1.1/packetbeat/\_meta/fields.yml#L1623-L1631](https://github.com/elastic/beats/blob/v5.1.1/packetbeat/_meta/fields.yml#L1623-L1631) Then we would run `make update` to rebuild the index templates.

---

<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:** [January 9, 2017, 11:28pm UTC](https://discuss.elastic.co/t/mysql-num-fields-as-string/68722/3 "2017-01-09T23:28:20Z")

</div>

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