Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce 'status' label into metrics #13

Merged
merged 2 commits into from
May 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.19 AS build
FROM golang:1.22 AS build

WORKDIR /app
ADD . .
Expand Down
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