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?
--
You received this message because you are subscribed to the Google Groups
"Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/prometheus-users/96b5a828-f1b4-49e6-ada9-468d98e085cen%40googlegroups.com.