From 3b5e0818f0b8c6192d5511e7b392af30dbe06043 Mon Sep 17 00:00:00 2001 From: Pouyan Azari Date: Tue, 17 Dec 2019 08:50:05 +0100 Subject: [PATCH] some small tweaks --- alertmanager_input.go | 2 +- main.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/alertmanager_input.go b/alertmanager_input.go index 66d53a1..7540d9e 100644 --- a/alertmanager_input.go +++ b/alertmanager_input.go @@ -12,5 +12,5 @@ type AlertManagerEmailNotifier struct { /// getReceiverName Returns the receiver name func (alertManagerEmailNotifier *AlertManagerEmailNotifier) getReceiverName() string { - return fmt.Sprintf("dynamic-%s-%s-receiver", alertManagerEmailNotifier.Group, alertManagerEmailNotifier.Name) + return fmt.Sprintf("dynamic-%s-email-%s", alertManagerEmailNotifier.Group, alertManagerEmailNotifier.Name) } diff --git a/main.go b/main.go index ee4a168..037ee71 100644 --- a/main.go +++ b/main.go @@ -227,7 +227,7 @@ func createPrometheusHosts( labels.Job = fmt.Sprintf("%v", prometheusJobName) } if prometheusPort, ok := promSingleNode.(map[string]interface{})["port"]; ok { - target := fmt.Sprintf("%s:%.0f", labels.Host, prometheusPort) + target := fmt.Sprintf("%s:%.0f", labels.IP, prometheusPort) targets = append(targets, target) } prometheusHost.Labels = labels