We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I am sracping consul metrics over consul_sd_configs with the cinfig shown below:
- job_name: "integrations/consul_sd_minio" metrics_path: "/minio/v2/metrics/cluster" consul_sd_configs: - server: "consul.service.consul:8501" tags: ["prometheus_minio"] tls_config: insecure_skip_verify: true ca_file: "/certs/ca/ca.crt" cert_file: "/certs/consul/consul.pem" key_file: "/certs/consul/consul-key.pem" datacenter: "{{data_center}}" scheme: https relabel_configs: - source_labels: [__meta_consul_node] target_label: instance - source_labels: [__meta_consul_service] target_label: service - source_labels: [__meta_consul_tags] separator: ',' regex: '.*,prometheus:server=([^,]+),.*' target_label: 'server' replacement: '$${1}' - source_labels: [__meta_consul_tags] separator: ',' regex: '.*,prometheus:version=([^,]+),.*' target_label: 'version' replacement: '$${1}'
For mimimize the relabeling config I thought I can relable all consul tags which starts wih prometheus: with the config:
- source_labels: [__meta_consul_tags] separator: ',' regex: 'prometheus:([^=]+)=([^,]+)' target_label: '$${1}' replacement: '$${2}'
But it seems that grafana agent can relabel on match at time. Right? Or did I miss something?
The text was updated successfully, but these errors were encountered:
Yes, it looks like because of the way __meta_consul_tags is generated by service discovery, you can only relabel one at a time. There was some information about this here: https://www.robustperception.io/extracting-full-labels-from-consul-tags/
__meta_consul_tags
Sorry, something went wrong.
Isn't this approach outdated? 😜
No branches or pull requests
I am sracping consul metrics over consul_sd_configs
with the cinfig shown below:
For mimimize the relabeling config I thought I can relable all consul tags which starts wih prometheus:
with the config:
But it seems that grafana agent can relabel on match at time. Right? Or did I miss something?
The text was updated successfully, but these errors were encountered: