Skip to content

Commit d874d7a

Browse files
chr4brian-brazil
authored andcommitted
Fix DNS SD source label (prometheus#951)
[This pull-request](prometheus/prometheus#984) renamed the `__meta_dns_srv_name` to `__meta_dns_name`.
1 parent 9cad0f3 commit d874d7a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

content/blog/2015-06-01-advanced-service-discovery.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ Prometheus 0.14.0 allows you to specify multiple SRV records to be queried in a
147147
single scrape configuration, and also provides service-discovery-specific meta
148148
information that is helpful during the relabeling phase.
149149

150-
When querying the the DNS-SRV records, a label named `__meta_dns_srv_name` is
150+
When querying the the DNS-SRV records, a label named `__meta_dns_name` is
151151
attached to each target. Its value is set to the SRV record name for which it was
152152
returned. If we have structured SRV record names like `telemetry.<zone>.<job>.srv.example.org`,
153153
we can extract relevant labels from it those names:
@@ -164,11 +164,11 @@ scrape_configs:
164164
- 'telemetry.us-east.auth.srv.example.org'
165165
166166
relabel_configs:
167-
- source_labels: ['__meta_dns_srv_name']
167+
- source_labels: ['__meta_dns_name']
168168
regex: 'telemetry\.(.+?)\..+?\.srv\.example\.org'
169169
target_label: 'zone'
170170
replacement: '$1'
171-
- source_labels: ['__meta_dns_srv_name']
171+
- source_labels: ['__meta_dns_name']
172172
regex: 'telemetry\..+?\.(.+?)\.srv\.example\.org'
173173
target_label: 'job'
174174
replacement: '$1'

0 commit comments

Comments
 (0)