Hi,
I currently trying to implement a tags based discovery to probes ports based on Virtual Machine Tags.
Example: I have a tag like prometheus-tcp-probes with values "80,443"
I would like to pass 2 targets to prometheus blackbox exporter. I have a relabel_config like this:
relabel_configs:
- source_labels: [__meta_azure_machine_tag_prometheus_probe_tcp]
regex: ^$
action: drop
- source_labels: [__meta_azure_machine_private_ip, __meta_azure_machine_tag_prometheus_probe_tcp]
action: replace
regex: ([^:]+)(?::\d+)?;(\d+).*
replacement: $1:$2
target_label: __param_target
- source_labels: [__param_target]
target_label: instance
- target_label: __address__
replacement: "{{ .Release.Name }}-blackbox-exporter.{{ .Release.Namespace }}.svc.cluster.local:9115"
- action: labeldrop
regex: __meta_azure_machine_tag_(.+)
- action: labelmap
regex: __meta_(.+)
Is it possible to split the values from __meta_azure_machine_tag_prometheus_probe_tcp which contains a comma separated port list, prepend the ip and pass them to target label as array?