Skip to content
This repository has been archived by the owner on Apr 29, 2024. It is now read-only.

Commit

Permalink
fix: split probe labels
Browse files Browse the repository at this point in the history
  • Loading branch information
eliobischof committed Mar 25, 2020
1 parent 34b3010 commit 0f66a29
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ var probes = prometheus.NewGaugeVec(
Name: "probe",
Help: "Load Balancing Probes.",
},
[]string{"target"},
[]string{"name", "type", "target"},
)

func init(){
Expand Down Expand Up @@ -322,7 +322,9 @@ func probe(probeType, ip string, port uint16, hc HealthChecks, source Source) {
success = 1
}
probes.With(prometheus.Labels{
"target": fmt.Sprintf("%s %s (%s)", source.Name, probeType, vipProbe),
"name": source.Name,
"type": probeType,
"target": vipProbe,
}).Set(success)
}

Expand Down

0 comments on commit 0f66a29

Please sign in to comment.