diff --git a/README.md b/README.md index f5bcacb..0449d05 100755 --- a/README.md +++ b/README.md @@ -187,8 +187,8 @@ Some metrics are not available with Artifactory OSS license. The exporter return | artifactory_system_license | License type and expiry as labels, seconds to expiration as value | `type`, `licensed_to`, `expires` | ✅ | | artifactory_system_version | Version and revision of Artifactory as labels. | `version`, `revision` | ✅ | | artifactory_federation_mirror_lag | Federation mirror lag in milliseconds. | `name`, `remote_url`, `remote_name` | | -| artifactory_federation_mirror_status | Federation mirror status. | `status`, `name`, `remote_url`, `remote_name` | | | artifactory_federation_unavailable_mirror | Unsynchronized federated mirror status. | `status`, `name`, `remote_url`, `remote_name` | | +| artifactory_federation_repo_status | Synchronization status of the Federation for a repository | `status`, `name`, `remote_url`, `remote_name` | | * Common labels: * `node_id`: Artifactory node ID that the metric is scraped from. diff --git a/collector/federation.go b/collector/federation.go index 25eb3a7..5dba1e9 100644 --- a/collector/federation.go +++ b/collector/federation.go @@ -84,7 +84,7 @@ func (e *Exporter) exportFederationRepoStatus(repoSummary []repoSummary, ch chan for _, mirrorEventsStatusInfo := range federationRepoStatus.MirrorEventsStatusInfo { level.Debug(e.logger).Log("msg", "Registering metric", "metric", "federationRepoStatus", "status", mirrorEventsStatusInfo.Status, "repo", repo, "remote_url", mirrorEventsStatusInfo.RemoteUrl, "remote_name", mirrorEventsStatusInfo.RemoteRepoKey) - ch <- prometheus.MustNewConstMetric(federationMetrics["repoStatus"], prometheus.GaugeValue, 1, mirrorEventsStatusInfo.Status, repo, mirrorEventsStatusInfo.RemoteUrl, mirrorEventsStatusInfo.RemoteRepoKey, federationRepoStatus.NodeId) + ch <- prometheus.MustNewConstMetric(federationMetrics["repoStatus"], prometheus.GaugeValue, 1, strings.ToLower(mirrorEventsStatusInfo.Status), repo, strings.ToLower(mirrorEventsStatusInfo.RemoteUrl), mirrorEventsStatusInfo.RemoteRepoKey, federationRepoStatus.NodeId) } } return nil