Skip to content

Commit

Permalink
Add extra label to metric so similar hostnames don't collide
Browse files Browse the repository at this point in the history
  • Loading branch information
dgonzalezruiz committed Oct 16, 2018
1 parent 21b1a6a commit 7c8e1fd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion exporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ func (e *Exporter) collectNodes(nodes nodeMap, ch chan<- prometheus.Metric) erro
}
ch <- prometheus.MustNewConstMetric(
serfLanMembersStatus, prometheus.GaugeValue, float64(state),
node.Datacenter, node.NodeClass, node.Name, drain,
node.Datacenter, node.NodeClass, node.Name, node.ID, drain,
)

if !nodes.IsReady(node.ID) {
Expand Down
2 changes: 1 addition & 1 deletion nomad-exporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ var (
serfLanMembersStatus = prometheus.NewDesc(
prometheus.BuildFQName(namespace, "", "serf_lan_member_status"),
"Describe member state.",
[]string{"datacenter", "class", "node", "drain"}, nil,
[]string{"datacenter", "class", "node", "node_id", "drain"}, nil,
)
raftAppliedIndex = prometheus.NewDesc(
prometheus.BuildFQName(namespace, "", "raft_applied_index"),
Expand Down

0 comments on commit 7c8e1fd

Please sign in to comment.