Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
docker
Docker Compose Prometheus and Grafana
Commits
ab9b89d2
Commit
ab9b89d2
authored
Jul 13, 2020
by
Jay Ta'ala
Browse files
Now relabling instance for internal bbexp endpoints (e.g. crowd:8095/crowd --> internal:crowd).
parent
e5a337ba
Changes
1
Hide whitespace changes
Inline
Side-by-side
prometheus.yml
View file @
ab9b89d2
...
...
@@ -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
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment