-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
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
Add Custom Labels #6
Comments
Could you provide a config example with these labels? |
https://grafana.com/docs/agent/latest/configuration/metrics-config/#global_config A list of static labels to add for all metrics.external_labels: Add a label, for example environment: dev to differentiate between different environments |
Thanks. The current config looks like this: prometheus:
wal_directory: /tmp/grafana-agent-wal
global:
scrape_interval: 15s
configs: null Maybe we can make it something like: prometheus:
wal_directory: /tmp/grafana-agent-wal
global:
scrape_interval: 15s
external_labels:
{ environment : {{ grafana_agent_env | default('dev') }} }
configs: null And expose the variable We also need to be mindful of users that don't want any labels. |
Yes, this config looks good to me. Can we maybe use a flag(true or false) like used to install unzip here? to enable disable external_labels. |
what is required for this to be added? |
Time and/or a PR. Thanks |
Add support for custom labels to uniquely identify the source of metrics if you are running multiple Grafana Agents across multiple machines
The text was updated successfully, but these errors were encountered: