[Kibana Table Visualisation] Column: count how many times a field has a specific value

Hello, I am trying to create a table visualisation that shows statistics about REST-WS calls. Now I am stuck with showing a column where the number of calls that ended up in a specific result code (let's say 404) is shown.
I think the solution includes the json input field. But here is my question:
How can I manipulate if a document is counted or not for the count metric using the json input.

Also, is there a way to cast the values from string to number and do a range comparisson like ">= 400 AND < 500"?

Tagging @timroes here. Thanks Tim.

Cheers,
Bhavya

Hi,

unfortunately that's not possible currently. You cannot create a separate filter for a specific metric only for the visualization as a whole, so I fear you cannot show this in the same table.

Cheers,
Tim

OK, so I added a subbucket on the response code an get one table for each response code that exists in the data. Is there a way to (cast to a number) and combine all 2xx response codes into one table (same for 3xx, 4xx and 5xx of course)?

Thanks

I think if the fields contains a response code you should rather index it properly as a numeric field. That way you could do all numeric operations, like doing a range aggregation on it to get everything between 200-299, etc. in one bucket.

If it's a string field, you still can work around it in that case, by using a filters aggregations, and just create the filters like: response:2*, response:3*, etc. to get the corresponding response code "ranges".

Cheers,
Tim

Thank you for your input. I managed to change the status field to be an integer and did a range agg. Everything is fine except for the title of the tables which somehow doesn't show the range from and to values. Is this a (known) bug or did I miss something?

That should of course show. Could you tell me which version you are using?

6.2.2 - both elasticsearch and kibana

@timroes: Any news on this? Fix / Workaround?

Thanks

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