Not really sure where this belongs to be honest. I am ingesting a field that has a numeric value that represents a percentage. So 5 is 5%, 50 is 50%, 100 is 100%. Unfortunately, I can't figure out the Kibana formatting to not add additional zeros onto the existing value (currently, it sees 100 as 10,000%) and I can't find an elasticsearch data type to identify it as a percentage. Is there a way in Logstash I can run math on the number to convert it to a decimal expression?
Use a ruby filter with the following code:
event.set('fieldname', event.get('fieldname') / 100)
But I'd be surprised if Kibana's field formatter wasn't capable of formatting this properly.
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.