-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfig_example.yml
88 lines (85 loc) · 4.8 KB
/
config_example.yml
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
api:
port: 8091
# [optional] default is 1 minute (1m). Defines after how much time the query is aborted and
# an error is returned.
timeout: 1m
# Configs about queries
querying:
# [optional] Configures how many samples at max can be held in memory on a single query.
# Default value is 10000.
max_samples: 2048
# [optional] Configures how old a datapoint has to be before considered stale. It has to be a
# "duration format", like 5m (5 minutes), 30s (30 seconds). Using too little value here will
# put pressure on the remote storages, as any delay in ingestion will make the metric be
# considered stale (and as consequence the instance query would return empty).
# To undersstand it deeper, read Prometheus definition:
# https://prometheus.io/docs/prometheus/latest/querying/basics/#staleness
# The bigger this number, the more probable that more data is going to be fetched from remotes
# on each query. Default 5m.
lookback_delta: 9m
# [optional] Set the maximum simultaneous queries running. This means that if query 21
# arrives, it will be denied. So, size the machine running Graviola to be able to
# handle the load. Default is 20.
max_concurrent_queries: 30
# [optional] Controls the log level. Allowed values: debug, info, warn, error. Default value is "info"
log:
level: info
storages:
# [optional] default is type 'keep_biggest'. This configures how Graviola will merge the
# data from multiple groups.
# Possible values are:
# * keep_biggest - When 2 time-series have the same label set, it will keep the one that has the
# biggest number of datapoints in the response. If 2 or more time-series have the same count, it
# will pick one at random
# * always_merge - Will merge all the data into 1 single time-series (for time series that
# share the same label set). In case the result has 2 datapoints with the exact same timestamp,
# it will pick on at random.
merge_strategy:
type: keep_biggest
# [mandatory] The groups of remote servers. You can define a single group if you want. Groups
# are used to share configurations, and all the data inside them will be merged
# (the deduplication happens on the level above this one).
groups:
# [mandatory] The name of the group. Two different groups cannot have the same name.
- name: "some group name"
# [optional] default: fail_all
# What will happen if a single server fails to answer the query. A failure means an error.
# An empty response is NOT a failure, as no error has happened.
# The options are:
# * fail_all - fail the whole query on this group
# * partial_response - answer the query with the server that returned data, which might
# end up being a partial response
on_query_fail: fail_all
# [optional] In case you don't want to define a per instance time window, this is where a
# time window for all servers in this group is defined. If time_windows are re-defined on
# a per server basis, it will override these values from this config.
# Graviola will avoid querying it if the query is outide its time window.
# If this is not set, graviola will send all the queries to servers in this group
time_window:
# Times 3 formats. relative (now-4d), Unix (1136239445) and
# RFC3339 (1996-12-19T16:39:57-08:00) ( one more example as this case is difficult:
# 1985-04-12T23:20:50.52Z) (but do a favor to yourself and don't use timezones here)
# The time defined here will be parsed following the order they were mentioned above:
# relative, unix and RFC3339
start: "now-6h"
end: "now"
remotes:
# [mandatory] the name of this remote. Within a group, 2 different remotes cannot have
# the same name
- name: "my server 1"
# [mandatory] The address of the remote server
address: "https://localhost:9090"
# [optional] in case the remote server has a prefix for the querying path, which is /api/v1/query
path_prefix: ""
# [optional] if this server has a fixed retention window, by setting data under this map
# Graviola will avoid querying it if the query is outide its time window
# If this is not set, graviola will send all the queries to this server.
# If a time_window is set on the parent group, this config will override it.
time_window:
# Accepts 3 time formats. relative (now-4d), Unix (1136239445) and
# RFC3339 (1996-12-19T16:39:57-08:00) ( one more example as this case is difficult:
# 1985-04-12T23:20:50.52Z) (but do a favor to yourself and don't use timezones here)
# The time defined here will be parsed following the order they were mentioned above:
# relative, unix and RFC3339
start: "now-6h"
end: "now"