-
Notifications
You must be signed in to change notification settings - Fork 23
/
graphite-api.yaml.example
250 lines (233 loc) · 8.88 KB
/
graphite-api.yaml.example
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
## (Optional) Index Configuration
# The location of the search index used for searching metrics.
# Note that it needs to be a file that is writable by the Graphite-API process.
# search_index: /srv/graphite/index
#
finders:
- influxgraph.InfluxDBFinder
influxdb:
#
## InfluxDB configuration
#
# Commented values denote default configuration. Uncomment to override
#
# db: graphite
# host: localhost
# port: 8086
# user: root
# pass: root
# ssl: false
## Logging configuration
#
# Log to file (optional). Default is no finder specific logging.
log_file: /var/log/influxgraph/influxgraph.log
# Log file logging level (optional)
# Values are standard logging levels - `info`, `debug`, `warning`, `critical` et al
# Default is `info`
# log_level: info
## Graphite Template Configuration
#
# (Optional) Graphite template configuration
# One template per line, syntax identical to InfluxDB Graphite input service template
# configuration.
# See https://github.com/influxdata/influxdb/tree/master/services/graphite for template
# configuration documentation.
#
# Note that care should be taken so that InfluxDB template configuration
# results in sane measurement and field names that do not override each other.
#
# InfluxGraph will run multiple queries in the same statement where multiple
# tag values are requested for the same measurement and/or field(s).
#
# For best InfluxDB performance and so that data can be queried correctly
# by InfluxGraph, fewer measurements with multiple fields per
# measurement are preferred.
#
# NB - separator for templates is not configurable as of yet - '.' by default
#
templates:
#
# Template format: [filter] <template> [tag1=value1,tag2=value2]
#
## Filter, template and extra static tags
#
# For a metric path `production.my_host.cpu.cpu0.load` the following template will
# filter on metrics starting with `production`,
# use tags `environment`, `host` and `resource` with measurement name `cpu0.load`
# and extra static tags `region` and `agent` set to `us-east-1` and
# `sensu` respectively
- production.* environment.host.resource.measurement* region=us-east1,agent=sensu
#
## Template only
# The following template does not use filter or extra tags.
# For a metric path `my_host.cpu.cpu0.load` it will use tags `host` and `resource`
# with measurement name `cpu0.load`
- host.resource.measurement*
#
## Template with tags after measurement
# For a metric path `load.my_host.cpu` the following template will use tags
# `host` and `resource` for measurement `load`
- measurement.host.resource
#
## Measurements with multiple fields
#
# For metric paths `my_host.cpu-0.cpu-idle`, `my_host.cpu-0.cpu-user`,
# `my_host.cpu.total.load` et al, the following template will use tag
# `host` with measurement names `cpu-0` and `cpu` and fields
# `cpu-idle`, `cpu-user`, `total.load` et al
#
- host.measurement.field*
# NB - A catch-all template of `measurement*` _should only_ be used -
# if it is also used in InfluxDB template configuration _in addition_
# to other templates. If it is present by it self, it would have the
# same effect as if no templates are configured but will induce
# additional overhead for no reason.
#
# Metric drop is a No-Op. Eg a template of `..measurement*` is for
# the finder equivalent to `measurement*`.
# The finder can only see data in the DB so if part of metric name
# is dropped and not inserted in DB, the finder will not ever see it
#
## Examples from InfluxDB Graphite service configuration
#
## filter + template
# - *.app env.service.resource.measurement
## filter + template + extra tag
# - stats.* .host.measurement* region=us-west,agent=sensu
# filter + template with field key
# - stats.* .host.measurement.field*
## (Optional) Memcache integration
#
memcache:
host: localhost
# TTL for /metrics/find endpoint only in seconds.
# Defaults to 900 - 15 minutes
# TTL for /render endpoint is dynamic and based on data interval.
# Eg for a 24hr query which would dynamically get a 1min interval, the TTL
# is 1min.
# ttl: 900
# Memcache (compressed) max value length in MB. The default of 1MB is
# the memcached server's default - this value should match server's value.
# max_value: 1
# Memcache key names for fields and series loader mutex
# series_loader_mutex_key: influxgraph_series_loader
# fields_key: infl_fields_key
## (Optional) Aggregation function configuration
#
# Syntax:
# <graphite metric path regex>: <InfluxDB aggregation function>
# See https://docs.influxdata.com/influxdb/v1.1/query_language/functions
aggregation_functions:
# The below four aggregation functions are the
# defaults used if 'aggregation_functions'
# configuration is not provided.
# They will need to be re-added if configuration is provided
\.min$ : min
\.max$ : max
\.last$ : last
\.sum$ : sum
#
## Deltas configuration
#
# (Optional) Time intervals (deltas) to use for query time ranges
# Key is time range of query, value is time delta of query, both in seconds
# Eg to use a one second query interval for a query spanning
# one hour or less use `3600 : 1`
# Shown below is the default configuration, change/add/remove
# as necessary.
deltas:
# 1 hour -> 1s
# 3600 : 1
# 1 day -> 30s
# 86400 : 30
# 3 days -> 1min
259200 : 60
# 7 days -> 5min
604800 : 300
# 14 days -> 10min
1209600 : 600
# 28 days -> 15min
2419200 : 900
# 2 months -> 30min
4838400 : 1800
# 4 months -> 1hour
9676800 : 3600
# 12 months -> 3hours
31536000 : 7200
# 4 years -> 12hours
126144000 : 43200
#
## Query Retention Policy configuration
#
# (Optional) Retention policies to use for associated time intervals.
#
# The DB configured default retention policy is used for all queries if no
# retention_policies configuration is provided.
#
# Key is query group by time interval in seconds, value the retention policy
# name a query with the associated group by interval, or above up to next
# configured interval, should use.
#
# The max configured interval is used for query group by intervals higher
# than the max and the min configured interval for query group by intervals
# lower than the minimum.
#
# For best performance, retention policies should closely match time interval
# (deltas) configuration values. For example, where delta configuration makes
# queries ranging 28 days and below to use 15 min intervals, retention policies
# would ideally have configuration to use a retention policy for
# queries with an interval of 15 min or greater.
#
# That said, there is no requirement that the settings be the same though
# performance will suffer if InfluxDB has to aggregate over many data points
# on the fly for each query.
#
# Eg to use a retention policy `30m` for intervals of thirty minutes and
# above, `10m` for queries with a time interval thirty minutes or less and
# ten minutes or above and `default` for intervals at or below five minutes
retention_policies:
1800: 30m
600: 10m
300: default
#
## Series loader configuration
#
# Row limit of series loader queries
#
# Depending on InfluxDB data and machine memory sizes, this may need to be
# lowered to avoid InfluxDB returning partial results due to not enough
# available memory.
#
# Example query: SHOW SERIES LIMIT <loader_limit> <..>
# loader_limit: 100000
#
## Fill function parameter to use on data queries
#
# Valid values are integers, floats and parameters like 'previous' or
# 'linear' as defined in influxgraph.constants.FILL_PARAMS or 'null',
# the default.
#
# For example, with `fill: 1` all queries will use
# 'SELECT <..> fill(1)' and missing data values will be filled
# with `1`.
#
# fill: "null"
#
## Index builder configuration
#
# The location of the index lock file used for building an index.
# index_lock_file: /tmp/influxgraph_index.lock
# How often to re-build index. Note that newly written metrics will not be
# able to be graphed or queried until index has been re-built.
# reindex_interval: 900
# Whether or not to block requests on startup until index is built for
# the first time. Defaults to true.
#
# With this flag disabled requests will not be blocked but will be empty
# while index is being built.
#
# This is mostly useful for use with application servers like gunicorn
# which recycle workers that do not respond at startup and a large
# number of series in the DB leading to index times that can be longer
# than application server timeout.
# loader_startup_block: true