Skip to content

Instantly share code, notes, and snippets.

@dadoonet
Forked from trekr5/gist:db0b0f577cab10d95257
Created April 30, 2015 13:18
Show Gist options
  • Select an option

  • Save dadoonet/0b161423d0acafecb012 to your computer and use it in GitHub Desktop.

Select an option

Save dadoonet/0b161423d0acafecb012 to your computer and use it in GitHub Desktop.

Revisions

  1. dadoonet revised this gist Apr 30, 2015. 1 changed file with 32 additions and 32 deletions.
    64 changes: 32 additions & 32 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -1,40 +1,40 @@
    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
    }
    }
    }
    ]
    GET /logstash-2015.04.30/_search
    {
    "query": {
    "filtered": {
    "filter": {
    "bool": {
    "must": [
    {
    "term": {
    "type": "iis6"
    }
    },
    {
    "term": {
    "status": 500
    }
    },
    {
    "range": {
    "timestamp": {
    "from": "now-2h",
    "to": "now"
    }
    }
    }
    }
    ]
    }
    }
    }
    },
    "aggs": {
    "3": {
    "date_histogram": {
    "field": "@timestamp",
    "interval": "1m"
    }
    }
    },
    "size": 0
    }
    '
    }
  2. @trekr5 trekr5 created this gist Apr 30, 2015.
    40 changes: 40 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,40 @@
    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
    }
    '