Kibana JSON inpus

Hello forum,

I am trying to present some metrics in byte or even better gigabytes in a Data table visualization.
I am unable to edit the index-pattern, but i can see that it is mapped as a long.
I am trying to have the value displayed as gigabytes using JSON input.

  "script": {
    "inline": "doc['prometheus.confluent_kafka_server_retained_bytes.value'].value <insert formula here>",
    "lang": "painless"

Anyone here how i would make that happen?

Best regards
Christian Oelsner

You most likely do not a script for this


What version of Kibana / Elasticsearch?

What visualization? Lens?

a) In general you can set the format in the Index Pattern / Data View and that will take affect everywhere

Or B) In Lens set the formatting..

Hi Stephen,
Thanks for taking your time to reply :slight_smile:
The version is 8.3.3.

I do not have permissions to set the format in the index pattern, which is why i am looking for alternatives :slight_smile:
Though i did talk to the one in charge of the Observability department today and he suggested that he could grant me those priviliedges on their dev cluster.
But for now, i do not have that access.

I am using an aggregation based data table visualization.

Some background is that i am trying to create a visualisation that our application teams can go to and see the cost for them to use Confluent Cloud, in this example, how much they will be billed for reatained bytes.

Christian Oelsner

Try a table in Lens, you can set the format for each column as I showed above...

You could even use the formula to multiply the bytes by a cost and provide an estimated cost column

Good morning Stephen,
This is good stuff, i will be sure to try that out and report back here.

Christian Oelsner

Hi again Stephen,
Your suggestion worked beautifully :slight_smile:

Thank you so much for your input.

Best regards
Christian Oelsner

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