Skip to content

Commit

Permalink
fixing duplicate services that are seperate only by casing (#321)
Browse files Browse the repository at this point in the history
* fixing duplicate services that are seperate only by casing

---------

Signed-off-by: flipyap <dhabedank8@gmail.com>
Signed-off-by: Dylan Scheidle <dhabedank8@gmail.com>
Co-authored-by: Ben Kochie <superq@gmail.com>
  • Loading branch information
flipyap and SuperQ authored Jul 31, 2024
1 parent d6a288d commit 55ecea7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/exporter/consul_exporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -509,6 +509,10 @@ func (e *Exporter) collectOneHealthSummary(ch chan<- prometheus.Metric, serviceN
break
}
}
if entry.Service.Service != serviceName {
level.Debug(e.logger).Log("msg", "Skipping service instance because its registered to %s but belongs to %s service registration", entry.Service.Service, serviceName)
break
}
ch <- prometheus.MustNewConstMetric(
serviceNodesHealthy, prometheus.GaugeValue, passing, entry.Service.ID, entry.Node.Node, entry.Service.Service,
)
Expand Down

0 comments on commit 55ecea7

Please sign in to comment.