Prometheus

Applications
Report Issue

The Prometheus monitoring system and time series database.

Contributors:
README

Prometheus

From the Prometheus GitHub repository

The Prometheus monitoring system and time series database.

Resource consumption

As Prometheus is a monitoring software that saves data in a timeseries database, it can take up massive amounts of disk space. Due to Prometheus design, a huge memory consumption is also possible. To get started, a minimum of 3GB RAM and >=2.5GB disk space is recommended. Keep in mind that those numbers can grow pretty quick for large monitored environments!

Server Ports

Ports required to run the server in a table format.

Port default
Prometheus server 9090
Docker Images (1)
Name Image
ghcr.io/ptero-eggs/yolks:debian ghcr.io/ptero-eggs/yolks:debian
Startup Command
./prometheus --web.listen-address=0.0.0.0:{{SERVER_PORT}} --config.file=/home/container/prometheus.yml --storage.tsdb.path=/home/container/data --web.console.templates=/home/container/consoles --web.console.libraries=/home/container/console_libraries --web.config.file=/home/container/prometheus.web.yml --storage.tsdb.retention.time={{DATA_SAVE_TIME}}
Variables (2)

Prometheus Version

The version of Prometheus to install. By default the latest version is being installed.

Environment:
PROMETHEUS_VERSION
Default:
latest
User Viewable:
User Editable:
Rules:
required|string|max:20

Data Save time in Days

How long the data is being saved

Environment:
DATA_SAVE_TIME
Default:
15d
User Viewable:
User Editable:
Rules:
required|string|max:10
Installation Script
Container: ghcr.io/ptero-eggs/installers:debian
Entrypoint: bash
#!/bin/sh
shopt -s extglob
# Switch to mounted directory
cd /mnt/server
# Update installation system and install curl
apt-get update
apt-get install -y curl
ARCH=$([[ "$(uname -m)" == "x86_64" ]] && echo "amd64" || echo "arm64")
# Cleanup previous install if available
if [ -f "prometheus.yml" ]; then mv prometheus.yml prometheus.yml.bak; fi
if [ -f "prometheus.web.yml" ]; then mv prometheus.web.yml prometheus.web.yml.bak; fi
rm -rfv !(data|prometheus.yml.bak|prometheus.web.yml.bak)
# Download and extract Prometheus
version=${PROMETHEUS_VERSION}
if [ "$version" = "latest" ]; then version=$(curl --silent "https://api.github.com/repos/prometheus/prometheus/releases/latest" | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/' | cut -c2-); fi
curl -L https://github.com/prometheus/prometheus/releases/download/v${version}/prometheus-${version}.linux-${ARCH}.tar.gz --output prometheus.tar.gz
tar -zxvf prometheus.tar.gz
mv -n prometheus-*/* ./
rm -rf prometheus.tar.gz prometheus-*/
# Restore configuration if necessary
if [ -f "prometheus.yml.bak" ]; then rm -rf prometheus.yml && mv prometheus.yml.bak prometheus.yml && rm -rf prometheus.yml.bak; fi
if [ -f "prometheus.web.yml.bak" ]; then rm -rf prometheus.web.yml && mv prometheus.web.yml.bak prometheus.web.yml && rm -rf prometheus.web.yml.bak; fi
# Create dummy prometheus.web.yml as a placeholder
if [ ! -f "prometheus.web.yml" ]; then touch prometheus.web.yml; fi