From fb3c2e2952ec64898706673ccd0a764bd438fbdd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Masum=20G=C3=B6ky=C3=BCz?= <121493635+periakteon@users.noreply.github.com> Date: Sun, 26 Oct 2025 02:38:41 +0300 Subject: [PATCH] =?UTF-8?q?feat(prometheus):=20add=20Prometheus=20monitori?= =?UTF-8?q?ng=20blueprint=20with=20Docker=20Com=E2=80=A6=20(#463)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat(prometheus): add Prometheus monitoring blueprint with Docker Compose, template, and metadata Introduced a new blueprint for Prometheus, including a Docker Compose setup, configuration template, SVG logo, and metadata entry for streamlined deployment and monitoring capabilities. * feat(prometheus): add configuration template for Prometheus monitoring Enhanced the Prometheus blueprint by adding a configuration template for prometheus.yml, defining global settings, scrape intervals, and example scrape configurations. This addition streamlines the setup process for users deploying Prometheus monitoring. * chore(prometheus): remove version specification from Docker Compose file Eliminated the version line from the Docker Compose configuration for Prometheus to streamline the setup and avoid potential compatibility issues with future Docker Compose versions. --- blueprints/prometheus/Prometheus.svg | 1 + blueprints/prometheus/docker-compose.yml | 14 +++++++ blueprints/prometheus/template.toml | 52 ++++++++++++++++++++++++ meta.json | 17 ++++++++ 4 files changed, 84 insertions(+) create mode 100644 blueprints/prometheus/Prometheus.svg create mode 100644 blueprints/prometheus/docker-compose.yml create mode 100644 blueprints/prometheus/template.toml diff --git a/blueprints/prometheus/Prometheus.svg b/blueprints/prometheus/Prometheus.svg new file mode 100644 index 00000000..18beef52 --- /dev/null +++ b/blueprints/prometheus/Prometheus.svg @@ -0,0 +1 @@ + diff --git a/blueprints/prometheus/docker-compose.yml b/blueprints/prometheus/docker-compose.yml new file mode 100644 index 00000000..e1016777 --- /dev/null +++ b/blueprints/prometheus/docker-compose.yml @@ -0,0 +1,14 @@ +services: + prometheus: + image: prom/prometheus:latest + restart: unless-stopped + command: + - "--config.file=/etc/prometheus/prometheus.yml" + - "--storage.tsdb.path=/prometheus" + - "--web.console.libraries=/usr/share/prometheus/console_libraries" + - "--web.console.templates=/usr/share/prometheus/consoles" + - "--web.enable-lifecycle" + volumes: + - prometheus-data:/prometheus +volumes: + prometheus-data: {} diff --git a/blueprints/prometheus/template.toml b/blueprints/prometheus/template.toml new file mode 100644 index 00000000..535663dc --- /dev/null +++ b/blueprints/prometheus/template.toml @@ -0,0 +1,52 @@ +[variables] +main_domain = "${domain}" + +[config] +env = [] + +[[config.domains]] +serviceName = "prometheus" +port = 9_090 +host = "${main_domain}" + +[[config.mounts]] +filePath = "/etc/prometheus/prometheus.yml" +serviceName = "prometheus" +content = """ +# Prometheus Configuration +# https://prometheus.io/docs/prometheus/latest/configuration/configuration/ + +global: + scrape_interval: 15s + evaluation_interval: 15s + external_labels: + monitor: 'dokploy-prometheus' + +# Alertmanager configuration (optional) +# alerting: +# alertmanagers: +# - static_configs: +# - targets: +# - 'alertmanager:9093' + +# Load rules once and periodically evaluate them +# rule_files: +# - "alerts.yml" + +# Scrape configurations +scrape_configs: + # Prometheus self-monitoring + - job_name: 'prometheus' + static_configs: + - targets: ['localhost:9090'] + + # Example: Add your own targets here + # - job_name: 'node_exporter' + # static_configs: + # - targets: ['node-exporter:9100'] + + # - job_name: 'docker' + # static_configs: + # - targets: ['docker-host:9323'] +""" + diff --git a/meta.json b/meta.json index 058fa3e4..513b260c 100644 --- a/meta.json +++ b/meta.json @@ -4431,6 +4431,23 @@ ], "dokploy_version": "<0.22.5" }, + { + "id": "prometheus", + "name": "Prometheus", + "version": "latest", + "description": "Prometheus is an open-source monitoring and alerting toolkit designed for reliability and scalability.", + "logo": "Prometheus.svg", + "links": { + "github": "https://github.com/prometheus/prometheus", + "website": "https://prometheus.io/", + "docs": "https://prometheus.io/docs/introduction/overview/" + }, + "tags": [ + "monitoring", + "alerting", + "metrics" + ] + }, { "id": "pterodactyl", "name": "Pterodactyl",