Commit ab9b89d2 authored by Jay Ta'ala's avatar Jay Ta'ala
Browse files

Now relabling instance for internal bbexp endpoints (e.g. crowd:8095/crowd --> internal:crowd).

parent e5a337ba
......@@ -59,7 +59,9 @@ scrape_configs:
target_label: instance
- target_label: __address__
replacement: bbexp:9115 # The blackbox exporter's real hostname:port.
metric_relabel_configs:
# create domain label
- source_labels: [instance]
regex: '.*?[.](.*)'
replacement: '$1'
......@@ -68,7 +70,27 @@ scrape_configs:
regex: '^$'
replacement: 'jaytaala.com'
target_label: domain
# create shortname label
- source_labels: [instance]
regex: '.*/(.+?)[:.].*'
replacement: '$1'
target_label: shortname
# instance relabling
# make copy of instance to use later
- source_labels: [instance]
target_label: __tmp
# those with subdomains passthrough, if not instance will be empty
- source_labels: [instance]
regex: '.*/(.*[.].*)'
replacement: '$1'
target_label: instance
# use previously saved __tmp and find those with : (e.g. crowd:8095)
- source_labels: [__tmp]
regex: '.*/(.*)[:].*'
replacement: 'internal:$1'
target_label: instance
# now drop the __tmp label
- regex: '^__tmp$'
action: labeldrop
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment