Michal Kobus | 14e835b | 2019-04-11 14:25:27 +0200 | [diff] [blame] | 1 | # This section defines default settings for how queries should be run. |
| 2 | # All settings can be overridden for any given query in its own section. |
| 3 | # The values shown in this example are also the fallback values used if |
| 4 | # a setting is not specified in the DEFAULT section or a query's section. |
| 5 | [DEFAULT] |
| 6 | # How often to run queries. |
| 7 | QueryIntervalSecs = 15 |
| 8 | # How long to wait for a query to return before timing out. |
| 9 | QueryTimeoutSecs = 10 |
| 10 | # The indices to run the query on. |
| 11 | # Any way of specifying indices supported by your Elasticsearch version can be used. |
| 12 | QueryIndices = _all |
| 13 | |
| 14 | # Queries are defined in sections beginning with 'query_'. |
| 15 | # Characters following this prefix will be used as a prefix for all metrics |
| 16 | # generated for this query |
| 17 | [query_all] |
| 18 | # Settings that are not specified are inheritied from the DEFAULT section. |
| 19 | # The search query to run. |
| 20 | QueryJson = { |
| 21 | "size": 0, |
| 22 | "query": { |
| 23 | "match_all": {} |
| 24 | } |
| 25 | } |
| 26 | |
| 27 | [query_terms] |
| 28 | # The DEFAULT settings can be overridden. |
| 29 | QueryIntervalSecs = 20 |
| 30 | QueryTimeoutSecs = 15 |
| 31 | QueryIndices = <logstash-{now/d}> |
| 32 | QueryJson = { |
| 33 | "size": 0, |
| 34 | "query": { |
| 35 | "match_all": {} |
| 36 | }, |
| 37 | "aggs": { |
| 38 | "group1_terms": { |
| 39 | "terms": {"field": "group1"}, |
| 40 | "aggs": { |
| 41 | "val_sum": { |
| 42 | "sum": {"field": "val"} |
| 43 | } |
| 44 | } |
| 45 | } |
| 46 | } |
| 47 | } |