# Kibana - Visualization - Aggregation is not fetching all data

**URL:** https://discuss.elastic.co/t/kibana-visualization-aggregation-is-not-fetching-all-data/202922
**Category:** Kibana
**Created:** [October 9, 2019, 11:48pm UTC](https://discuss.elastic.co/t/kibana-visualization-aggregation-is-not-fetching-all-data/202922 "2019-10-09T23:48:03Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![ashokchinna](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ashokchinna/32/47123_2.png) [@ashokchinna](https://discuss.elastic.co/u/ashokchinna)
#### Post date: [October 9, 2019, 11:48pm UTC](https://discuss.elastic.co/t/kibana-visualization-aggregation-is-not-fetching-all-data/202922/1 "2019-10-09T23:48:04Z")

</div>

I am using one of the field value to perform the grouping.

Field name – error\_message

Since the field name have some run time error Id, I removed the numbers from it.

I used to below filter in the logstash.

```
filter {

  mutate {
        
        add_field => { " error_message _new" => "%{ error_message }"}
    }
               
               
               mutate {
    gsub => [    
      " error_message _new", "[0-9]", ""
    ]
  }

}

```

Example value in error\_message :-

**Data 1:-**

Actual Value :- 1212 DATA\_HANDLING\_ERROR: Invalid Key ID ( == 0 ) -- additional information may be available in the logs

Mutated Value :- DATA\_HANDLING\_ERROR: Invalid Key ID ( == ) -- additional information may be available in the logs

**Data 2: -**

Actual Value :- 9823 DATA\_NOT\_FOUND: Data not created, so retry after some timeThe object was not loaded. The data was not found, which may be a normal situation (check for surrounding errors). QueryName: FIND\_BY\_ID Class: Reason: values: 123445566, 1

Mutated Value :- DATA\_NOT\_FOUND: Data not created, so retry after some timeThe object was not loaded. The data was not found, which may be a normal situation (check for surrounding errors). QueryName: FIND\_BY\_ID Class: Reason: values: ,

I am using Kibana to display the error message count. I am using the ‘Data Table’ visualization to display the error message count.

When I am trying to aggregate the error\_message\_new (mutated field), its working fine for most of the value except for few.

For Data 1 , its working fine.

For the Data 2, its not able to fetch the mutated value.

Is there any issue in the Kibana Visualization or in my filter while creating the mutated field?

---

<div class="post-metadata">

### Author: ![Marius\_Dragomir](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marius_dragomir/32/42087_2.png) [@Marius\_Dragomir](https://discuss.elastic.co/u/Marius_Dragomir)
#### Post date: [October 11, 2019, 12:28pm UTC](https://discuss.elastic.co/t/kibana-visualization-aggregation-is-not-fetching-all-data/202922/2 "2019-10-11T12:28:54Z")

</div>

Can you check how the data looks in discover for the values that are not working? This can give you tips on what is working and what's not in your mutated field.

---

<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: [November 8, 2019, 12:29pm UTC](https://discuss.elastic.co/t/kibana-visualization-aggregation-is-not-fetching-all-data/202922/3 "2019-11-08T12:29:00Z")

</div>

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