From 8dbd030a0874db682bc1a2ca8f7123e7933c6012 Mon Sep 17 00:00:00 2001 From: Diretnan Domnan Date: Sun, 6 Nov 2022 20:43:12 +0100 Subject: [PATCH] Add metric to error message --- client/controller.go | 1 + client/messages.go | 1 + 2 files changed, 2 insertions(+) diff --git a/client/controller.go b/client/controller.go index 8d2abb2..d91af8a 100644 --- a/client/controller.go +++ b/client/controller.go @@ -106,6 +106,7 @@ func (hosts *HostsController) sendMetric(host config.Host, client *Client) { Message: ErrorMessage{ Error: errorContent, Host: host.Address, + Name: metric, }, Error: true, } diff --git a/client/messages.go b/client/messages.go index 7d13657..b761096 100644 --- a/client/messages.go +++ b/client/messages.go @@ -8,6 +8,7 @@ type SendMessage struct { type ErrorMessage struct { Host string Error string + Name string } type Message struct {