# Want Pie Chart Grouped By Browser Name/Version

**URL:** <https://discuss.elastic.co/t/want-pie-chart-grouped-by-browser-name-version/28722>\
**Category:** Kibana\
**Created:** [September 5, 2015, 6:45pm UTC](https://discuss.elastic.co/t/want-pie-chart-grouped-by-browser-name-version/28722 "2015-09-05T18:45:17Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![bhutchinson](https://avatars.discourse-cdn.com/v4/letter/b/2acd7d/32.png) [@bhutchinson](https://discuss.elastic.co/u/bhutchinson)\
**Post date:** [September 5, 2015, 6:45pm UTC](https://discuss.elastic.co/t/want-pie-chart-grouped-by-browser-name-version/28722/1 "2015-09-05T18:45:17Z")

</div>

Environment  
Windows 7  
Elasticsearch v1.7.0  
Logstash v1.5.4  
Kibana v4.1.1  
My data is an Apache Access Log File.

After running the grok filter {COMBINEDAPACHELOG}, date filter, agent filter,  
I have used logstash to create a new field named browser\_full\_name.  
browser\_full\_name is populated with a concatenation of browser name, major version  
Example Internet Explorer 10.0, Internet 9.0

I want to create a pie chart that shows the count of the browsers grouped by browser full name.

I need help creating a Kibana Pie Chart. I am trying to figure out how to group the data in the browser\_full\_name field and display the data in a pie chart. I am not sure how I can aggregate my data by unique values within the new browser\_full\_name field.

Example "Internet Explorer 10.0", "Internet Explorer 9.0", "Google Chrome 33.0"

Can someone tell me how to create a pie chart using Kibana v4.1.1?

Here is my logstash.conf  
input {  
file {  
path =\> "c:/websites/elkstack/logs/\*"  
sincedb\_path =\> "c:/websites/elkstack/logs/sincedb"  
start\_position =\> "beginning"  
}  
}

filter {  
if [path] =~ "access" {  
# populate type  
mutate {  
replace =\> { type =\> "apache\_access" }  
}

```
if [user-agent] != "-" and [user-agent] != "" {
  useragent {
    add_tag => ["UA"]
    source => "user-agent"
  }
}

if "UA" in [tags] {
  if [device] == "Other" { mutate { remove_field => "device" } }
  if [name] == "Other" { mutate { remove_field => "name" } }
  if [os] == "Other" { mutate { remove_field => "os" } }
}

# apply grok filter for apache combined access log format
grok {
  match => { "message" => "%{COMBINEDAPACHELOG}" }
}

# apply date filter to standardize date format
date {
  locale => "en"
  match => ["timestamp" , "dd/MMM/yyyy:HH:mm:ss Z"]
}

# apply user agent filter
# create new agent and os related fields
useragent {
  source => "agent"
}

# add new field named browser_full_name
# populate broser_full_name with concatenate fields name major.minor
mutate {
  add_field => { "browser_full_name" => "%{name} %{major}.%{minor}" }
}

```

} else if [path] =~ "error" {  
# set type to apache\_error  
mutate {  
replace =\> { type =\> "apache\_error" }  
}

} else {  
# set type to random\_logs  
mutate {  
replace =\> { type =\> "random\_logs" }  
}  
}  
}

output {  
elasticsearch {  
host =\> "localhost"  
protocol =\> "http"  
cluster =\> "bonza"  
index =\> "testnebraska"  
}

stdout {  
codec =\> rubydebug  
}  
}

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [September 5, 2015, 11:48pm UTC](https://discuss.elastic.co/t/want-pie-chart-grouped-by-browser-name-version/28722/2 "2015-09-05T23:48:01Z")

</div>

Check out [https://www.elastic.co/blog/kibana-4-video-tutorials-part-1](https://www.elastic.co/blog/kibana-4-video-tutorials-part-1), if you still have problems then show us what you're done and where you're stuck 🙂

---

<div class="post-metadata">

**Author:** ![bhutchinson](https://avatars.discourse-cdn.com/v4/letter/b/2acd7d/32.png) [@bhutchinson](https://discuss.elastic.co/u/bhutchinson)\
**Post date:** [September 6, 2015, 4:19pm UTC](https://discuss.elastic.co/t/want-pie-chart-grouped-by-browser-name-version/28722/3 "2015-09-06T16:19:20Z")

</div>

Thank you for your reply. Turns out that the solution was that I had to create a mapping that set the "browser\_full\_name" field index mapping attribute to "not\_analyzed" (before I indexed my data) so that I could perform exact matches vs full-text searches. Now I am able to create a pie chart and aggregate terms on the "browser\_full\_name" field. Hope this helps someone else.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 2:13pm UTC](https://discuss.elastic.co/t/want-pie-chart-grouped-by-browser-name-version/28722/4 "2017-07-06T14:13:41Z")

</div>


