Prometheus
The Prometheus monitoring system and time series database.
Ports
Add an allocation on the node for each port.
- Prometheus server 9090
Install
- Installer image
- ghcr.io/ptero-eggs/installers:debian
- Install script
- 24 lines
Image
- Debian ghcr.io/ptero-eggs/yolks:debian
Startup
The Panel runs this command to start the server. It replaces each variable in the command with the value of that variable.
2 variables
Startup command
./prometheus --web.listen-address=0.0.0.0:9090 --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=15dDotted values come from the server settings. These values are examples.
The version of Prometheus to install. By default the latest version is being installed.
PROMETHEUS_VERSIONUsers can edit
required|string|max:20
How long the data is being saved
DATA_SAVE_TIMEUsers can edit
required|string|max:10
Wings
- Stop command
- ^C (SIGINT)
- Running when the console shows
- Server is ready to receive web requests.
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 |
Changes
- Update prometheus install image
· Daniel Barton · a440515
- add prometheus
· Red Banana · e7d8b74
- Delete monitoring/prometheus/egg-prometheus.json
· Red Banana · 8735a85
- added prometheus
· Red Banana · 7bd059c
Problem with this egg?
Open an issue on GitHub. Include your Panel and Wings versions.
Install script 24 lines bash in ghcr.io/ptero-eggs/installers:debian Show Hide
#!/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