-
Notifications
You must be signed in to change notification settings - Fork 90
/
exporter.cfg
60 lines (58 loc) · 2.02 KB
/
exporter.cfg
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# This section defines default settings for how queries should be run.
# All settings can be overridden for any given query in its own section.
# The values shown in this example are also the fallback values used if
# a setting is not specified in the DEFAULT section or a query's section.
[DEFAULT]
# How often to run queries.
QueryIntervalSecs = 15
# How long to wait for a query to return before timing out.
QueryTimeoutSecs = 10
# The indices to run the query on.
# Any way of specifying indices supported by your Elasticsearch version can be used.
QueryIndices = _all
# What to do if a query throws an error. One of:
# * preserve - keep the metrics/values from the last successful run.
# * drop - remove metrics previously produced by the query.
# * zero - keep metrics previously produced by the query, but reset their values to 0.
QueryOnError = drop
# What to do if a metric produced by the previous run of a query is not present
# in the current run. One of:
# * preserve - keep the value of the metric from the last run it was present in.
# * drop - remove the metric.
# * zero - keep the metric, but reset its value to 0.
QueryOnMissing = drop
# Queries are defined in sections beginning with 'query_'.
# Characters following this prefix will be used as a prefix for all metrics
# generated for this query
[query_all]
# Settings that are not specified are inherited from the DEFAULT section.
# The search query to run.
QueryJson = {
"size": 0,
"query": {
"match_all": {}
}
}
[query_terms]
# The DEFAULT settings can be overridden.
QueryIntervalSecs = 20
QueryTimeoutSecs = 15
QueryIndices = <logstash-{now/d}>
QueryOnError = preserve
QueryOnMissing = zero
QueryJson = {
"size": 0,
"query": {
"match_all": {}
},
"aggs": {
"group1_terms": {
"terms": {"field": "group1"},
"aggs": {
"val_sum": {
"sum": {"field": "val"}
}
}
}
}
}