Loki

applications
Report Issue

Prometheus but for logs. This egg is for Loki instance only! You usually need pushing agents like Promtail to put logs in this

Contributors:
README

Loki

From the Loki GitHub repository

Loki is a horizontally-scalable, highly-available, multi-tenant log aggregation system inspired by Prometheus. It is designed to be very cost effective and easy to operate.

Working with Loki

To get logs "into" Loki you need a scrape agent, such as official Promtail or a library for your app that can push logs through HTTP endpoint (gRPC endpoint is disabled in Docker enviroment by default)

Resource consumption

As this egg sets up Loki in single node mode, it can consume a lot of disk space really fast. It is possible to setup different kind of storages for different parts of Loki files. For further information refer to official Loki documentation.

To get started, you can go with a minimum of 3GB RAM and >=2.5GB disk space.

Keep in mind that those numbers can grow pretty quick!

Server Ports

Ports required to run the server in a table format.

Port default
Loki server 3100
Docker Images (1)
Name Image
ghcr.io/ptero-eggs/yolks:debian ghcr.io/ptero-eggs/yolks:debian
Startup Command
./loki-linux -config.file=loki-docker-config.yaml
Variables (1)

Loki Version

The version of Loki to use. Find all versions from https://github.com/grafana/loki

Environment:
LOKI_VERSION
Default:
latest
User Viewable:
User Editable:
Rules:
required|string|max:20
Installation Script
Container: ghcr.io/pterodactyl/installers:debian
Entrypoint: bash
#!/bin/bash
# Switch to mounted working install directory
cd /mnt/server

apt update
apt install -y zip unzip wget curl git file
ARCH=$([[ "$(uname -m)" == "x86_64" ]] && echo "amd64" || echo "arm64")
# Download and extract Loki

if [ "$LOKI_VERSION" = "latest" ]; then LOKI_VERSION=$(curl --silent "https://api.github.com/repos/grafana/loki/releases/latest" | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/' | cut -c2-); fi
echo -e "running curl -L https://github.com/grafana/loki/releases/download/v${LOKI_VERSION}/loki-linux-${ARCH}.zip --output loki-linux-amd64.zip"
curl -L https://github.com/grafana/loki/releases/download/v${LOKI_VERSION}/loki-linux-${ARCH}.zip --output loki-linux-${ARCH}.zip
unzip loki-linux-${ARCH}.zip
rm -rf loki-linux-${ARCH}.zip
curl -L https://raw.githubusercontent.com/grafana/loki/v${LOKI_VERSION}/cmd/loki/loki-docker-config.yaml --output loki-docker-config.yaml
mv loki-linux-* loki-linux
echo -e "installation completed"