Skip to content

Instantly share code, notes, and snippets.

@Otterpohl
Created November 9, 2023 11:11
Show Gist options
  • Save Otterpohl/7a03ba2b144d69630f0bdb9b011133b9 to your computer and use it in GitHub Desktop.
Save Otterpohl/7a03ba2b144d69630f0bdb9b011133b9 to your computer and use it in GitHub Desktop.
Prometheus relabel config to remove port number
relabel_configs:
- source_labels: [__address__]
target_label: instance
regex: "([^:]+).*"
replacement: '${1}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment