Skip to content

Commit 6310bb6

Browse files
committed
Prometheus: Implement suggestions by CodeRabbit
1 parent f43d09e commit 6310bb6

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed

docs/integrate/prometheus/compose.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@ services:
1212
- "5432:5432"
1313
volumes:
1414
- cratedb-data:/data
15+
healthcheck:
16+
test: ["CMD", "curl", "-f", "http://localhost:4200/"]
17+
interval: 5s
18+
timeout: 30s
19+
retries: 5
1520
restart: unless-stopped
1621

1722
cratedb-ddl:

docs/integrate/prometheus/usage.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ docker compose up
3030
## Explore data
3131

3232
CrateDB stores the metrics in the designated table, ready for inspection and analysis.
33+
By default, the included `ddl.sql` creates the table `testdrive.metrics`.
3334
```shell
3435
docker compose exec cratedb crash -c "SELECT * FROM testdrive.metrics ORDER BY timestamp LIMIT 5;"
3536
```
@@ -44,22 +45,19 @@ Confirm that Prometheus monitors itself.
4445

4546
![Prometheus target details for the self-scrape job](https://us1.discourse-cdn.com/flex020/uploads/crate/original/1X/57ccb5374b0ab524466de08feefbafde559dac87.png)
4647

47-
Return to the CrateDB Admin UI and select the `metrics` table you created.
48+
Return to the CrateDB Admin UI at `http://localhost:4200` and select the `testdrive.metrics` table.
4849

49-
After a few minutes, Prometheus will have gathered a few thousands of data points.
50+
After a few minutes, Prometheus will have gathered a few thousand data points.
5051

5152
![CrateDB Admin UI showing the populated metrics table](https://us1.discourse-cdn.com/flex020/uploads/crate/original/1X/22e8c7d5a90ec9240a4cb4269774e143759aa92e.jpeg)
5253

5354
Use CrateDB’s query engine to analyze and visualize this data with tools
54-
like {ref}`grafana`, see also
55+
like {ref}`grafana`. See also
5556
[Monitoring a self-managed CrateDB cluster with Prometheus and Grafana].
5657

5758

5859
[CrateDB]: https://cratedb.com/database
5960
[CrateDB Prometheus Adapter]: https://github.com/crate/cratedb-prometheus-adapter
60-
[Docker Compose]: https://docs.docker.com/compose/
61-
[Docker containers]: https://www.docker.com/resources/what-container
62-
[Docker installation guide]: https://docs.docker.com/get-docker/
6361
[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
6462
[Prometheus]: https://prometheus.io/docs/introduction/overview/
6563
[Prometheus documentation]: https://prometheus.io/docs/prometheus/latest/getting_started/

0 commit comments

Comments
 (0)