Custom text for Metric Chart items

Hi Team,

I have developed a metric chart to get thread related data like status of the thread. In actual log, status is printed in single character (for Eg: 'Running' printed as 'R', 'Pending' printed as 'P', 'Continue Waiting' printed as 'CW' and 'Blocked' printed as 'B') when same brought to Kibana, it will be named as it is.
Is it possible to change this caption to show what is actual status rather than single character?
Please refer below screen shot:

You can create a scripted field for your index pattern that converts the shortname ("CW") to the long name ("Continue Waiting"). Then you can use the scripted field in your visualization.

Here's an example that you can expand on.

if (doc['thread_state'].value == 'B') {
    return 'Blocked';
} else if (doc['thread_state'].value  == 'CW') {
    return 'Continue Waiting';
} else if ...
return '';
1 Like

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