From ded69c11ff1b2ca1ab80196bee7500ed76d05ec7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Mierzwa?= Date: Thu, 25 Jan 2018 19:34:35 -0800 Subject: [PATCH] Drop the path from v0.4 query args This results in requests to 'GET http://localhost:9093/api/v1/silences?api/v1/silences?limit=2147483647' instead of 'GET http://localhost:9093/api/v1/silences?limit=2147483647'. Too much copy&paste. --- internal/mapper/v04/silences.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/mapper/v04/silences.go b/internal/mapper/v04/silences.go index 5ca14a1b..f90d471c 100644 --- a/internal/mapper/v04/silences.go +++ b/internal/mapper/v04/silences.go @@ -58,7 +58,7 @@ func (m SilenceMapper) AbsoluteURL(baseURI string) (string, error) { func (m SilenceMapper) QueryArgs() string { // Alertmanager 0.4 uses pagination for silences, pass a huge value so that // we get all possible silences - return fmt.Sprintf("api/v1/silences?limit=%d", math.MaxInt32) + return fmt.Sprintf("limit=%d", math.MaxInt32) } // IsSupported returns true if given version string is supported