Egg Repository

Pterodactyl Community Egg Repository

Prometheus

The Prometheus monitoring system and time series database.

Read Me

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.

Portdefault
Prometheus server9090
Yolks
NameTag
ghcr.io/ptero-eggs/yolks:debianghcr.io/ptero-eggs/yolks:debian
Variables and Startup

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

Prometheus Version

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

Environment Variable: PROMETHEUS_VERSION
Default Value: latest
User Viewable:
User Editable:
Data Save time in Days

How long the data is being saved

Environment Variable: DATA_SAVE_TIME
Default Value: 15d
User Viewable:
User Editable:
Install Script
#!/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
Installation Imageghcr.io/ptero-eggs/installers:debianInstallation Entrypointbash