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
Copy file name to clipboardExpand all lines: docs/observability/customization/custom-prometheus-configs.md
+4-1Lines changed: 4 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,7 +12,7 @@ Mount these files under `site/prometheus/scrape-configs/exporters/*.yml` in dock
12
12
13
13
14
14
### Add Exporters to Prometheus
15
-
-`prometheus/scrape-configs/exporters/` -
15
+
-`prometheus/scrape-configs/exporters/`
16
16
Add yaml files into this folder. These file should contain all exporter prometheus metrics, for example from node_exporter or CAdvisor. Add any hosts and ip addresses you want to collect /metrics from will be retrieved
17
17
18
18
```yaml
@@ -26,6 +26,9 @@ Mount these files under `site/prometheus/scrape-configs/exporters/*.yml` in dock
26
26
# __metrics_path__: /path/metrics # Optionally override the metrics path, the default is just /metrics
27
27
# ... add all targets
28
28
```
29
+
30
+
Note that this project is setup to run Grafana Alloy to push metrics from individual VMs. The config in `prometheus/scrape-configs/exporters/` is an alternative way, allowing you to pull metrics from any other services.
31
+
29
32
## Custom Prometheus Scrape Configs
30
33
31
34
You can add compeltely custom prometheus scrape configs and recording rules by mounting in docker.
@@ -58,10 +58,9 @@ The files come with basic defaults, so we can now run the stack
58
58
59
59
```
60
60
docker compose up -d
61
-
docker compose -f exporters.docker-compose.yml up -d
62
61
```
63
62
64
-
This will launch Prometheus, Grafana, and all required services with
63
+
This will launch Prometheus, Grafana, and Alloy
65
64
66
65
67
66
## Step 4: Create Site-Specific Config Files
@@ -70,21 +69,21 @@ You must provide your own scrape and recording rules to tell Prometheus what to
70
69
This is probably the hardest step: You will actually need to know what is running, and where it is! Building out these config files will give you that inventory, and give a real definition of what is running where.
71
70
72
71
- Probers: HTTP endpoints you want to monitor for availability
73
-
- Add files in `scrape-configs/probers/*.yml`
72
+
- Add files in `alloy/probers/*.yml`
74
73
-[Configure Probers](./probing.md)
75
74
76
-
- Exporters: Targets like Elasticsearch or Docker
77
-
- Add files in `scrape-configs/exporters/*.yml`
78
-
-[Add Exporters](./telemetry.md)
79
-
80
75
- Recording Rules: Define uptime goals or custom aggregations
81
76
- Add files in `recording-rules/*.yml`
82
77
-[Enable Alerting](./alerting.md)
83
78
84
-
## Step 5: Run Exporters Everywhere
85
-
The exporters need to be run on each VM that you want information from. It's a pull model, not push.
79
+
## Step 5: Run Grafana Alloy on every VM
80
+
The Grafana Alloy image needs to be run on each VM that you want to get information from.
86
81
82
+
Use the example docker compose file in [exporters.docker-compose.yml](../../../observability/examples/full/exporters.docker-compose.yml) which will start up alloy and get metrics
87
83
84
+
```
85
+
docker compose -f exporters.docker-compose.yml up -d
0 commit comments