From df55dc796fd572858c4cbebd5f8c3487c8950f90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dominik=20S=C3=BC=C3=9F?= Date: Tue, 7 Nov 2023 16:05:59 +0100 Subject: [PATCH] fix: add label to prometheus.export.unix --- src/components/ConfigurationWizard/sources/LinuxNode.ts | 4 ++-- src/components/ExamplesCatalog/examples.tsx | 4 ++-- src/lib/components.ts | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/components/ConfigurationWizard/sources/LinuxNode.ts b/src/components/ConfigurationWizard/sources/LinuxNode.ts index 32331fd..622ccb1 100644 --- a/src/components/ConfigurationWizard/sources/LinuxNode.ts +++ b/src/components/ConfigurationWizard/sources/LinuxNode.ts @@ -13,13 +13,13 @@ const LinuxNode = { let out = ""; if (d.metrics.enabled) { out += `prometheus.scrape "linux_node" { - targets = prometheus.exporter.unix.targets + targets = prometheus.exporter.unix.node.targets forward_to = [ ${d.metrics.receiver}, ] } -prometheus.exporter.unix { +prometheus.exporter.unix "node" { } `; diff --git a/src/components/ExamplesCatalog/examples.tsx b/src/components/ExamplesCatalog/examples.tsx index 77dcdb8..5496305 100644 --- a/src/components/ExamplesCatalog/examples.tsx +++ b/src/components/ExamplesCatalog/examples.tsx @@ -108,13 +108,13 @@ otelcol.receiver.otlp "default" { } prometheus.scrape "default" { - targets = prometheus.exporter.unix.targets + targets = prometheus.exporter.unix.node.targets forward_to = [ module.git.grafana_cloud.exports.metrics_receiver, ] } -prometheus.exporter.unix { +prometheus.exporter.unix "node" { } loki.relabel "journal" { diff --git a/src/lib/components.ts b/src/lib/components.ts index d27e8b8..78e88d4 100644 --- a/src/lib/components.ts +++ b/src/lib/components.ts @@ -325,7 +325,7 @@ export const KnownComponents: Record = { }), "prometheus.exporter.unix": new ComponentType({ allowEmpty: true, - multi: false, + multi: true, exports: { targets: "list(Target)", },