Is there a way to add units to fields in Kibana 6.5?

I have an index that has a number of different fields that use different units of measurement. When we view some of the this data in Discover, it would be nice if we could see what unit of measurement each field has, without having to change the underlying index template.

For example if my template has mappings that look like this:

"properties" : {
	"id" : { "type" : "integer" },
	"timeToProcess" : { "type" : "date" },
	"range" : { "type" : "double" },
	"rangeDeviation" : { "type" : "double" }
}

Is it possible for me to have my index pattern display this like:

id: 1
timeToProcess (ms): 500
range (m): 200
rangeDeviation (m): 4.5

I post data to the index through a java client which uses the objects structure to map to the template, so it's not like I am just able to change the variable name to include a (m), as this would not compile in java.

I found this post from about 2 and a half years ago asking a similar type of question, but the linked github ticket has not been resolved by the looks of it.

Bytes is the only one that is supported by default using the Numeral.js formatting. This can be done using the field formatting feature for the fields in question. if you want to use different units, I'd suggest using the scripted fields in order to add them by yourself to a string field, but that has it's own limitation (you won't be able to make math operation on those fields).

Typically users add the units in the axis titles of a visualization as you can see in the Logs sample data dashboard that comes with Kibana.

Is this by using the Custom Label field on the visualisations screen? Thanks for the reply!

Exactly.

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