diff --git a/api/prometheus/v1/api.go b/api/prometheus/v1/api.go index 1ff4402..b98c075 100644 --- a/api/prometheus/v1/api.go +++ b/api/prometheus/v1/api.go @@ -327,7 +327,7 @@ type Alert struct { Annotations model.LabelSet Labels model.LabelSet State AlertState - Value float64 + Value string } // TargetsResult contains the result from querying the targets endpoint. diff --git a/api/prometheus/v1/api_test.go b/api/prometheus/v1/api_test.go index 0e24b49..9a58272 100644 --- a/api/prometheus/v1/api_test.go +++ b/api/prometheus/v1/api_test.go @@ -493,7 +493,7 @@ func TestAPIs(t *testing.T) { "severity": "page", }, "state": "firing", - "value": 1, + "value": "1e+00", }, }, "annotations": map[string]interface{}{ @@ -537,7 +537,7 @@ func TestAPIs(t *testing.T) { "severity": "page", }, State: AlertStateFiring, - Value: 1, + Value: "1e+00", }, }, Annotations: model.LabelSet{