Skip to content
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

fix: pass hostname through a trim filter before shipping #27

Merged
merged 1 commit into from
Jun 21, 2024

Conversation

hbjydev
Copy link
Member

@hbjydev hbjydev commented Jun 21, 2024

Changes

  • Passes all instance labels using /etc/hostname as a source through the trim_space function to fix query errors, as /etc/hostname has a newline char at the end of it.

Source for help on the issue is Grafana Cloud support;

you will see the instance name is trailed by a " " which when replaced in the $instance variable causes the query payload to have a line break.

topk(25,irate(node_disk_io_time_seconds_total{job=~"integrations/(node_exporter|unix)",cluster=~".*",job=~".+",instance=~"ip-10-0-34-226
", device!=""}[4m0s]))

(Note that the " is on line two of the query, not on the end of line one)

@hbjydev hbjydev merged commit b70a120 into main Jun 21, 2024
4 checks passed
@hbjydev hbjydev deleted the alloy-fixes branch June 21, 2024 12:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant