feat: rough minimum stack

This commit is contained in:
Marc 2024-05-30 23:53:46 -04:00
commit c1fdf192b2
Signed by: marc
GPG key ID: 048E042F22B5DC79
3 changed files with 39 additions and 0 deletions

14
README.md Normal file
View file

@ -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://<user>:<pwd>@<host>:<port>/postgres?sslmode=disable" \
--pod <pod-name> \
quay.io/prometheuscommunity/postgres-exporter
```

4
prometheus.yml Normal file
View file

@ -0,0 +1,4 @@
scrape_configs:
- job_name: 'postgres_exporter'
static_configs:
- targets: ['host.containers.internal:9187']

21
start.sh Executable file
View file

@ -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