-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathreverse_exporter.complete.yml
83 lines (80 loc) · 3.72 KB
/
reverse_exporter.complete.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
# This is *every* reverse_exporter config option in one-file.
# This file should not normally used this way - specific only what you need.
web:
# timeout to receive headers from connections - prevent Slow Loris
read_header_timeout: 1s
# list of addresses to listen on
listen:
# open a Unix socket file on /var/run/server
- unix:///var/run/server.socket
# listen on tcp port 9998.
- tcp://0.0.0.0:9998
# listen on port 9998 with TLS
- tcps://0.0.0.0:9998?tlscert=/path/to/file/in/pem/format.crt&tlskey=/path/to/file/in/pem/format.pem
# listen on Unix socket file on /var/run/server with TLS
- unixs:///var/run/server.socket?tlscert=/path/to/file/in/pem/format.crt&tlskey=/path/to/file/in/pem/format.pem
# listen on 9998 with TLS and TLS client auth
- tcps://0.0.0.0:9998?tlscert=/path/to/file/in/pem/format.crt&tlskey=/path/to/file/in/pem/format.pem&tlsclientca=/path/to/cert
# Each item in the list is the name of a url subpath to combine exporters under.
reverse_exporters:
# the normal use of this exporter is intended to be presenting a consistent
# /metrics endpoint for appliance-like environments which may contain multiple
# exporters.
- path: /metrics
# auth_type configures password protection on the endpoint
auth:
basic_auth:
- username: root
password: test
exporters:
http:
- name: prometheus
address: http://127.0.0.1:9090/metrics
# proxy_timeout sets the TCP deadline for a request to complete. No data
# is returned by an endpoint until all exporters have received data, so keep
# this low (or preferably: don't use network endpoints).
# a value of 0 means no timeout (the request can potentially stall until the
# client terminates, which Prometheus will do by default).
timeout: 1s
- address: http://127.0.0.1:9100/metrics
name: node_exporter
# labels is a map of additional static labels to add (in addition to the
# enforced "name" field)
labels:
node_uuid: some.special.identifier
# metrics from jobs inside a container can be easily included provided they are
# in the text exposition format. Just path a file URI as the address.
file:
- name: cron_metrics
path: example.metrics.prom
# an executable script can also be passed with a special `exec` URL. exec proxy's have two modes:
# in non-caching mode, the proxy runs an instance of the script as soon as a request is received,
# and buffers up additional requests - returning the result data to all of them once execution is
# finished. Only a single instance is ever executing.
exec:
- name: dynamic_metrics
command: ./scripted_metrics.sh
args: ["arg1", "arg2"]
# In caching mode, the command is executed continuously with a given timeout, and cached results
# are served to Prometheus instances. Your script should probably include a timestamp in this mode.
exec_cached:
- name: periodic_dynamic_metrics
command: ./scripted_metrics.sh
args: []
# interval to execute the script over
exec_interval: 30s
# The exporter does support declaring arbitrary paths, for example if you were
# fronting something like the blackbox_exporter which changes its return based
# on the Prometheus query string.
- path: /blackbox
exporters:
http:
- name: blackbox_exporter
address: http://127.0.0.1:9998/probe
# disable appending the name (above) to the exporter. Important: if you end
# up combining multiple metrics with undistinguished names, the endpoint
# will disable itself.
no_rewrite: true
# ForwardURLParams determines whether the exporter will have ALL url params
# of the parent request added to it.
forward_url_params: true