diff --git a/src/prometheus.service.ts b/src/prometheus.service.ts index eb685a1..2932f56 100644 --- a/src/prometheus.service.ts +++ b/src/prometheus.service.ts @@ -224,11 +224,14 @@ export class PrometheusService { } async fetchAllMetricsWithValues(): Promise { - const metricNames = await this.fetchAllMetrics(); - const promises = metricNames.map(async (metric) => { - const data = await this.fetchMetrics(metric); - return { metric, data }; - }); - return Promise.all(promises); - } + const metricNames = await this.fetchAllMetrics(); + const zvksMetrics = metricNames.filter(metric => metric.startsWith('zvks')); + + const promises = zvksMetrics.map(async (metric) => { + const data = await this.fetchMetrics(metric); + return { metric, data }; + }); + + return Promise.all(promises); +} }