Skip to content

Instantly share code, notes, and snippets.

@trekr5
Created April 30, 2015 12:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save trekr5/db0b0f577cab10d95257 to your computer and use it in GitHub Desktop.
Save trekr5/db0b0f577cab10d95257 to your computer and use it in GitHub Desktop.
curl -XGET 'localhost:9200/logstash-2015.04.30/_search?pretty' -d '{
"facets": {
"3": {
"date_histogram": {
"field": "@timestamp",
"interval": "1m"
},
"global": true,
"facet_filter": {
"fquery": {
"query": {
"filtered": {
"query": {
"query_string": {
"query": "type:iis6 AND status:500"
}
},
"filter": {
"bool": {
"must": [
{
"range": {
"timestamp": {
"from": now-2h,
"to": now
}
}
}
]
}
}
}
}
}
}
}
},
"size": 0
}
'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment