]> piware.de Git - learn-metrics.git/commitdiff
Run unconfigured grafana and prometheus containers
authorMartin Pitt <martin@piware.de>
Fri, 21 May 2021 06:08:03 +0000 (08:08 +0200)
committerMartin Pitt <martin@piware.de>
Fri, 21 May 2021 06:16:37 +0000 (08:16 +0200)
Start with `./launch.sh`, tear down with `podman pod rm -f learn-metrics`.

Prometheus explorer at http://localhost:3001 (to avoid port conflict
with Cockpit). It can list or graph simple queries like
`go_memstats_heap_objects` or `go_memstats_heap_objects[5min]`.

Metrics source at <http://localhost:3001/metrics>
<http://metrics-prometheus:9090/metrics> (in grafana container).

Grafana UI at <http://localhost:3000>, log in as admin:foobar. Manually
add Prometheus data source at <http://metrics-prometheus:9090/metrics>.

This fails with "HTTP Error Not Found" with "Server" access (which is
usually what you want -- "Browser" access fails on CORS).

launch.sh [new file with mode: 0755]

diff --git a/launch.sh b/launch.sh
new file mode 100755 (executable)
index 0000000..8f0dc79
--- /dev/null
+++ b/launch.sh
@@ -0,0 +1,4 @@
+#!/bin/sh
+set -eux
+podman run -d --pod new:learn-metrics --name metrics-grafana -p 3000:3000 -p 3001:9090 -e GF_SECURITY_ADMIN_PASSWORD=foobar quay.io/bitnami/grafana
+podman run -d --pod learn-metrics --name metrics-prometheus docker.io/prom/prometheus