From 054b25484cbe01d3af702cd1cee321f327c4466f Mon Sep 17 00:00:00 2001 From: DmitriyA Date: Mon, 19 Jan 2026 06:29:59 -0500 Subject: [PATCH] added env variable --- .env | 1 + src/prometheus/prometheus.service.ts | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.env b/.env index 2575902..09c89bf 100644 --- a/.env +++ b/.env @@ -1,5 +1,6 @@ # Прометеус PROMETHEUS_API=http://192.168.2.34:9090/api/v1 +PROMETHEUS_INSTANCE=192.168.2.34:9050 FRONTEND_URL=http://localhost:5173 diff --git a/src/prometheus/prometheus.service.ts b/src/prometheus/prometheus.service.ts index 3388095..ab906fb 100644 --- a/src/prometheus/prometheus.service.ts +++ b/src/prometheus/prometheus.service.ts @@ -168,7 +168,7 @@ export class PrometheusService { ): Promise { const query = this.queryService.buildFilteredQuery(metric, { ...filters, - instance: '192.168.2.34:9050' + instance: process.env.PROMETHEUS_INSTANCE || "" }); const optimalStep = this.queryService.calculateOptimalStep(start, end); -- 2.40.1