Simple arithmetic in a Kibana visualization


(red der) #1

I'm using Kibana's "Metric" visualization to get a count of all my docs (literally the simplest thing).

But I want to multiple that value by 100 so the value the visualization displays is the count * 100.

I tried to use the json field but this does nothing (makes no change to the number the visualization shows):

===================
Edit: I have a better understanding of my problem. I created a new pie chart visualization and added this json input and it successfully alerted the values for a specific field:

{ "script" : "doc['myfield'].value * 1.2" }

But what I'm doing is different because I'm not altering the value of fields but the actual count of the docs. Is there like a environment variable I can use in the json input box that represents the count of docs or like the count of all events for the metric?


(Stacey Gammon) #2

What version of kibana are you using?

You can do this with the a Time Series Visual Builder Visualization on the Metric tab in v 5.4.


(red der) #3

im on 5.3.0 is this impossible to accomplish with my version?


(Stacey Gammon) #4

Unfortunately no, I recommend upgrading.


(red der) #5

This is obviously outside the scope of my original question but can I upgrade in place? Like yum update from the ES repo? I currently have it pinned at 5.3. for the kibana package. Are upgrades like this supported/not a bad idea?


(Stacey Gammon) #6

The safest bet is to follow the steps here: https://www.elastic.co/guide/en/elasticsearch/reference/current/setup-upgrade.html and https://www.elastic.co/guide/en/kibana/current/upgrade.html

Since you would be upgrading from 5.3 to 5.4 you can do a rolling upgrade for elasticsearch: https://www.elastic.co/guide/en/elasticsearch/reference/current/rolling-upgrades.html

and a standard upgrade for Kibana:
https://www.elastic.co/guide/en/kibana/current/upgrade-standard.html


(red der) #7

I cant run kibana 5.4 with ES 5.3?


(Brandon Kobel) #8

@red888 you'll want to keep the version of Kibana matching the version of Elasticsearch to ensure there aren't compatibility issues.


(system) #9

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