Pie chart or vertical bar

Hi, I am very new to Kibana. I have a use case where we have to get a bar or pie chart and below are the values for one of the attribute requested.path is:

google.com/images
google.com/images/a
google.com/images/b
google.com/images/c
google.com/images/d
google.com/videos/video-1
google.com/videos/video-2
google.com/videos/video-3
google.com/videos/video-4
google.com/maps/map1
google.com/maps/map2
google.com/maps/map3

how do I get a value

The charts should be a count like below
// google.com/images: 4
// google.com/videos : 4
// google.com/maps: 3

How can I achieve this visualization?
I've tried filtering with filters like below
{
"query": {
"match": {
"requested.path": {
"query": "google.com/*",
"type": "phrase"
}
}
}
}

But the above is treating everything including google/images as separate entries. I am not getting output as expected.

Hi @mouli, this video is an older version of Kibana but the basic actions should be similar to what you want. Try this: https://www.elastic.co/videos/kibana-4-tutorial-part-1-creating-pie-charts

Hi @tims Thank you for pointing me to the video. The key is the same(requested.path) but the values are different as below:

google.com/images
google.com/images/a
google.com/images/b
google.com/images/c
google.com/images/d
google.com/videos/video-1
google.com/videos/video-2
google.com/videos/video-3
google.com/videos/video-4
google.com/maps/map1
google.com/maps/map2
google.com/maps/map3

I have only one single key with all the different values. @tims couldn't understand filters in my case and looking for help regarding the same. Please let me know if I am not clear with my question :slight_smile:

Yes, so if you use the terms aggregation and set the field as requested.path it should split them out for you in the chart. Does that help?

@tims, Actually no. I have been using the same way you mentioned, but it is splitting into 12 individual entities rather than 3 entries like we want
// google.com/images: 4
// google.com/videos : 4
// google.com/maps: 3

Ah ok, I understand now, unfortunately the only way I can think of to accomplish this would be to just modify your data structure on ingest to acommodate this. Some kind of tag that gets set based on a regex against your url.

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