alloy
alloy copied to clipboard
Please clarify the 'Analyze and reduce metrics usage with Grafana Mimirtool' docs
I just successfully performed the steps outlined here to limit the number of metrics sent to Prometheus: Analyze and reduce metrics usage with Grafana Mimirtool
However, the part around adding the write_relabel_configs
does not cover, at least for the Grafana Agent on Windows with the default config, that the described statement should be added here:
integrations:
prometheus_remote_write:
...
...and not under:
metrics:
configs:
- name: integrations
remote_write:
...
The documentation just states that:
A Prometheus or Grafana Agent configuration has a remote_write configuration block similar to that which follows
This maybe perfectly clear for most users, but definitely not for a Grafana Agent/Prometheus n00b like myself... :smile:
Hey Stefan, thanks for the report!
The rules specified in write_relabel_configs
are applied just before metrics are sent over to the remote_write endpoint. So, for metrics coming from an integration, they can be defined under the integrations' prometheus_remote_write
, but for other instances of the metrics subsystem, they can should be placed under the corresponding remote write definition.
In any case, I'll see how we can amend the docs to make this clearer for users!
Not knowing how the different blocks fits together, I just played around placing the write_relabel_configs
statement in all sorts of locations within C:\Program Files\Grafana Agent\agent-config.yaml
I could find suggested online.
Maybe I am missing something obvious here, but the only one that made any difference for me was under prometheus_remote_write
.