Signed-off-by: Snehit Sah <snehitsah@protonmail.com>
This commit is contained in:
2025-09-14 19:02:59 +05:30
commit 7956017158
3 changed files with 36 additions and 0 deletions
View File
+13
View File
@@ -0,0 +1,13 @@
# prometheus.yml
global:
scrape_interval: 15s # How frequently to scrape targets by default.
evaluation_interval: 15s # How frequently to evaluate rules.
scrape_configs:
# Example: Scrape your custom application/service
# Replace 'your_app_name', 'your_app_host', and 'your_app_port'
- job_name: 'rest_api'
static_configs:
- targets: ['localhost:3001']
metrics_path: '/metrics'
Executable
+23
View File
@@ -0,0 +1,23 @@
#!/bin/bash
RELEASE=${1:-latest}
#docker pull docker.io/grafana/otel-lgtm:"${RELEASE}"
touch .env
docker run \
--name lgtm \
# -p 3000:3000 \
# -p 4317:4317 \
# -p 4318:4318 \
--rm \
-ti \
-v "$PWD"/container/grafana:/data/grafana \
-v "$PWD"/container/prometheus:/data/prometheus \
-v "$PWD"/container/loki:/data/loki \
-v ./prometheus.yml:/otel-lgtm/prometheus.yaml \
-e GF_PATHS_DATA=/data/grafana \
--env-file .env \
--net=host \
docker.io/grafana/otel-lgtm:"${RELEASE}"