From eefd2ccc22f34cce6f83d9d2603d9b2e7e7f52b7 Mon Sep 17 00:00:00 2001 From: Jochem <33828672+TheChef23@users.noreply.github.com> Date: Tue, 7 May 2024 17:05:08 +0200 Subject: [PATCH] Introduce 'status' label into metrics (#13) * Introdcue 'status' label to pingdom_uptime_status and pingdom_uptime_response_time_seconds to reflect other status from pingdom API * Updare golang --- cmd/pingdom-exporter/main.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cmd/pingdom-exporter/main.go b/cmd/pingdom-exporter/main.go index d296c81..48e40a5 100644 --- a/cmd/pingdom-exporter/main.go +++ b/cmd/pingdom-exporter/main.go @@ -42,13 +42,13 @@ var ( pingdomCheckStatusDesc = prometheus.NewDesc( "pingdom_uptime_status", "The current status of the check (1: up, 0: down)", - []string{"id", "name", "hostname", "resolution", "paused", "tags"}, nil, + []string{"id", "name", "hostname", "status", "resolution", "paused", "tags"}, nil, ) pingdomCheckResponseTimeDesc = prometheus.NewDesc( "pingdom_uptime_response_time_seconds", "The response time of last test, in seconds", - []string{"id", "name", "hostname", "resolution", "paused", "tags"}, nil, + []string{"id", "name", "hostname", "status", "resolution", "paused", "tags"}, nil, ) pingdomOutagesDesc = prometheus.NewDesc( @@ -165,6 +165,7 @@ func (pc pingdomCollector) Collect(ch chan<- prometheus.Metric) { id, check.Name, check.Hostname, + check.Status, resolution, paused, tags, @@ -177,6 +178,7 @@ func (pc pingdomCollector) Collect(ch chan<- prometheus.Metric) { id, check.Name, check.Hostname, + check.Status, resolution, paused, tags,