Prometheus VM

Documenting the setup of my Prometheus VM

Where?

It runs in a 2 vCPU 2 GB RAM proxmox VM with Ubuntu 20.04. The proxmox host is an old laptop.

What?

Data manager VM for collecting prometheus data that can be ingested by the Grafana instance running in my Home Assistant instance.

How?

Original creation:

docker run --name prometheus -d -p 9090:9090 -v /home/myuser/configs:/etc/prometheus prom/prometheus --config.file=/etc/prometheus/prometheus.yml --web.config.file=/etc/prometheus/web-config.yml

The context:

~/configs$ ls
prometheus.crt  prometheus.key  prometheus.yml  web-config.yml

prometheus.yml:

global:
  scrape_interval: 15s
  evaluation_interval: 30s
  # scrape_timeout …

I Broke My Media Volume

Does it work yet?

Image?

If you can see this, it means I figured out how to solve the problem with my nginx container being unable to read the media volume from my Django/Wagtail container.

disable_chat_files.png

From my nginx logs:

2022/05/10 00:01:28 [error] 34#34: *4 open() "/app/media/images/disable_chat_files.width-800.png" failed (13: Permission denied), client: 69.162.230.182, server: averyuslaner.com, request: "GET /media/images/disable_chat_files.width-800.png HTTP/2.0", host: "averyuslaner.com", referrer: "https://averyuslaner.com/i-broke-my-media-volume/"

The static and media volumes are mounted to /app inside the nginx container. Their permissions:

root@e7b004ccbbb5:/# ls …