{"meta":{"slug":"loki","name":"Loki","category":"monitoring","source":"pterodactyl","owner":"pterodactyl","repo":"application-eggs","branch":"main","path":"monitoring/loki/egg-loki.json","rawUrl":"https://raw.githubusercontent.com/pterodactyl/application-eggs/main/monitoring/loki/egg-loki.json","indexedAt":1792246788483},"egg":{"_comment":"DO NOT EDIT: FILE GENERATED AUTOMATICALLY BY PTERODACTYL PANEL - PTERODACTYL.IO","meta":{"version":"PTDL_v2","update_url":null},"exported_at":"2024-12-11T19:05:03+00:00","name":"Loki","author":"unknown@unknown.com","description":"Prometheus but for logs. This egg is for Loki instance only! You usually need pushing agents like Promtail to put logs in this","features":null,"docker_images":{"ghcr.io/ptero-eggs/yolks:debian":"ghcr.io/ptero-eggs/yolks:debian"},"file_denylist":[],"startup":"./loki-linux -config.file=loki-docker-config.yaml","config":{"files":"{\r\n    \"loki-docker-config.yaml\": {\r\n        \"parser\": \"yaml\",\r\n        \"find\": {\r\n            \"server.http_listen_port\": \"{{server.build.default.port}}\",\r\n            \"common.ring.instance_addr\": \"0.0.0.0\",\r\n            \"common.path_prefix\": \"/home/container/loki\",\r\n            \"common.storage.filesystem.chunks_directory\": \"/home/container/loki/chunks\",\r\n            \"common.storage.filesystem.rules_directory\": \"/home/container/loki/rules\"\r\n        }\r\n    }\r\n}","startup":"{\r\n    \"done\": \"Loki started\"\r\n}","logs":"{}","stop":"^C"},"scripts":{"installation":{"script":"#!/bin/bash\r\n# Switch to mounted working install directory\r\ncd /mnt/server\r\n\r\napt update\r\napt install -y zip unzip wget curl git file\r\nARCH=$([[ \"$(uname -m)\" == \"x86_64\" ]] && echo \"amd64\" || echo \"arm64\")\r\n# Download and extract Loki\r\n\r\nif [ \"$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\r\necho -e \"running curl -L https://github.com/grafana/loki/releases/download/v${LOKI_VERSION}/loki-linux-${ARCH}.zip --output loki-linux-amd64.zip\"\r\ncurl -L https://github.com/grafana/loki/releases/download/v${LOKI_VERSION}/loki-linux-${ARCH}.zip --output loki-linux-${ARCH}.zip\r\nunzip loki-linux-${ARCH}.zip\r\nrm -rf loki-linux-${ARCH}.zip\r\ncurl -L https://raw.githubusercontent.com/grafana/loki/v${LOKI_VERSION}/cmd/loki/loki-docker-config.yaml --output loki-docker-config.yaml\r\nmv loki-linux-* loki-linux\r\necho -e \"installation completed\"","container":"ghcr.io/pterodactyl/installers:debian","entrypoint":"bash"}},"variables":[{"name":"Loki Version","description":"The version of Loki to use.\r\n\r\nFind all versions from https://github.com/grafana/loki","env_variable":"LOKI_VERSION","default_value":"latest","user_viewable":true,"user_editable":true,"rules":"required|string|max:20","field_type":"text"}]},"readme":"# Loki\n\n## From the [Loki](https://github.com/grafana/loki) GitHub repository\n\nLoki 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.\n\n## Working with Loki\n\nTo get logs \"into\" Loki you need a scrape agent, such as official [Promtail](https://grafana.com/docs/loki/latest/clients/promtail/installation/) or a library for your app that can push logs through HTTP endpoint (gRPC endpoint is disabled in Docker enviroment by default)\n\n## Resource consumption\n\nAs 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](https://grafana.com/docs/loki/latest/operations/storage/).\n\nTo get started, you can go with a minimum of 3GB RAM and >=2.5GB disk space.\n\nKeep in mind that those numbers can grow pretty quick!\n\n## Server Ports\n\nPorts required to run the server in a table format.\n\n| Port        | default |\n|-------------|---------|\n| Loki server | 3100    |\n"}