2020-05-22 15:38:49 +02:00
|
|
|
# Arbitrary number of usernames may be put here.
|
|
|
|
# Usernames must be unique.
|
|
|
|
|
|
|
|
users:
|
2021-04-20 09:58:29 +02:00
|
|
|
# Requests with the 'Authorization: Bearer XXXX' header are proxied to http://localhost:8428 .
|
|
|
|
# For example, http://vmauth:8427/api/v1/query is proxied to http://localhost:8428/api/v1/query
|
|
|
|
- bearer_token: "XXXX"
|
|
|
|
url_prefix: "http://localhost:8428"
|
2020-05-22 15:38:49 +02:00
|
|
|
|
|
|
|
# The user for querying local single-node VictoriaMetrics.
|
|
|
|
# All the requests to http://vmauth:8427 with the given Basic Auth (username:password)
|
2021-04-20 09:58:29 +02:00
|
|
|
# will be proxied to http://localhost:8428 .
|
|
|
|
# For example, http://vmauth:8427/api/v1/query is proxied to http://localhost:8428/api/v1/query
|
2020-05-22 15:38:49 +02:00
|
|
|
- username: "local-single-node"
|
|
|
|
password: "***"
|
|
|
|
url_prefix: "http://localhost:8428"
|
|
|
|
|
2021-04-20 09:51:03 +02:00
|
|
|
# The user for querying local single-node VictoriaMetrics with extra_label team=dev.
|
|
|
|
# All the requests to http://vmauth:8427 with the given Basic Auth (username:password)
|
|
|
|
# will be routed to http://localhost:8428 with extra_label=team=dev query arg.
|
|
|
|
# For example, http://vmauth:8427/api/v1/query is routed to http://localhost:8428/api/v1/query?extra_label=team=dev
|
|
|
|
- username: "local-single-node"
|
|
|
|
password: "***"
|
|
|
|
url_prefix: "http://localhost:8428?extra_label=team=dev"
|
|
|
|
|
2020-05-22 15:38:49 +02:00
|
|
|
# The user for querying account 123 in VictoriaMetrics cluster
|
2021-04-20 19:16:17 +02:00
|
|
|
# See https://docs.victoriametrics.com/Cluster-VictoriaMetrics.html#url-format
|
2020-05-22 15:38:49 +02:00
|
|
|
# All the requests to http://vmauth:8427 with the given Basic Auth (username:password)
|
2021-05-29 00:00:23 +02:00
|
|
|
# will be load-balanced among http://vmselect1:8481/select/123/prometheus and http://vmselect2:8481/select/123/prometheus
|
|
|
|
# For example, http://vmauth:8427/api/v1/query is proxied to the following urls in a round-robin manner:
|
|
|
|
# - http://vmselect1:8481/select/123/prometheus/api/v1/select
|
|
|
|
# - http://vmselect2:8481/select/123/prometheus/api/v1/select
|
2020-05-22 15:38:49 +02:00
|
|
|
- username: "cluster-select-account-123"
|
|
|
|
password: "***"
|
2021-05-29 00:00:23 +02:00
|
|
|
url_prefix:
|
|
|
|
- "http://vmselect1:8481/select/123/prometheus"
|
|
|
|
- "http://vmselect2:8481/select/123/prometheus"
|
2020-05-22 15:38:49 +02:00
|
|
|
|
|
|
|
# The user for inserting Prometheus data into VictoriaMetrics cluster under account 42
|
2021-04-20 19:16:17 +02:00
|
|
|
# See https://docs.victoriametrics.com/Cluster-VictoriaMetrics.html#url-format
|
2021-04-20 09:58:29 +02:00
|
|
|
# All the requests to http://vmauth:8427 with the given Basic Auth (username:password)
|
2021-05-29 00:00:23 +02:00
|
|
|
# will be load-balanced between http://vminsert1:8480/insert/42/prometheus and http://vminsert2:8480/insert/42/prometheus
|
|
|
|
# For example, http://vmauth:8427/api/v1/write is proxied to the following urls in a round-robin manner:
|
|
|
|
# - http://vminsert1:8480/insert/42/prometheus/api/v1/write
|
|
|
|
# - http://vminsert2:8480/insert/42/prometheus/api/v1/write
|
2020-05-22 15:38:49 +02:00
|
|
|
- username: "cluster-insert-account-42"
|
|
|
|
password: "***"
|
2021-05-29 00:00:23 +02:00
|
|
|
url_prefix:
|
|
|
|
- "http://vminsert1:8480/insert/42/prometheus"
|
|
|
|
- "http://vminsert2:8480/insert/42/prometheus"
|
2021-04-20 09:58:29 +02:00
|
|
|
|
|
|
|
|
|
|
|
# A single user for querying and inserting data:
|
|
|
|
# - Requests to http://vmauth:8427/api/v1/query, http://vmauth:8427/api/v1/query_range
|
2021-05-29 00:00:23 +02:00
|
|
|
# and http://vmauth:8427/api/v1/label/<label_name>/values are proxied to the following urls in a round-robin manner:
|
|
|
|
# - http://vmselect1:8481/select/42/prometheus
|
|
|
|
# - http://vmselect2:8481/select/42/prometheus
|
|
|
|
# For example, http://vmauth:8427/api/v1/query is proxied to http://vmselect1:8480/select/42/prometheus/api/v1/query
|
|
|
|
# or to http://vmselect2:8480/select/42/prometheus/api/v1/query .
|
2021-04-20 09:58:29 +02:00
|
|
|
# - Requests to http://vmauth:8427/api/v1/write are proxied to http://vminsert:8480/insert/42/prometheus/api/v1/write
|
|
|
|
- username: "foobar"
|
|
|
|
url_map:
|
2021-06-09 14:38:09 +02:00
|
|
|
- src_paths:
|
|
|
|
- "/api/v1/query"
|
|
|
|
- "/api/v1/query_range"
|
|
|
|
- "/api/v1/label/[^/]+/values"
|
2021-05-29 00:00:23 +02:00
|
|
|
url_prefix:
|
|
|
|
- "http://vmselect1:8481/select/42/prometheus"
|
|
|
|
- "http://vmselect2:8481/select/42/prometheus"
|
2021-04-20 09:58:29 +02:00
|
|
|
- src_paths: ["/api/v1/write"]
|
|
|
|
url_prefix: "http://vminsert:8480/insert/42/prometheus"
|