Skip to content

Instantly share code, notes, and snippets.

@kputland
Created May 20, 2014 15:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kputland/83582b9f1dfe50744a68 to your computer and use it in GitHub Desktop.
Save kputland/83582b9f1dfe50744a68 to your computer and use it in GitHub Desktop.
kibana stats panel not filtering old count
curl -XGET 'http://localhost:9200/logstash-2014.05.20/_search?pretty' -d '{
"facets": {
"0": {
"query": {
"filtered": {
"query": {
"query_string": {
"query": "@fields._call_type:INTL"
}
},
"filter": {
"bool": {
"must": [
{
"fquery": {
"query": {
"query_string": {
"query": "@fields._possible:possible OR (NOT @fields._duration:0)"
}
},
"_cache": true
}
},
{
"fquery": {
"query": {
"query_string": {
"query": "@fields._call_type:(INTL,EXTENDED)"
}
},
"_cache": true
}
},
{
"range": {
"@timestamp": {
"from": "2014-05-20T13:39:41.317Z",
"to": "2014-05-20T15:39:41.317Z"
}
}
}
],
"must_not": [
{
"fquery": {
"query": {
"query_string": {
"query": "@fields.final_route_indication:(\"I\")"
}
},
"_cache": true
}
},
{
"fquery": {
"query": {
"query_string": {
"query": "@fields.origination_tid_alias:(\"CT_10031\")"
}
},
"_cache": true
}
}
]
}
}
}
}
},
"1": {
"query": {
"filtered": {
"query": {
"query_string": {
"query": "@fields._call_type:EXTENDED"
}
},
"filter": {
"bool": {
"must": [
{
"fquery": {
"query": {
"query_string": {
"query": "@fields._possible:possible OR (NOT @fields._duration:0)"
}
},
"_cache": true
}
},
{
"fquery": {
"query": {
"query_string": {
"query": "@fields._call_type:(INTL,EXTENDED)"
}
},
"_cache": true
}
},
{
"range": {
"@timestamp": {
"from": "2014-05-20T13:39:41.317Z",
"to": "2014-05-20T15:39:41.317Z"
}
}
}
],
"must_not": [
{
"fquery": {
"query": {
"query_string": {
"query": "@fields.final_route_indication:(\"I\")"
}
},
"_cache": true
}
},
{
"fquery": {
"query": {
"query_string": {
"query": "@fields.origination_tid_alias:(\"CT_10031\")"
}
},
"_cache": true
}
}
]
}
}
}
}
},
"3": {
"query": {
"filtered": {
"query": {
"query_string": {
"query": "@fields._cdr_type:BW"
}
},
"filter": {
"bool": {
"must": [
{
"fquery": {
"query": {
"query_string": {
"query": "@fields._possible:possible OR (NOT @fields._duration:0)"
}
},
"_cache": true
}
},
{
"fquery": {
"query": {
"query_string": {
"query": "@fields._call_type:(INTL,EXTENDED)"
}
},
"_cache": true
}
},
{
"range": {
"@timestamp": {
"from": "2014-05-20T13:39:41.317Z",
"to": "2014-05-20T15:39:41.317Z"
}
}
}
],
"must_not": [
{
"fquery": {
"query": {
"query_string": {
"query": "@fields.final_route_indication:(\"I\")"
}
},
"_cache": true
}
},
{
"fquery": {
"query": {
"query_string": {
"query": "@fields.origination_tid_alias:(\"CT_10031\")"
}
},
"_cache": true
}
}
]
}
}
}
}
},
"4": {
"query": {
"filtered": {
"query": {
"query_string": {
"query": "@fields._cdr_type:SANSAY"
}
},
"filter": {
"bool": {
"must": [
{
"fquery": {
"query": {
"query_string": {
"query": "@fields._possible:possible OR (NOT @fields._duration:0)"
}
},
"_cache": true
}
},
{
"fquery": {
"query": {
"query_string": {
"query": "@fields._call_type:(INTL,EXTENDED)"
}
},
"_cache": true
}
},
{
"range": {
"@timestamp": {
"from": "2014-05-20T13:39:41.317Z",
"to": "2014-05-20T15:39:41.317Z"
}
}
}
],
"must_not": [
{
"fquery": {
"query": {
"query_string": {
"query": "@fields.final_route_indication:(\"I\")"
}
},
"_cache": true
}
},
{
"fquery": {
"query": {
"query_string": {
"query": "@fields.origination_tid_alias:(\"CT_10031\")"
}
},
"_cache": true
}
}
]
}
}
}
}
},
"old_0": {
"query": {
"filtered": {
"query": {
"query_string": {
"query": "@fields._call_type:INTL"
}
},
"filter": {
"bool": {
"must": [
{
"fquery": {
"query": {
"query_string": {
"query": "@fields._possible:possible OR (NOT @fields._duration:0)"
}
},
"_cache": true
}
},
{
"fquery": {
"query": {
"query_string": {
"query": "@fields._call_type:(INTL,EXTENDED)"
}
},
"_cache": true
}
},
{
"range": {
"@timestamp": {
"from": "2014-04-22T13:39:41.317Z",
"to": "2014-04-22T15:39:41.317Z"
}
}
}
],
"must_not": [
{
"fquery": {
"query": {
"query_string": {
"query": "@fields.final_route_indication:(\"I\")"
}
},
"_cache": true
}
},
{
"fquery": {
"query": {
"query_string": {
"query": "@fields.origination_tid_alias:(\"CT_10031\")"
}
},
"_cache": true
}
}
]
}
}
}
}
},
"old_1": {
"query": {
"filtered": {
"query": {
"query_string": {
"query": "@fields._call_type:EXTENDED"
}
},
"filter": {
"bool": {
"must": [
{
"fquery": {
"query": {
"query_string": {
"query": "@fields._possible:possible OR (NOT @fields._duration:0)"
}
},
"_cache": true
}
},
{
"fquery": {
"query": {
"query_string": {
"query": "@fields._call_type:(INTL,EXTENDED)"
}
},
"_cache": true
}
},
{
"range": {
"@timestamp": {
"from": "2014-04-22T13:39:41.317Z",
"to": "2014-04-22T15:39:41.317Z"
}
}
}
],
"must_not": [
{
"fquery": {
"query": {
"query_string": {
"query": "@fields.final_route_indication:(\"I\")"
}
},
"_cache": true
}
},
{
"fquery": {
"query": {
"query_string": {
"query": "@fields.origination_tid_alias:(\"CT_10031\")"
}
},
"_cache": true
}
}
]
}
}
}
}
},
"old_3": {
"query": {
"filtered": {
"query": {
"query_string": {
"query": "@fields._cdr_type:BW"
}
},
"filter": {
"bool": {
"must": [
{
"fquery": {
"query": {
"query_string": {
"query": "@fields._possible:possible OR (NOT @fields._duration:0)"
}
},
"_cache": true
}
},
{
"fquery": {
"query": {
"query_string": {
"query": "@fields._call_type:(INTL,EXTENDED)"
}
},
"_cache": true
}
},
{
"range": {
"@timestamp": {
"from": "2014-04-22T13:39:41.317Z",
"to": "2014-04-22T15:39:41.317Z"
}
}
}
],
"must_not": [
{
"fquery": {
"query": {
"query_string": {
"query": "@fields.final_route_indication:(\"I\")"
}
},
"_cache": true
}
},
{
"fquery": {
"query": {
"query_string": {
"query": "@fields.origination_tid_alias:(\"CT_10031\")"
}
},
"_cache": true
}
}
]
}
}
}
}
},
"old_4": {
"query": {
"filtered": {
"query": {
"query_string": {
"query": "@fields._cdr_type:SANSAY"
}
},
"filter": {
"bool": {
"must": [
{
"fquery": {
"query": {
"query_string": {
"query": "@fields._possible:possible OR (NOT @fields._duration:0)"
}
},
"_cache": true
}
},
{
"fquery": {
"query": {
"query_string": {
"query": "@fields._call_type:(INTL,EXTENDED)"
}
},
"_cache": true
}
},
{
"range": {
"@timestamp": {
"from": "2014-04-22T13:39:41.317Z",
"to": "2014-04-22T15:39:41.317Z"
}
}
}
],
"must_not": [
{
"fquery": {
"query": {
"query_string": {
"query": "@fields.final_route_indication:(\"I\")"
}
},
"_cache": true
}
},
{
"fquery": {
"query": {
"query_string": {
"query": "@fields.origination_tid_alias:(\"CT_10031\")"
}
},
"_cache": true
}
}
]
}
}
}
}
}
},
"size": 0
}'
curl -XGET 'http://localhost:9200/logstash-2014.05.20/_search?pretty' -d '{
"facets": {
"0": {
"query": {
"filtered": {
"query": {
"query_string": {
"query": "@fields._call_type:INTL"
}
},
"filter": {
"bool": {
"must": [
{
"range": {
"@timestamp": {
"from": 1400593205296,
"to": 1400600405296
}
}
},
{
"fquery": {
"query": {
"query_string": {
"query": "@fields._possible:possible OR (NOT @fields._duration:0)"
}
},
"_cache": true
}
},
{
"fquery": {
"query": {
"query_string": {
"query": "@fields._call_type:(INTL,EXTENDED)"
}
},
"_cache": true
}
}
],
"must_not": [
{
"fquery": {
"query": {
"query_string": {
"query": "@fields.final_route_indication:(\"I\")"
}
},
"_cache": true
}
}
]
}
}
}
}
},
"1": {
"query": {
"filtered": {
"query": {
"query_string": {
"query": "@fields._call_type:EXTENDED"
}
},
"filter": {
"bool": {
"must": [
{
"range": {
"@timestamp": {
"from": 1400593205296,
"to": 1400600405296
}
}
},
{
"fquery": {
"query": {
"query_string": {
"query": "@fields._possible:possible OR (NOT @fields._duration:0)"
}
},
"_cache": true
}
},
{
"fquery": {
"query": {
"query_string": {
"query": "@fields._call_type:(INTL,EXTENDED)"
}
},
"_cache": true
}
}
],
"must_not": [
{
"fquery": {
"query": {
"query_string": {
"query": "@fields.final_route_indication:(\"I\")"
}
},
"_cache": true
}
}
]
}
}
}
}
},
"3": {
"query": {
"filtered": {
"query": {
"query_string": {
"query": "@fields._cdr_type:BW"
}
},
"filter": {
"bool": {
"must": [
{
"range": {
"@timestamp": {
"from": 1400593205296,
"to": 1400600405296
}
}
},
{
"fquery": {
"query": {
"query_string": {
"query": "@fields._possible:possible OR (NOT @fields._duration:0)"
}
},
"_cache": true
}
},
{
"fquery": {
"query": {
"query_string": {
"query": "@fields._call_type:(INTL,EXTENDED)"
}
},
"_cache": true
}
}
],
"must_not": [
{
"fquery": {
"query": {
"query_string": {
"query": "@fields.final_route_indication:(\"I\")"
}
},
"_cache": true
}
}
]
}
}
}
}
},
"4": {
"query": {
"filtered": {
"query": {
"query_string": {
"query": "@fields._cdr_type:SANSAY"
}
},
"filter": {
"bool": {
"must": [
{
"range": {
"@timestamp": {
"from": 1400593205296,
"to": 1400600405296
}
}
},
{
"fquery": {
"query": {
"query_string": {
"query": "@fields._possible:possible OR (NOT @fields._duration:0)"
}
},
"_cache": true
}
},
{
"fquery": {
"query": {
"query_string": {
"query": "@fields._call_type:(INTL,EXTENDED)"
}
},
"_cache": true
}
}
],
"must_not": [
{
"fquery": {
"query": {
"query_string": {
"query": "@fields.final_route_indication:(\"I\")"
}
},
"_cache": true
}
}
]
}
}
}
}
},
"old_0": {
"query": {
"filtered": {
"query": {
"query_string": {
"query": "@fields._call_type:INTL"
}
},
"filter": {
"bool": {
"must": [
{
"match_all": {}
},
{
"range": {
"@timestamp": {
"from": 1398174005295,
"to": 1398181205295
}
}
}
]
}
}
}
}
},
"old_1": {
"query": {
"filtered": {
"query": {
"query_string": {
"query": "@fields._call_type:EXTENDED"
}
},
"filter": {
"bool": {
"must": [
{
"match_all": {}
},
{
"range": {
"@timestamp": {
"from": 1398174005295,
"to": 1398181205295
}
}
}
]
}
}
}
}
},
"old_3": {
"query": {
"filtered": {
"query": {
"query_string": {
"query": "@fields._cdr_type:BW"
}
},
"filter": {
"bool": {
"must": [
{
"match_all": {}
},
{
"range": {
"@timestamp": {
"from": 1398174005295,
"to": 1398181205295
}
}
}
]
}
}
}
}
},
"old_4": {
"query": {
"filtered": {
"query": {
"query_string": {
"query": "@fields._cdr_type:SANSAY"
}
},
"filter": {
"bool": {
"must": [
{
"match_all": {}
},
{
"range": {
"@timestamp": {
"from": 1398174005295,
"to": 1398181205295
}
}
}
]
}
}
}
}
}
},
"size": 0
}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment