diff --git a/collector/cluster_health.go b/collector/cluster_health.go index ec665f24..379efe34 100644 --- a/collector/cluster_health.go +++ b/collector/cluster_health.go @@ -50,7 +50,7 @@ type ClusterHealth struct { // NewClusterHealth returns a new Collector exposing ClusterHealth stats. func NewClusterHealth(logger log.Logger, client *http.Client, url *url.URL) *ClusterHealth { subsystem := "cluster_health" - constLabels := ConstLabelsFromURL(url) + constLabels := constLabelsFromURL(url) return &ClusterHealth{ logger: logger, diff --git a/collector/cluster_settings.go b/collector/cluster_settings.go index 70ecc35b..a6d301cf 100644 --- a/collector/cluster_settings.go +++ b/collector/cluster_settings.go @@ -26,7 +26,7 @@ type ClusterSettings struct { // NewClusterSettings defines Cluster Settings Prometheus metrics func NewClusterSettings(logger log.Logger, client *http.Client, url *url.URL) *ClusterSettings { - constLabels := ConstLabelsFromURL(url) + constLabels := constLabelsFromURL(url) return &ClusterSettings{ logger: logger, client: client, diff --git a/collector/const_labels.go b/collector/const_labels.go index 05801fbb..91b35294 100644 --- a/collector/const_labels.go +++ b/collector/const_labels.go @@ -6,7 +6,7 @@ import ( "github.com/prometheus/client_golang/prometheus" ) -func ConstLabelsFromURL(url *url.URL) prometheus.Labels { +func constLabelsFromURL(url *url.URL) prometheus.Labels { u := *url u.User = nil return map[string]string{ diff --git a/collector/indices.go b/collector/indices.go index 51eac9c6..92cb02d0 100644 --- a/collector/indices.go +++ b/collector/indices.go @@ -51,7 +51,7 @@ type Indices struct { // NewIndices defines Indices Prometheus metrics func NewIndices(logger log.Logger, client *http.Client, url *url.URL, shards bool) *Indices { - constLabels := ConstLabelsFromURL(url) + constLabels := constLabelsFromURL(url) indexLabels := labels{ keys: func(...string) []string { diff --git a/collector/indices_settings.go b/collector/indices_settings.go index 9da2c7f0..a68e9ea1 100644 --- a/collector/indices_settings.go +++ b/collector/indices_settings.go @@ -25,7 +25,7 @@ type IndicesSettings struct { // NewIndicesSettings defines Indices Settings Prometheus metrics func NewIndicesSettings(logger log.Logger, client *http.Client, url *url.URL) *IndicesSettings { - constLabels := ConstLabelsFromURL(url) + constLabels := constLabelsFromURL(url) return &IndicesSettings{ logger: logger, client: client, diff --git a/collector/nodes.go b/collector/nodes.go index 0c115924..79f1caab 100644 --- a/collector/nodes.go +++ b/collector/nodes.go @@ -170,7 +170,7 @@ type Nodes struct { // NewNodes defines Nodes Prometheus metrics func NewNodes(logger log.Logger, client *http.Client, url *url.URL, all bool, node string) *Nodes { - constLabels := ConstLabelsFromURL(url) + constLabels := constLabelsFromURL(url) return &Nodes{ logger: logger, client: client, diff --git a/collector/snapshots.go b/collector/snapshots.go index 79045baa..ee3cf31f 100644 --- a/collector/snapshots.go +++ b/collector/snapshots.go @@ -52,7 +52,7 @@ type Snapshots struct { // NewSnapshots defines Snapshots Prometheus metrics func NewSnapshots(logger log.Logger, client *http.Client, url *url.URL) *Snapshots { - constLabels := ConstLabelsFromURL(url) + constLabels := constLabelsFromURL(url) return &Snapshots{ logger: logger, client: client,