commit c1fdf192b2bd2066ab09b88cdae27dfd446aa3cb Author: Marc Cataford Date: Thu May 30 23:53:46 2024 -0400 feat: rough minimum stack diff --git a/README.md b/README.md new file mode 100644 index 0000000..00dee95 --- /dev/null +++ b/README.md @@ -0,0 +1,14 @@ +# Panopticon + +## Onboarding databases + +Add the following to the pod in which the database runs. Port 9187 is exposed by default by the exporter and should be mapped. + +The port and exporter address should be included in `prometheus.yml`. + +``` +podman run -d \ + -e DATA_SOURCE_NAME="postgresql://:@:/postgres?sslmode=disable" \ + --pod \ + quay.io/prometheuscommunity/postgres-exporter +``` diff --git a/prometheus.yml b/prometheus.yml new file mode 100644 index 0000000..18f6cb0 --- /dev/null +++ b/prometheus.yml @@ -0,0 +1,4 @@ +scrape_configs: + - job_name: 'postgres_exporter' + static_configs: + - targets: ['host.containers.internal:9187'] diff --git a/start.sh b/start.sh new file mode 100755 index 0000000..a5d3d4c --- /dev/null +++ b/start.sh @@ -0,0 +1,21 @@ +#!/bin/bash + +podman pod create \ + -p 3000:3000 \ + -p 9187:9187 \ + -p 9090:9090 \ + --replace \ + panopticon + +podman run -d \ + --name=grafana \ + --replace \ + --pod panopticon \ + grafana/grafana + +podman run \ + --name prometheus \ + -d \ + --replace \ + --pod panopticon \ + -v ./prometheus.yml:/etc/prometheus/prometheus.yml prom/prometheus