From 6cbe080957759bb7654a27e1557fe874801f7946 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gabriel=20D=C3=ADaz?= Date: Wed, 13 Mar 2019 14:51:12 +0100 Subject: [PATCH] wip: change alertsUrl endPoint in commands and tests --- cmd/agent_monitor.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cmd/agent_monitor.go b/cmd/agent_monitor.go index a8a2a3c3e..1fd5b3d6c 100644 --- a/cmd/agent_monitor.go +++ b/cmd/agent_monitor.go @@ -43,17 +43,17 @@ func newAgentMonitorCommand(ctx *cmdContext, config gossip.Config, agentPreRun f // Bindings monitorConfig.MetricsAddr = config.BindAddr // TODO: make MetricsAddr configurable monitorConfig.QEDUrls = v.GetStringSlice("agent.server_urls") - monitorConfig.PubUrls = v.GetStringSlice("agent.alert_urls") + monitorConfig.AlertsUrls = v.GetStringSlice("agent.alerts_urls") markSliceStringRequired(monitorConfig.QEDUrls, "qedUrls") - markSliceStringRequired(monitorConfig.PubUrls, "pubUrls") + markSliceStringRequired(monitorConfig.AlertsUrls, "alertsUrls") }, Run: func(cmd *cobra.Command, args []string) { config.Role = member.Monitor monitorConfig.APIKey = ctx.apiKey - monitor, err := monitor.NewMonitor(*monitorConfig) + monitor, err := monitor.NewMonitor(monitorConfig) if err != nil { log.Fatalf("Failed to start the QED monitor: %v", err) } @@ -77,7 +77,7 @@ func newAgentMonitorCommand(ctx *cmdContext, config gossip.Config, agentPreRun f f := cmd.Flags() f.StringSliceVarP(&monitorConfig.QEDUrls, "qedUrls", "", []string{}, "Comma-delimited list of QED servers ([host]:port), through which a monitor can make queries") - f.StringSliceVarP(&monitorConfig.PubUrls, "pubUrls", "", []string{}, "Comma-delimited list of QED servers ([host]:port), through which an monitor can publish alerts") + f.StringSliceVarP(&monitorConfig.AlertsUrls, "alertsUrls", "", []string{}, "Comma-delimited list of QED servers ([host]:port), through which an monitor can publish alerts") // Lookups v.BindPFlag("agent.server_urls", f.Lookup("qedUrls"))