Skip to content

Commit

Permalink
Introduce 'status' label into metrics (#13)
Browse files Browse the repository at this point in the history
* Introdcue 'status' label to pingdom_uptime_status and pingdom_uptime_response_time_seconds to reflect other status from pingdom API

* Updare golang
  • Loading branch information
TheChef23 committed May 7, 2024
1 parent 628575c commit eefd2cc
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions cmd/pingdom-exporter/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -165,6 +165,7 @@ func (pc pingdomCollector) Collect(ch chan<- prometheus.Metric) {
id,
check.Name,
check.Hostname,
check.Status,
resolution,
paused,
tags,
Expand All @@ -177,6 +178,7 @@ func (pc pingdomCollector) Collect(ch chan<- prometheus.Metric) {
id,
check.Name,
check.Hostname,
check.Status,
resolution,
paused,
tags,
Expand Down

0 comments on commit eefd2cc

Please sign in to comment.