From d2cb48a2ef82e9e6c2bf43cb2880aafe03365653 Mon Sep 17 00:00:00 2001 From: Ulric Qin Date: Thu, 9 Dec 2021 23:07:45 +0800 Subject: [PATCH] remove writer name --- docker/n9eetc/server.conf | 4 +--- etc/server.conf | 4 +--- src/server/writer/writer.go | 3 +-- 3 files changed, 3 insertions(+), 8 deletions(-) diff --git a/docker/n9eetc/server.conf b/docker/n9eetc/server.conf index 40ccac96..6a7e0e4a 100644 --- a/docker/n9eetc/server.conf +++ b/docker/n9eetc/server.conf @@ -150,7 +150,6 @@ QueuePopSize = 2000 SleepInterval = 50 [[Writers]] -Name = "prom" Url = "http://prometheus:9090/api/v1/write" # Basic auth username BasicAuthUser = "" @@ -169,13 +168,12 @@ MaxIdleConns = 100 MaxIdleConnsPerHost = 100 # [[Writers]] -# Name = "m3db" # Url = "http://m3db:7201/api/v1/prom/remote/write" # # Basic auth username # BasicAuthUser = "" # # Basic auth password # BasicAuthPass = "" -# timeout settings, unit: ms +# # timeout settings, unit: ms # Timeout = 30000 # DialTimeout = 10000 # TLSHandshakeTimeout = 30000 diff --git a/etc/server.conf b/etc/server.conf index 9403cfef..120bbe07 100644 --- a/etc/server.conf +++ b/etc/server.conf @@ -153,7 +153,6 @@ QueuePopSize = 2000 SleepInterval = 50 [[Writers]] -Name = "prom" Url = "http://127.0.0.1:9090/api/v1/write" # Basic auth username BasicAuthUser = "" @@ -172,13 +171,12 @@ MaxIdleConns = 100 MaxIdleConnsPerHost = 100 # [[Writers]] -# Name = "m3db" # Url = "http://127.0.0.1:7201/api/v1/prom/remote/write" # # Basic auth username # BasicAuthUser = "" # # Basic auth password # BasicAuthPass = "" -# timeout settings, unit: ms +# # timeout settings, unit: ms # Timeout = 30000 # DialTimeout = 10000 # TLSHandshakeTimeout = 30000 diff --git a/src/server/writer/writer.go b/src/server/writer/writer.go index 89ce8a76..58e1acca 100644 --- a/src/server/writer/writer.go +++ b/src/server/writer/writer.go @@ -16,7 +16,6 @@ import ( ) type Options struct { - Name string Url string BasicAuthUser string BasicAuthPass string @@ -181,7 +180,7 @@ func Init(opts []Options, globalOpt GlobalOpt) error { Client: cli, } - Writers.Put(opts[i].Name, writer) + Writers.Put(opts[i].Url, writer) } go Writers.Writes()