peimanja / artifactory_exporter

JFrog Artifactory Prometheus Exporter written in Go
Apache License 2.0
141 stars 37 forks source link

Add Federated repository Status Metrics #92

Closed vgupta0309demonware closed 1 year ago

vgupta0309demonware commented 1 year ago

Feature Description

It would be awesome if the exporter could additionally monitor Federated repo statuses. https://www.jfrog.com/confluence/display/JFROG/Working+with+Federated+Repositories#WorkingwithFederatedRepositories-monitor_fed_repos

That information is already available via the Artifactory API:

GET api/Federation/status/repo/<example-repo-local>
GET api/Federation/status/mirrorsLag
GET api/federation/status/unavailableMirrors

API Doc: https://www.jfrog.com/confluence/display/JFROG/Artifactory+REST+API#ArtifactoryRESTAPI-GetFederatedRepositoryStatus

Use Case(s)

This would be great for monitoring the Federated repository Status to track any issues there.

vronnG commented 1 year ago

@peimanja Any timeline on when you will be able to get this functionality added ? Thanks for making this exporter and adding more functionalities.

peimanja commented 1 year ago

@vgupta0309 I added these metrics as part of optional-metrics so you need to enable it by passing --optional-metric=federation_status or if you are using helm:

options:
...
  optionalMetrics:
    # - replication_status
    - federation_status

get the canary tag a try it and report back please as I don't have an environment to fully test this. We can then release a new version of the exporter and helm chart.

vronnG commented 1 year ago

Thanks for making this change, It's working as expected for:

GET api/Federation/status/mirrorsLag
GET api/federation/status/unavailableMirrors

Verified. 🟢

Ref: federation status per repo is heavy on Artifactory. Its removed from metrics to avoid impacting Artifactory performance https://github.com/peimanja/artifactory_exporter/pull/98