Egg Repository

Pterodactyl Community Egg Repository

Grafana

The open and composable observability and data visualization platform. Visualize metrics, logs, and traces from multiple sources like Prometheus, Loki, Elasticsearch, InfluxDB, Postgres and many more.

Read Me

Grafana

From the Grafana GitHub

The open and composable observability and data visualization platform. Visualize metrics, logs, and traces from multiple sources like Prometheus, Loki, Elasticsearch, InfluxDB, Postgres and many more.

Initial credentials

After the first start of Grafana, you can login using the following credentials:

  • Username: admin
  • Password: admin

Update support

The egg should keep the data and conf folder when reinstalling. Therefore a reinstallation with "latest" as the selected version can be used to update Grafana.

If you want to reset the server completly, remove the conf and data directories manually before reinstalling.

Server Ports

Ports required to run the server in a table format.

Portdefault
Webinterface3000
Yolks
NameTag
ghcr.io/ptero-eggs/yolks:debianghcr.io/ptero-eggs/yolks:debian
Variables
NameDescriptionEnvironment VariableDefault ValueUser ViewableUser Editable
Grafana VersionThe version of Grafana to install. By default the latest version is being installed.GRAFANA_VERSIONlatestYesYes
Grafana PluginsA list of Grafana plugins that should be installed. Enter the plugins comma separated (e. g. a,b,c).grafana_pluginsYesYes
Install Script
#!/bin/bash
shopt -s extglob

# Switch to mounted directory
mkdir -p /mnt/server
cd /mnt/server

# Update installation system and install curl
apt-get update
apt-get install -y curl

# Cleanup previous install if available
if [ -d "conf" ]; then mv conf conf.bak; fi
rm -rfv !(conf.bak|data)

# Download and extract Grafana
ARCH=$([[ "$(uname -m)" == "x86_64" ]] && echo "amd64" || echo "arm64")

version=${GRAFANA_VERSION}
if [ "$version" = "latest" ]; then version=$(curl --silent "https://api.github.com/repos/grafana/grafana/releases/latest" | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/' | cut -c2-); fi
curl https://dl.grafana.com/oss/release/grafana-${version}.linux-${ARCH}.tar.gz --output grafana.tar.gz
tar -zxvf grafana.tar.gz
mv -n grafana-*/* ./
rm -rf grafana.tar.gz grafana-*/

# Restore configuration if necessary
if [ -d "conf.bak" ]; then rm -rf conf && mv conf.bak conf && rm -rf conf.bak; fi

# Update existing plugins and install Grafana plugins
if [ ! -z "${GRAFANA_PLUGINS}" ]; then
for v in $(tr ',' '\n' <<< "${GRAFANA_PLUGINS}") ; do ./bin/grafana-cli --pluginsDir="/mnt/server/data/plugins" plugins install "$v" ; done
fi

echo "-----------------------------------------"
echo "Installation completed..."
echo "-----------------------------------------