From 2894a4112290b841c10f37ebc5ea22c549c7824a Mon Sep 17 00:00:00 2001 From: Marius Sturm Date: Thu, 12 Jul 2018 14:51:34 +0200 Subject: [PATCH] Check for empty node id (cherry picked from commit 94d2a4eb81b57163f378ed79a0be566dc0c93a22) --- context/context.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/context/context.go b/context/context.go index 9a3ad18..b56a993 100644 --- a/context/context.go +++ b/context/context.go @@ -69,6 +69,9 @@ func (ctx *Ctx) LoadConfig(path *string) error { log.Fatal("No node ID was configured.") } ctx.NodeId = common.GetCollectorId(ctx.UserConfig.NodeId) + if ctx.NodeId == "" { + log.Fatal("Empty node-id, exiting! Make sure a valid id is configured.") + } // node_name if ctx.UserConfig.NodeName == "" {