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.

Port default
Prometheus server 9090
Yolks
NameTag
ghcr.io/ptero-eggs/yolks:debianghcr.io/ptero-eggs/yolks:debian
Variables
NameDescriptionEnvironment VariableDefault ValueUser ViewableUser Editable
Prometheus VersionThe version of Prometheus to install. By default the latest version is being installed.PROMETHEUS_VERSIONlatestYesYes
Data Save time in DaysHow long the data is being savedDATA_SAVE_TIME15dYesYes
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