peimanja / artifactory_exporter

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

Argument to exclude AQL related metics #104

Closed AlexeyMinasyan closed 1 year ago

AlexeyMinasyan commented 1 year ago

Feature Description

Argument to exclude aql related metics

Use Case(s)

We do not necessary need metrics like created1m, created5m and want to have a way to exclude these. Problem is that these metrics are using AQL which can run for a long time. With short timeout set it causing endless AQL queries against Artifactory instance and blocking other searches performed from users.

kirannhegde commented 1 year ago

You could drop metrics which are not required using Prometheus re-labeling. Wouldn't that help here?

AlexeyMinasyan commented 1 year ago

No, problem is with the excessive load on Artifactory caused by AQL search

peimanja commented 1 year ago

yeah that's fair. I will take a look when I get a chance. PRs are always welcomed as well

kirannhegde commented 1 year ago

No, problem is with the excessive load on Artifactory caused by AQL search

As an interim measure, you could always drop metrics that you do not need using Prometheus re-labeling https://valyala.medium.com/how-to-use-relabeling-in-prometheus-and-victoriametrics-8b90fc22c4b2 https://prometheus.io/docs/prometheus/latest/configuration/configuration/#relabel_config

Relabeling is a powerful tool to dynamically rewrite the label set of a target before it gets scraped.

What am i missing here?

Or did you mean to say that the exporter scrapes all the metrics irrespective of the re-labeling configuration and makes it available? And then Prometheus uses the relabeling configuration to drop metrics.