Skip to content

Commit 750cfa6

Browse files
mrnicegyu11kaiser
andauthored
πŸ› βš—οΈ Faulty prometheus instance names not corresponding to hostnames (#182)
* Try to adress bug: Faulty prometheus instance names not corresponding to hostnames * add to readme --------- Co-authored-by: kaiser <[email protected]>
1 parent 965307a commit 750cfa6

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

β€Žservices/monitoring/prometheus/README.mdβ€Ž

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,6 @@
1010
#### Tricks and Tips:
1111
Fill in past data for new rules (make sure to backup data before)
1212
- https://jessicagreben.medium.com/prometheus-fill-in-data-for-new-recording-rules-30a14ccb8467
13+
14+
This is a useful tool to check prometheus service discovery and relabeling rules:
15+
https://relabeler.promlabs.com/

β€Žservices/monitoring/prometheus/prometheus-base.ymlβ€Ž

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ scrape_configs:
3737
- source_labels: [__meta_dockerswarm_node_address]
3838
target_label: __address__
3939
replacement: $${empty_var}1:9323
40+
- source_labels: [__meta_dockerswarm_node_hostname]
41+
target_label: instance
4042
# Set hostname as instance label
4143
# Swarm manager give the address 0.0.0.0 and is then not scraped by Prometheus. Fixed thansk to https://github.com/prometheus/prometheus/issues/11060#issuecomment-1195278301
4244
- source_labels:

0 commit comments

Comments
Β (0)