# Kibana is not recognizing integer

**URL:** <https://discuss.elastic.co/t/kibana-is-not-recognizing-integer/45022>\
**Category:** Kibana\
**Created:** [March 21, 2016, 4:44pm UTC](https://discuss.elastic.co/t/kibana-is-not-recognizing-integer/45022 "2016-03-21T16:44:05Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![nkpaul](https://avatars.discourse-cdn.com/v4/letter/n/f6c823/32.png) [@nkpaul](https://discuss.elastic.co/u/nkpaul)\
**Post date:** [March 21, 2016, 4:44pm UTC](https://discuss.elastic.co/t/kibana-is-not-recognizing-integer/45022/1 "2016-03-21T16:44:05Z")

</div>

Tried inboth Kibana 4.4.1/2 version. It is not recognizing integer as int. Also tried with float.  
However logstash is processing as integer. Have tried with mutating the same to a different field but same result.

input {  
file {  
path =\> "/u01/MyLagInfo/_.txt._"  
type =\> "MyLagInfo"  
#sincedb\_path =\> "/dev/null"  
}  
}

filter {  
if [type] =~ "MyLagInfo" {

```
grok {
    match => { "path" => "%{GREEDYDATA}/%{GREEDYDATA:SrvName}.txt" }
    #add_field => { "RepSrvName" => "%{SrvName}" }
}

grok {
    match => { "message" => "%{COMBINEDAPACHELOG}" }
    #match => { "message" => "%{GREEDYDATA:SchemaName}\|%{GREEDYDATA:DestinationTS}\|%{GREEDYDATA:SourceTS}\|%{INT:ReplicationLag}" }
    match => { "message" => "%{GREEDYDATA:SchemaName}\|%{GREEDYDATA:DestinationTS}\|%{GREEDYDATA:SourceTS}\|(?<RepLag>%{NUMBER})" }
}
date {
    match => ["SourceTS", "yyyy-MM-dd HH:mm:ss.SSS", "yyyy-MM-dd HH:mm:ss:SSS"]
}
date {
    match => ["DestinationTS", "yyyy-MM-dd HH:mm:ss.SSS", "yyyy-MM-dd HH:mm:ss:SSS"]
    target => "@timestamp"
    #locale => "en"
}

mutate {
  convert => { "RepLag" => "integer" }
   #add_field =>
   # {
   # "MyLagtime" => "%{ReplicationLag}"
   # }
   #remove_field => ["ReplicationLag", "DestinationTS"]
}

```

}  
}

output {  
stdout { codec =\> rubydebug }  
elasticsearch {  
hosts =\> ["localhost:9200"]  
#index =\> "MyLag-%{+YYYY.MM.dd}"  
#template =\> "/u01/logstash/template/replatency\_index\_template.json"  
#template\_overwrite =\> true  
}  
}

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [March 21, 2016, 4:54pm UTC](https://discuss.elastic.co/t/kibana-is-not-recognizing-integer/45022/2 "2016-03-21T16:54:43Z")

</div>

What does the output look like? Do you get a match for the field `ReplicationLag` (which you do not seem to cast as an integer) or `RepLag` in the records?

---

<div class="post-metadata">

**Author:** ![nkpaul](https://avatars.discourse-cdn.com/v4/letter/n/f6c823/32.png) [@nkpaul](https://discuss.elastic.co/u/nkpaul)\
**Post date:** [March 21, 2016, 4:59pm UTC](https://discuss.elastic.co/t/kibana-is-not-recognizing-integer/45022/3 "2016-03-21T16:59:20Z")

</div>

Yes! It matches the data! I need to cast as integer for aggregation.

{  
"message" =\> "GPST029|2016-03-16 15:10:01.176|2016-03-16 15:09:57.736|3",  
"@version" =\> "1",  
"@timestamp" =\> "2016-03-16T19:10:01.176Z",  
"path" =\> "/u01/RepLatencyInfo/IDAS\_PRD.txt.031616",  
"host" =\> "[itsrhv22111.it.statestr.com](http://itsrhv22111.it.statestr.com)",  
"type" =\> "RepLatencyInfo",  
"SrvName" =\> "MYSRV",  
"SchemaName" =\> "MYT029",  
"DestinationTS" =\> "2016-03-16 15:10:01.176",  
"SourceTS" =\> "2016-03-16 15:09:57.736",  
"ReplicationLag" =\> 3  
}

---

<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, 1:58pm UTC](https://discuss.elastic.co/t/kibana-is-not-recognizing-integer/45022/4 "2017-07-06T13:58:27Z")

</div>


