JSON Input for Kibana charts


(Nimit Shah) #1

Hi, Can anyone explain me how to use JSON Input for Kibana charts?
I went through http://www.quora.com/How-do-I-use-JSON-Input-field-under-Advanced-in-X-Axis-Aggregation-in-Kibana-4 but I didn't get any help from that.


Visualization for multiple plots in Kibana with filters
(Rashid Khan) #2

Basically its for adding parameters to the current aggregation that Kibana wouldn't usually support. Eg, shard_size in the Terms agg


(Nimit Shah) #3

So it won't let me do mathematical calculations, right?
I wanted to plot a chart where Y axis would be a ratio of two different parameters so I was wondering if I could calculate the ratio via JSON input.
As in something like "New field":"(Passed/Failed)"; or something.


(Rashid Khan) #4

No, it only supports that which elasticsearch supports.


(Nimit Shah) #5

Okay. Thanks!


(Colin McIntyre) #6

Just looking into something similar and while you can't do this via the JSON input, you can do this sort of thing via scripted fields.

Go to Kibana -> Settings -> Indices. On your index there will be two tabs, Fields and Scripted Fields. Choose Scripted Fields and click the add button on the right, it'll show you the type of operations you can use. An example of a script I used is:

doc['duration'].value/doc['quantity'].value

Once created you should be able to use the field on the Y-axis.


(John Sotiropoulos) #7

Hello!

I have another user case that I can't find out yet.

I have 2 fields srcIP and dstIP and I want to be able to show a line chart with X-axis the time and Y-axis the <counter of dstIP>/<counter of srcIP> (where dstIP = srcIP) at each time for the top 5 ratios or for a specific IP.

Is this possible through scripted fields? The thing is that there is a limited choice in Y-axis. Do you know if I can count a specific value of a field i.e. count( if srcIP == 10.1.2.3) ? Finally, if I can add more choices to Y-axis options like divide 2 metrics/counters?

Thank you in advance. Any insights about this would be very helpful!


(Carlos Vega Moreno) #8

+1 please answer


#9

Is it right that these JSON input parameters cannot do any real searches in elasticsearch then?

We are trying to secure a user's Kibana instance so they can only present data from the indexes we decide. We already used rewrite rules to block the Settings section but we want to make sure the JSON Input parameters cannot be used maliciously.


Edit a personal metric by kibana
(Meenakshi) #10

Hi,

Can we also have just doc['col1'].value? Actually, I want this value to be plotted on Y-axis, but Kibana allows to use along with aggegration only(say, unique count(something). Please someone help on this.


(system) #11