Skip to content

Instantly share code, notes, and snippets.

@SuperQ
Last active July 8, 2019 18:00
Show Gist options
  • Save SuperQ/117c4fe5fa61344e6a77d8b703d6d1b7 to your computer and use it in GitHub Desktop.
Save SuperQ/117c4fe5fa61344e6a77d8b703d6d1b7 to your computer and use it in GitHub Desktop.
Fix Telegraf mysql commands metric names
metric_relabel_configs:
- source_labels:
- __name__
regex: 'mysql_com_(.+)'
target_label: command
- __name__
regex: 'mysql_com_(.+)'
target_label: __name__
replacement: mysql_commands_total
Turn junos_2636_1_1_1_2_25_operational_status into junos_operational_status
metric_relabel_configs:
- source_labels:
- __name__
regex: 'junos_2636_1_1_1_2_25_operational_status'
target_label: __name__
replacement: junos_operational_status
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment