Commit Graph

24 Commits

Author SHA1 Message Date
Bryan Boreham 8fbbc9bc6b Decode JSON body when Prometheus returns 400 to an api call
400 and 422 are documented error codes from Prometheus, so we should
attempt to parse the error returned for both of them.

Needed to change a test that was requiring the old behaviour - made it
use 500 instead of 400.

Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
2018-06-04 10:35:16 +00:00
Bob Shannon 335dadb61a PR comments
Signed-off-by: Bob Shannon <bshannon@palantir.com>
2018-04-12 06:49:52 -07:00
Bob Shannon e3e66d0bb9 PR comments
Signed-off-by: Bob Shannon <bshannon@palantir.com>
2018-04-11 07:38:50 -07:00
Bob Shannon fc258df5b5 Fix deep equal comparison for time.Time
Signed-off-by: Bob Shannon <bshannon@palantir.com>
2018-04-10 19:33:01 -07:00
Bob Shannon e035b26e30 Bump go version used in build
Signed-off-by: Bob Shannon <bshannon@palantir.com>
2018-04-10 18:44:17 -07:00
Bob Shannon 5393573c73 Implement AlertManager, Status, and Target methods
Signed-off-by: Bob Shannon <bshannon@palantir.com>
2018-04-10 07:21:46 -07:00
Bob Shannon 10dfec77bf Implement admin methods for Prometheus API
Signed-off-by: Bob Shannon <bshannon@palantir.com>
2018-04-09 21:03:46 -07:00
Vaisakh Rajagopal e06fadcc6f Replaced hardcoded arg('GET') with http.MethodGet constant 2018-02-23 00:53:19 +05:30
siddontang 3c0e2b3c2e v1: support series API 2017-11-24 20:12:53 +08:00
Ilia Choly a132856ffd Omit zero value query time 2017-11-16 16:39:52 -05:00
André Carvalho 8077e4bd69
api: fix typo in comments 2017-04-25 18:17:16 -03:00
André Carvalho 6fdb468212
api: add build tag for go 1.7 2017-04-24 18:05:17 -03:00
André Carvalho 11fae2ef0c
api: uses stdlib context 2017-04-20 09:57:46 -03:00
André Carvalho 349922b38c
api: creates versioned package for prometheus v1 api
This commit creates a new package to hold the prometheus
v1 API interface. This interface will contain all the funcionality
exposed by Prometheus v1 HTTP API.

The underlying http client is kept on the api package since it
may be reused across diferent API versions and also by the Alertmanager
api package (to come.)
2017-04-19 18:24:14 -03:00
André Carvalho 7b5f0fdaa9
api: fix godoc comment 2017-03-31 21:31:42 -03:00
André Carvalho 57f23d303f
api: returns specific type for label values 2017-03-31 21:29:30 -03:00
André Carvalho 123637b5ca
api: renames method for consistency 2017-03-31 21:07:16 -03:00
André Carvalho 8cb7769e36
api: stops ignoring errors creating requests 2017-03-31 21:05:08 -03:00
André Carvalho 2f33fabffe
api: adds label values query implementation
This commit adds a client side implementation for fetching label values
from prometheus api.
2017-03-31 19:42:19 -03:00
beorn7 c9325a4a67 Add goreport card and remove warnings where feasible 2016-09-16 19:59:04 +02:00
Michael Stapelberg 7b5f88727a api: document goroutine safeness 2016-08-01 00:11:57 +02:00
Mitsuhiro Tanda 67ee8ba510 support external-url 2016-02-23 21:23:58 +09:00
Fabian Reinartz f664cd7ea5 Use ctxhttp package for cancelable requests 2015-10-02 12:04:48 +02:00
Fabian Reinartz 2aae630ba8 Add initial HTTP API v1 package 2015-08-19 19:00:22 +02:00