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
Next, create `prometheus.yml` following the [Prometheus documentation].
72
-
This file defines the services that Prometheus scrapes.
73
-
74
-
To keep it simple, monitor Prometheus itself.
75
-
76
-
To forward samples to CrateDB, set `remote_write` and `remote_read` to the adapter URL (see the [CrateDB Prometheus Adapter setup](https://github.com/crate/cratedb-prometheus-adapter)).
5
+
CrateDB, Prometheus, and the [CrateDB Prometheus Adapter].
77
6
78
-
Because the adapter runs in Docker, use the adapter service name from `docker-compose.yml` (`cratedb-prometheus-adapter`) instead of `localhost` in the URLs.
7
+
## Prerequisites
79
8
80
-
Use the following `prometheus.yml`:
81
-
```yaml
82
-
global:
83
-
scrape_interval: 15s # By default, scrape targets every 15 seconds.
9
+
Use Docker or Podman to run all components. This approach works consistently
10
+
across Linux, macOS, and Windows.
84
11
85
-
# Attach these labels to any time series or alerts when communicating with
86
-
# external systems (federation, remote storage, Alertmanager).
87
-
external_labels:
88
-
monitor: 'codelab-monitor'
12
+
### Files
89
13
90
-
# A scrape configuration containing exactly one endpoint to scrape:
91
-
# Here it's Prometheus itself.
92
-
scrape_configs:
93
-
# The job name is added as a label `job=<job_name>` to any time-series scraped from this config.
94
-
- job_name: 'prometheus'
14
+
First, download and save all required files to your machine.
15
+
- {download}`compose.yaml`
16
+
- {download}`cratedb-prometheus-adapter.yaml`
17
+
- {download}`ddl.sql`
18
+
- {download}`prometheus.yml`
95
19
96
-
# Override the global default and scrape targets from this job every 5 seconds.
97
-
scrape_interval: 5s
20
+
### Services
98
21
99
-
static_configs:
100
-
- targets: ['prometheus:9090']
22
+
Start services using Docker Compose or Podman Compose.
23
+
If you use Podman, replace `docker` with `podman` (or enable the podman‑docker
[Monitoring a self-managed CrateDB cluster with Prometheus and Grafana]: https://community.cratedb.com/t/monitoring-a-self-managed-cratedb-cluster-with-prometheus-and-grafana/1236
0 commit comments