You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add an example Prometheus scrape config, similar to the
blackbox_exporter's example config.
Fixes: prometheus-community#888
Signed-off-by: SuperQ <[email protected]>
Copy file name to clipboardExpand all lines: README.md
+20
Original file line number
Diff line number
Diff line change
@@ -30,6 +30,26 @@ To use the multi-target functionality, send an http request to the endpoint `/pr
30
30
31
31
To avoid putting sensitive information like username and password in the URL, preconfigured auth modules are supported via the [auth_modules](#auth_modules) section of the config file. auth_modules for DSNs can be used with the `/probe` endpoint by specifying the `?auth_module=foo` http parameter.
32
32
33
+
Example Prometheus config:
34
+
```yaml
35
+
scrape_configs:
36
+
- job_name: 'postgres'
37
+
static_configs:
38
+
- targets:
39
+
- server1:5432
40
+
- server2:5432
41
+
metrics_path: /probe
42
+
params:
43
+
auth_module: [foo]
44
+
relabel_configs:
45
+
- source_labels: [__address__]
46
+
target_label: __param_target
47
+
- source_labels: [__param_target]
48
+
target_label: instance
49
+
- target_label: __address__
50
+
replacement: 127.0.0.1:9116 # The postgres exporter's real hostname:port.
51
+
```
52
+
33
53
## Configuration File
34
54
35
55
The configuration file controls the behavior of the exporter. It can be set using the `--config.file` command line flag and defaults to `postgres_exporter.yml`.
0 commit comments