diff --git a/app/vmagent/README.md b/app/vmagent/README.md
index df9c9b827..fd1d794e0 100644
--- a/app/vmagent/README.md
+++ b/app/vmagent/README.md
@@ -463,7 +463,7 @@ with [additional enhancements](#relabeling-enhancements). The relabeling can be
This relabeling is used for modifying labels in discovered targets and for dropping unneeded targets.
See [relabeling cookbook](https://docs.victoriametrics.com/relabeling.html) for details.
- This relabeling can be debugged by clicking the `debug` link at the corresponding target on the `http://vmagent:8429/targets` page
+ This relabeling can be debugged by clicking the `debug` link (the link is available only if `--promscrape.dropOriginalLabels=false`) at the corresponding target on the `http://vmagent:8429/targets` page
or on the `http://vmagent:8429/service-discovery` page. See [these docs](#relabel-debug) for details.
* At the `scrape_config -> metric_relabel_configs` section in `-promscrape.config` file.
@@ -644,19 +644,19 @@ provide the following tools for debugging target-level and metric-level relabeli
- Target-level debugging (e.g. `relabel_configs` section at [scrape_configs](https://docs.victoriametrics.com/sd_configs.html#scrape_configs))
can be performed by navigating to `http://vmagent:8429/targets` page (`http://victoriametrics:8428/targets` page for single-node VictoriaMetrics)
- and clicking the `debug target relabeling` link at the target, which must be debugged.
+ and clicking the `debug target relabeling` link (the link is available only if `--promscrape.dropOriginalLabels=false`) at the target, which must be debugged.
The opened page shows step-by-step results for the actual target relabeling rules applied to the discovered target labels.
The page shows also the target URL generated after applying all the relabeling rules.
The `http://vmagent:8429/targets` page shows only active targets. If you need to understand why some target
is dropped during the relabeling, then navigate to `http://vmagent:8428/service-discovery` page
(`http://victoriametrics:8428/service-discovery` for single-node VictoriaMetrics), find the dropped target
- and click the `debug` link there. The opened page shows step-by-step results for the actual relabeling rules,
+ and click the `debug` link (the link is available only if `--promscrape.dropOriginalLabels=false`) there. The opened page shows step-by-step results for the actual relabeling rules,
which result to target drop.
- Metric-level debugging (e.g. `metric_relabel_configs` section at [scrape_configs](https://docs.victoriametrics.com/sd_configs.html#scrape_configs)
can be performed by navigating to `http://vmagent:8429/targets` page (`http://victoriametrics:8428/targets` page for single-node VictoriaMetrics)
- and clicking the `debug metrics relabeling` link at the target, which must be debugged.
+ and clicking the `debug metrics relabeling` link (the link is available only if `--promscrape.dropOriginalLabels=false`) at the target, which must be debugged.
The opened page shows step-by-step results for the actual metric relabeling rules applied to the given target labels.
## Prometheus staleness markers
diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md
index 30b1e496c..af92a1365 100644
--- a/docs/CHANGELOG.md
+++ b/docs/CHANGELOG.md
@@ -66,6 +66,7 @@ The following `tip` changes can be tested by building VictoriaMetrics components
* BUGFIX: [vmalert](https://docs.victoriametrics.com/vmalert.html): correctly calculate evaluation time for rules. Before, there was a low probability for discrepancy between actual time and rules evaluation time if evaluation interval was lower than the execution time for rules within the group.
* BUGFIX: [vmalert](https://docs.victoriametrics.com/vmalert.html): reset evaluation timestamp after modifying group interval. Before, there could have latency on rule evaluation time.
* BUGFIX: vmselect: fix timestamp alignment for Prometheus querying API if time argument is less than 10m from the beginning of Unix epoch.
+* BUGFIX: [vmagent](https://docs.victoriametrics.com/vmagent.html): hide `debug` links on the `/targets` page if `--promscrape.dropOriginalLabels` is enabled. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/4597).
* BUGFIX: [MetricsQL](https://docs.victoriametrics.com/MetricsQL.html): properly parse binary operations with reserved words on the right side such as `foo + (on{bar="baz"})`. Previously such queries could lead to panic. See [this issue](https://github.com/VictoriaMetrics/VictoriaMetrics/issues/4422).
* BUGFIX: [Official Grafana dashboards for VictoriaMetrics](https://grafana.com/orgs/victoriametrics): display cache usage for all components on panel `Cache usage % by type` for cluster dashboard. Before, only vmstorage caches were shown.
diff --git a/docs/vmagent.md b/docs/vmagent.md
index b273e8b27..d45f54707 100644
--- a/docs/vmagent.md
+++ b/docs/vmagent.md
@@ -474,7 +474,7 @@ with [additional enhancements](#relabeling-enhancements). The relabeling can be
This relabeling is used for modifying labels in discovered targets and for dropping unneeded targets.
See [relabeling cookbook](https://docs.victoriametrics.com/relabeling.html) for details.
- This relabeling can be debugged by clicking the `debug` link at the corresponding target on the `http://vmagent:8429/targets` page
+ This relabeling can be debugged by clicking the `debug` link (the link is available only if `--promscrape.dropOriginalLabels=false`) at the corresponding target on the `http://vmagent:8429/targets` page
or on the `http://vmagent:8429/service-discovery` page. See [these docs](#relabel-debug) for details.
* At the `scrape_config -> metric_relabel_configs` section in `-promscrape.config` file.
@@ -655,19 +655,19 @@ provide the following tools for debugging target-level and metric-level relabeli
- Target-level debugging (e.g. `relabel_configs` section at [scrape_configs](https://docs.victoriametrics.com/sd_configs.html#scrape_configs))
can be performed by navigating to `http://vmagent:8429/targets` page (`http://victoriametrics:8428/targets` page for single-node VictoriaMetrics)
- and clicking the `debug target relabeling` link at the target, which must be debugged.
+ and clicking the `debug target relabeling` link (the link is available only if `--promscrape.dropOriginalLabels=false`) at the target, which must be debugged.
The opened page shows step-by-step results for the actual target relabeling rules applied to the discovered target labels.
The page shows also the target URL generated after applying all the relabeling rules.
The `http://vmagent:8429/targets` page shows only active targets. If you need to understand why some target
is dropped during the relabeling, then navigate to `http://vmagent:8428/service-discovery` page
(`http://victoriametrics:8428/service-discovery` for single-node VictoriaMetrics), find the dropped target
- and click the `debug` link there. The opened page shows step-by-step results for the actual relabeling rules,
+ and click the `debug` link (the link is available only if `--promscrape.dropOriginalLabels=false`) there. The opened page shows step-by-step results for the actual relabeling rules,
which result to target drop.
- Metric-level debugging (e.g. `metric_relabel_configs` section at [scrape_configs](https://docs.victoriametrics.com/sd_configs.html#scrape_configs)
can be performed by navigating to `http://vmagent:8429/targets` page (`http://victoriametrics:8428/targets` page for single-node VictoriaMetrics)
- and clicking the `debug metrics relabeling` link at the target, which must be debugged.
+ and clicking the `debug metrics relabeling` link (the link is available only if `--promscrape.dropOriginalLabels=false`) at the target, which must be debugged.
The opened page shows step-by-step results for the actual metric relabeling rules applied to the given target labels.
## Prometheus staleness markers
diff --git a/lib/promscrape/targetstatus.go b/lib/promscrape/targetstatus.go
index fe7eccb17..3d02f2a25 100644
--- a/lib/promscrape/targetstatus.go
+++ b/lib/promscrape/targetstatus.go
@@ -156,6 +156,11 @@ func (tsm *targetStatusMap) getScrapeWorkByTargetID(targetID string) *scrapeWork
}
func getLabelsID(labels *promutils.Labels) string {
+ // return empty string if OriginalLabels was dropped
+ // via flag --promscrape.dropOriginalLabels
+ if labels == nil {
+ return ""
+ }
return fmt.Sprintf("%016x", uintptr(unsafe.Pointer(labels)))
}
diff --git a/lib/promscrape/targetstatus.qtpl b/lib/promscrape/targetstatus.qtpl
index 226245513..c822fc253 100644
--- a/lib/promscrape/targetstatus.qtpl
+++ b/lib/promscrape/targetstatus.qtpl
@@ -228,10 +228,7 @@
%}
- {%s endpoint %} (
- response
- )
+ {%= endpointContent(endpoint, targetID)%}
{% if ts.up %}
@@ -241,17 +238,10 @@
{% endif %}
-
- {%= formatLabels(ts.sw.Config.Labels) %}
-
-
- {%= formatLabels(ts.sw.Config.OriginalLabels) %}
-
+ {%= labelsContent(targetID, ts.sw.Config) %}
- target {% space %}
- metrics
+ {%= debugRelabelingContent(targetID)%}
{%d ts.scrapesTotal %}
{%d ts.scrapesFailed %}
@@ -327,8 +317,7 @@
{%= formatLabels(t.labels) %}
- {% code targetID := getLabelsID(t.originalLabels) %}
- debug
+ {%= discoveredJobsRelabelContent(t.originalLabels) %}
{% endfor %}
@@ -381,3 +370,37 @@
{% endfunc %}
{% endstripspace %}
+
+{% func endpointContent(endpoint, targetID string) %}
+{%s endpoint %} {% space %}
+{% if targetID != "" %}
+(response )
+{% endif %}
+{% endfunc %}
+
+{% func labelsContent(targetID string, config *ScrapeWork) %}
+
+ {%= formatLabels(config.Labels) %}
+
+{% if config.OriginalLabels != nil %}
+
+ {%= formatLabels(config.OriginalLabels) %}
+
+{% endif %}
+{% endfunc %}
+
+{% func debugRelabelingContent(targetID string) %}
+{% if targetID != "" %}
+target {% space %}
+metrics
+{% endif %}
+{% endfunc %}
+
+{% func discoveredJobsRelabelContent(originalLabels *promutils.Labels) %}
+{% if originalLabels != nil %}
+{% code targetID := getLabelsID(originalLabels) %}
+debug
+{% endif %}
+{% endfunc %}
diff --git a/lib/promscrape/targetstatus.qtpl.go b/lib/promscrape/targetstatus.qtpl.go
index 977d79271..43846fa51 100644
--- a/lib/promscrape/targetstatus.qtpl.go
+++ b/lib/promscrape/targetstatus.qtpl.go
@@ -588,338 +588,305 @@ func streamscrapeJobTargets(qw422016 *qt422016.Writer, num int, jts *jobTargetsS
//line lib/promscrape/targetstatus.qtpl:229
}
//line lib/promscrape/targetstatus.qtpl:229
- qw422016.N().S(`>`)
//line lib/promscrape/targetstatus.qtpl:231
- qw422016.E().S(endpoint)
+ streamendpointContent(qw422016, endpoint, targetID)
//line lib/promscrape/targetstatus.qtpl:231
- qw422016.N().S(`" target="_blank">`)
-//line lib/promscrape/targetstatus.qtpl:231
- qw422016.E().S(endpoint)
-//line lib/promscrape/targetstatus.qtpl:231
- qw422016.N().S(` (response )`)
-//line lib/promscrape/targetstatus.qtpl:237
+ qw422016.N().S(` `)
+//line lib/promscrape/targetstatus.qtpl:234
if ts.up {
-//line lib/promscrape/targetstatus.qtpl:237
+//line lib/promscrape/targetstatus.qtpl:234
qw422016.N().S(`UP `)
-//line lib/promscrape/targetstatus.qtpl:239
+//line lib/promscrape/targetstatus.qtpl:236
} else {
-//line lib/promscrape/targetstatus.qtpl:239
+//line lib/promscrape/targetstatus.qtpl:236
qw422016.N().S(`DOWN `)
-//line lib/promscrape/targetstatus.qtpl:241
+//line lib/promscrape/targetstatus.qtpl:238
}
+//line lib/promscrape/targetstatus.qtpl:238
+ qw422016.N().S(` `)
//line lib/promscrape/targetstatus.qtpl:241
- qw422016.N().S(` `)
+ streamlabelsContent(qw422016, targetID, ts.sw.Config)
+//line lib/promscrape/targetstatus.qtpl:241
+ qw422016.N().S(`
`)
+//line lib/promscrape/targetstatus.qtpl:244
+ streamdebugRelabelingContent(qw422016, targetID)
+//line lib/promscrape/targetstatus.qtpl:244
+ qw422016.N().S(` `)
//line lib/promscrape/targetstatus.qtpl:246
- streamformatLabels(qw422016, ts.sw.Config.Labels)
-//line lib/promscrape/targetstatus.qtpl:246
- qw422016.N().S(``)
-//line lib/promscrape/targetstatus.qtpl:249
- streamformatLabels(qw422016, ts.sw.Config.OriginalLabels)
-//line lib/promscrape/targetstatus.qtpl:249
- qw422016.N().S(`
target `)
-//line lib/promscrape/targetstatus.qtpl:253
- qw422016.N().S(` `)
-//line lib/promscrape/targetstatus.qtpl:253
- qw422016.N().S(`metrics `)
-//line lib/promscrape/targetstatus.qtpl:256
qw422016.N().D(ts.scrapesTotal)
-//line lib/promscrape/targetstatus.qtpl:256
+//line lib/promscrape/targetstatus.qtpl:246
qw422016.N().S(` `)
-//line lib/promscrape/targetstatus.qtpl:257
+//line lib/promscrape/targetstatus.qtpl:247
qw422016.N().D(ts.scrapesFailed)
-//line lib/promscrape/targetstatus.qtpl:257
+//line lib/promscrape/targetstatus.qtpl:247
qw422016.N().S(` `)
-//line lib/promscrape/targetstatus.qtpl:259
+//line lib/promscrape/targetstatus.qtpl:249
if lastScrapeDuration < 365*24*time.Hour {
-//line lib/promscrape/targetstatus.qtpl:260
+//line lib/promscrape/targetstatus.qtpl:250
qw422016.N().D(int(lastScrapeDuration.Milliseconds()))
-//line lib/promscrape/targetstatus.qtpl:260
+//line lib/promscrape/targetstatus.qtpl:250
qw422016.N().S(`ms ago`)
-//line lib/promscrape/targetstatus.qtpl:261
+//line lib/promscrape/targetstatus.qtpl:251
} else {
-//line lib/promscrape/targetstatus.qtpl:261
+//line lib/promscrape/targetstatus.qtpl:251
qw422016.N().S(`none`)
-//line lib/promscrape/targetstatus.qtpl:263
+//line lib/promscrape/targetstatus.qtpl:253
}
-//line lib/promscrape/targetstatus.qtpl:263
+//line lib/promscrape/targetstatus.qtpl:253
qw422016.N().S(` `)
-//line lib/promscrape/targetstatus.qtpl:264
+//line lib/promscrape/targetstatus.qtpl:254
qw422016.N().D(int(ts.scrapeDuration))
-//line lib/promscrape/targetstatus.qtpl:264
+//line lib/promscrape/targetstatus.qtpl:254
qw422016.N().S(`ms `)
-//line lib/promscrape/targetstatus.qtpl:265
+//line lib/promscrape/targetstatus.qtpl:255
qw422016.N().D(ts.samplesScraped)
-//line lib/promscrape/targetstatus.qtpl:265
+//line lib/promscrape/targetstatus.qtpl:255
qw422016.N().S(` `)
-//line lib/promscrape/targetstatus.qtpl:266
+//line lib/promscrape/targetstatus.qtpl:256
if ts.err != nil {
-//line lib/promscrape/targetstatus.qtpl:266
+//line lib/promscrape/targetstatus.qtpl:256
qw422016.E().S(ts.err.Error())
-//line lib/promscrape/targetstatus.qtpl:266
+//line lib/promscrape/targetstatus.qtpl:256
}
-//line lib/promscrape/targetstatus.qtpl:266
+//line lib/promscrape/targetstatus.qtpl:256
qw422016.N().S(` `)
-//line lib/promscrape/targetstatus.qtpl:268
+//line lib/promscrape/targetstatus.qtpl:258
}
-//line lib/promscrape/targetstatus.qtpl:268
+//line lib/promscrape/targetstatus.qtpl:258
qw422016.N().S(``)
-//line lib/promscrape/targetstatus.qtpl:274
+//line lib/promscrape/targetstatus.qtpl:264
}
-//line lib/promscrape/targetstatus.qtpl:274
+//line lib/promscrape/targetstatus.qtpl:264
func writescrapeJobTargets(qq422016 qtio422016.Writer, num int, jts *jobTargetsStatuses) {
-//line lib/promscrape/targetstatus.qtpl:274
+//line lib/promscrape/targetstatus.qtpl:264
qw422016 := qt422016.AcquireWriter(qq422016)
-//line lib/promscrape/targetstatus.qtpl:274
+//line lib/promscrape/targetstatus.qtpl:264
streamscrapeJobTargets(qw422016, num, jts)
-//line lib/promscrape/targetstatus.qtpl:274
+//line lib/promscrape/targetstatus.qtpl:264
qt422016.ReleaseWriter(qw422016)
-//line lib/promscrape/targetstatus.qtpl:274
+//line lib/promscrape/targetstatus.qtpl:264
}
-//line lib/promscrape/targetstatus.qtpl:274
+//line lib/promscrape/targetstatus.qtpl:264
func scrapeJobTargets(num int, jts *jobTargetsStatuses) string {
-//line lib/promscrape/targetstatus.qtpl:274
+//line lib/promscrape/targetstatus.qtpl:264
qb422016 := qt422016.AcquireByteBuffer()
-//line lib/promscrape/targetstatus.qtpl:274
+//line lib/promscrape/targetstatus.qtpl:264
writescrapeJobTargets(qb422016, num, jts)
-//line lib/promscrape/targetstatus.qtpl:274
+//line lib/promscrape/targetstatus.qtpl:264
qs422016 := string(qb422016.B)
-//line lib/promscrape/targetstatus.qtpl:274
+//line lib/promscrape/targetstatus.qtpl:264
qt422016.ReleaseByteBuffer(qb422016)
-//line lib/promscrape/targetstatus.qtpl:274
+//line lib/promscrape/targetstatus.qtpl:264
return qs422016
-//line lib/promscrape/targetstatus.qtpl:274
+//line lib/promscrape/targetstatus.qtpl:264
}
-//line lib/promscrape/targetstatus.qtpl:276
+//line lib/promscrape/targetstatus.qtpl:266
func streamdiscoveredTargets(qw422016 *qt422016.Writer, tsr *targetsStatusResult) {
-//line lib/promscrape/targetstatus.qtpl:277
+//line lib/promscrape/targetstatus.qtpl:267
tljs := tsr.getTargetLabelsByJob()
-//line lib/promscrape/targetstatus.qtpl:277
+//line lib/promscrape/targetstatus.qtpl:267
qw422016.N().S(``)
-//line lib/promscrape/targetstatus.qtpl:280
+//line lib/promscrape/targetstatus.qtpl:270
for i, tlj := range tljs {
-//line lib/promscrape/targetstatus.qtpl:281
+//line lib/promscrape/targetstatus.qtpl:271
streamdiscoveredJobTargets(qw422016, i, tlj)
-//line lib/promscrape/targetstatus.qtpl:282
+//line lib/promscrape/targetstatus.qtpl:272
}
-//line lib/promscrape/targetstatus.qtpl:282
+//line lib/promscrape/targetstatus.qtpl:272
qw422016.N().S(`
`)
-//line lib/promscrape/targetstatus.qtpl:285
+//line lib/promscrape/targetstatus.qtpl:275
}
-//line lib/promscrape/targetstatus.qtpl:285
+//line lib/promscrape/targetstatus.qtpl:275
func writediscoveredTargets(qq422016 qtio422016.Writer, tsr *targetsStatusResult) {
-//line lib/promscrape/targetstatus.qtpl:285
+//line lib/promscrape/targetstatus.qtpl:275
qw422016 := qt422016.AcquireWriter(qq422016)
-//line lib/promscrape/targetstatus.qtpl:285
+//line lib/promscrape/targetstatus.qtpl:275
streamdiscoveredTargets(qw422016, tsr)
-//line lib/promscrape/targetstatus.qtpl:285
+//line lib/promscrape/targetstatus.qtpl:275
qt422016.ReleaseWriter(qw422016)
-//line lib/promscrape/targetstatus.qtpl:285
+//line lib/promscrape/targetstatus.qtpl:275
}
-//line lib/promscrape/targetstatus.qtpl:285
+//line lib/promscrape/targetstatus.qtpl:275
func discoveredTargets(tsr *targetsStatusResult) string {
-//line lib/promscrape/targetstatus.qtpl:285
+//line lib/promscrape/targetstatus.qtpl:275
qb422016 := qt422016.AcquireByteBuffer()
-//line lib/promscrape/targetstatus.qtpl:285
+//line lib/promscrape/targetstatus.qtpl:275
writediscoveredTargets(qb422016, tsr)
-//line lib/promscrape/targetstatus.qtpl:285
+//line lib/promscrape/targetstatus.qtpl:275
qs422016 := string(qb422016.B)
-//line lib/promscrape/targetstatus.qtpl:285
+//line lib/promscrape/targetstatus.qtpl:275
qt422016.ReleaseByteBuffer(qb422016)
-//line lib/promscrape/targetstatus.qtpl:285
+//line lib/promscrape/targetstatus.qtpl:275
return qs422016
-//line lib/promscrape/targetstatus.qtpl:285
+//line lib/promscrape/targetstatus.qtpl:275
}
-//line lib/promscrape/targetstatus.qtpl:287
+//line lib/promscrape/targetstatus.qtpl:277
func streamdiscoveredJobTargets(qw422016 *qt422016.Writer, num int, tlj *targetLabelsByJob) {
-//line lib/promscrape/targetstatus.qtpl:287
+//line lib/promscrape/targetstatus.qtpl:277
qw422016.N().S(``)
-//line lib/promscrape/targetstatus.qtpl:289
+//line lib/promscrape/targetstatus.qtpl:279
qw422016.E().S(tlj.jobName)
-//line lib/promscrape/targetstatus.qtpl:289
+//line lib/promscrape/targetstatus.qtpl:279
qw422016.N().S(` `)
-//line lib/promscrape/targetstatus.qtpl:289
+//line lib/promscrape/targetstatus.qtpl:279
qw422016.N().S(`(`)
-//line lib/promscrape/targetstatus.qtpl:289
+//line lib/promscrape/targetstatus.qtpl:279
qw422016.N().D(tlj.activeTargets)
-//line lib/promscrape/targetstatus.qtpl:289
+//line lib/promscrape/targetstatus.qtpl:279
qw422016.N().S(`/`)
-//line lib/promscrape/targetstatus.qtpl:289
+//line lib/promscrape/targetstatus.qtpl:279
qw422016.N().D(tlj.activeTargets + tlj.droppedTargets)
-//line lib/promscrape/targetstatus.qtpl:289
+//line lib/promscrape/targetstatus.qtpl:279
qw422016.N().S(` `)
-//line lib/promscrape/targetstatus.qtpl:289
+//line lib/promscrape/targetstatus.qtpl:279
qw422016.N().S(`active) `)
-//line lib/promscrape/targetstatus.qtpl:290
+//line lib/promscrape/targetstatus.qtpl:280
streamshowHideScrapeJobButtons(qw422016, num)
-//line lib/promscrape/targetstatus.qtpl:290
+//line lib/promscrape/targetstatus.qtpl:280
qw422016.N().S(`Status Discovered Labels Target Labels Debug relabeling `)
-//line lib/promscrape/targetstatus.qtpl:303
+//line lib/promscrape/targetstatus.qtpl:293
for _, t := range tlj.targets {
-//line lib/promscrape/targetstatus.qtpl:303
+//line lib/promscrape/targetstatus.qtpl:293
qw422016.N().S(` 0 {
-//line lib/promscrape/targetstatus.qtpl:307
+//line lib/promscrape/targetstatus.qtpl:297
qw422016.N().S(`class="alert alert-danger"`)
-//line lib/promscrape/targetstatus.qtpl:309
+//line lib/promscrape/targetstatus.qtpl:299
} else {
-//line lib/promscrape/targetstatus.qtpl:309
+//line lib/promscrape/targetstatus.qtpl:299
qw422016.N().S(`class="alert alert-warning"`)
-//line lib/promscrape/targetstatus.qtpl:311
+//line lib/promscrape/targetstatus.qtpl:301
}
-//line lib/promscrape/targetstatus.qtpl:312
+//line lib/promscrape/targetstatus.qtpl:302
}
-//line lib/promscrape/targetstatus.qtpl:312
+//line lib/promscrape/targetstatus.qtpl:302
qw422016.N().S(`>`)
-//line lib/promscrape/targetstatus.qtpl:315
+//line lib/promscrape/targetstatus.qtpl:305
if t.up {
-//line lib/promscrape/targetstatus.qtpl:315
+//line lib/promscrape/targetstatus.qtpl:305
qw422016.N().S(`UP `)
-//line lib/promscrape/targetstatus.qtpl:317
+//line lib/promscrape/targetstatus.qtpl:307
} else if t.labels.Len() > 0 {
-//line lib/promscrape/targetstatus.qtpl:317
+//line lib/promscrape/targetstatus.qtpl:307
qw422016.N().S(`DOWN `)
-//line lib/promscrape/targetstatus.qtpl:319
+//line lib/promscrape/targetstatus.qtpl:309
} else {
-//line lib/promscrape/targetstatus.qtpl:319
+//line lib/promscrape/targetstatus.qtpl:309
qw422016.N().S(`DROPPED `)
-//line lib/promscrape/targetstatus.qtpl:321
+//line lib/promscrape/targetstatus.qtpl:311
}
-//line lib/promscrape/targetstatus.qtpl:321
+//line lib/promscrape/targetstatus.qtpl:311
qw422016.N().S(` `)
-//line lib/promscrape/targetstatus.qtpl:324
+//line lib/promscrape/targetstatus.qtpl:314
streamformatLabels(qw422016, t.originalLabels)
-//line lib/promscrape/targetstatus.qtpl:324
+//line lib/promscrape/targetstatus.qtpl:314
qw422016.N().S(` `)
-//line lib/promscrape/targetstatus.qtpl:327
+//line lib/promscrape/targetstatus.qtpl:317
streamformatLabels(qw422016, t.labels)
-//line lib/promscrape/targetstatus.qtpl:327
+//line lib/promscrape/targetstatus.qtpl:317
qw422016.N().S(` `)
-//line lib/promscrape/targetstatus.qtpl:330
- targetID := getLabelsID(t.originalLabels)
-
-//line lib/promscrape/targetstatus.qtpl:330
- qw422016.N().S(`debug `)
-//line lib/promscrape/targetstatus.qtpl:334
+//line lib/promscrape/targetstatus.qtpl:320
+ streamdiscoveredJobsRelabelContent(qw422016, t.originalLabels)
+//line lib/promscrape/targetstatus.qtpl:320
+ qw422016.N().S(``)
+//line lib/promscrape/targetstatus.qtpl:323
}
-//line lib/promscrape/targetstatus.qtpl:334
+//line lib/promscrape/targetstatus.qtpl:323
qw422016.N().S(`
`)
-//line lib/promscrape/targetstatus.qtpl:338
+//line lib/promscrape/targetstatus.qtpl:327
}
-//line lib/promscrape/targetstatus.qtpl:338
+//line lib/promscrape/targetstatus.qtpl:327
func writediscoveredJobTargets(qq422016 qtio422016.Writer, num int, tlj *targetLabelsByJob) {
-//line lib/promscrape/targetstatus.qtpl:338
+//line lib/promscrape/targetstatus.qtpl:327
qw422016 := qt422016.AcquireWriter(qq422016)
-//line lib/promscrape/targetstatus.qtpl:338
+//line lib/promscrape/targetstatus.qtpl:327
streamdiscoveredJobTargets(qw422016, num, tlj)
-//line lib/promscrape/targetstatus.qtpl:338
+//line lib/promscrape/targetstatus.qtpl:327
qt422016.ReleaseWriter(qw422016)
-//line lib/promscrape/targetstatus.qtpl:338
+//line lib/promscrape/targetstatus.qtpl:327
}
-//line lib/promscrape/targetstatus.qtpl:338
+//line lib/promscrape/targetstatus.qtpl:327
func discoveredJobTargets(num int, tlj *targetLabelsByJob) string {
-//line lib/promscrape/targetstatus.qtpl:338
+//line lib/promscrape/targetstatus.qtpl:327
qb422016 := qt422016.AcquireByteBuffer()
-//line lib/promscrape/targetstatus.qtpl:338
+//line lib/promscrape/targetstatus.qtpl:327
writediscoveredJobTargets(qb422016, num, tlj)
-//line lib/promscrape/targetstatus.qtpl:338
+//line lib/promscrape/targetstatus.qtpl:327
qs422016 := string(qb422016.B)
-//line lib/promscrape/targetstatus.qtpl:338
+//line lib/promscrape/targetstatus.qtpl:327
qt422016.ReleaseByteBuffer(qb422016)
-//line lib/promscrape/targetstatus.qtpl:338
+//line lib/promscrape/targetstatus.qtpl:327
return qs422016
-//line lib/promscrape/targetstatus.qtpl:338
+//line lib/promscrape/targetstatus.qtpl:327
}
-//line lib/promscrape/targetstatus.qtpl:340
+//line lib/promscrape/targetstatus.qtpl:329
func streamshowHideScrapeJobButtons(qw422016 *qt422016.Writer, num int) {
-//line lib/promscrape/targetstatus.qtpl:340
+//line lib/promscrape/targetstatus.qtpl:329
qw422016.N().S(`collapse expand `)
-//line lib/promscrape/targetstatus.qtpl:349
+//line lib/promscrape/targetstatus.qtpl:338
}
-//line lib/promscrape/targetstatus.qtpl:349
+//line lib/promscrape/targetstatus.qtpl:338
func writeshowHideScrapeJobButtons(qq422016 qtio422016.Writer, num int) {
-//line lib/promscrape/targetstatus.qtpl:349
+//line lib/promscrape/targetstatus.qtpl:338
qw422016 := qt422016.AcquireWriter(qq422016)
-//line lib/promscrape/targetstatus.qtpl:349
+//line lib/promscrape/targetstatus.qtpl:338
streamshowHideScrapeJobButtons(qw422016, num)
-//line lib/promscrape/targetstatus.qtpl:349
+//line lib/promscrape/targetstatus.qtpl:338
qt422016.ReleaseWriter(qw422016)
-//line lib/promscrape/targetstatus.qtpl:349
+//line lib/promscrape/targetstatus.qtpl:338
}
-//line lib/promscrape/targetstatus.qtpl:349
+//line lib/promscrape/targetstatus.qtpl:338
func showHideScrapeJobButtons(num int) string {
-//line lib/promscrape/targetstatus.qtpl:349
+//line lib/promscrape/targetstatus.qtpl:338
qb422016 := qt422016.AcquireByteBuffer()
-//line lib/promscrape/targetstatus.qtpl:349
+//line lib/promscrape/targetstatus.qtpl:338
writeshowHideScrapeJobButtons(qb422016, num)
-//line lib/promscrape/targetstatus.qtpl:349
+//line lib/promscrape/targetstatus.qtpl:338
qs422016 := string(qb422016.B)
-//line lib/promscrape/targetstatus.qtpl:349
+//line lib/promscrape/targetstatus.qtpl:338
qt422016.ReleaseByteBuffer(qb422016)
-//line lib/promscrape/targetstatus.qtpl:349
+//line lib/promscrape/targetstatus.qtpl:338
return qs422016
-//line lib/promscrape/targetstatus.qtpl:349
+//line lib/promscrape/targetstatus.qtpl:338
}
-//line lib/promscrape/targetstatus.qtpl:351
+//line lib/promscrape/targetstatus.qtpl:340
func streamqueryArgs(qw422016 *qt422016.Writer, filter *requestFilter, override map[string]string) {
-//line lib/promscrape/targetstatus.qtpl:353
+//line lib/promscrape/targetstatus.qtpl:342
showOnlyUnhealthy := "false"
if filter.showOnlyUnhealthy {
showOnlyUnhealthy = "true"
@@ -937,89 +904,340 @@ func streamqueryArgs(qw422016 *qt422016.Writer, filter *requestFilter, override
qa[k] = []string{v}
}
-//line lib/promscrape/targetstatus.qtpl:370
+//line lib/promscrape/targetstatus.qtpl:359
qw422016.E().S(qa.Encode())
-//line lib/promscrape/targetstatus.qtpl:371
+//line lib/promscrape/targetstatus.qtpl:360
}
-//line lib/promscrape/targetstatus.qtpl:371
+//line lib/promscrape/targetstatus.qtpl:360
func writequeryArgs(qq422016 qtio422016.Writer, filter *requestFilter, override map[string]string) {
-//line lib/promscrape/targetstatus.qtpl:371
+//line lib/promscrape/targetstatus.qtpl:360
qw422016 := qt422016.AcquireWriter(qq422016)
-//line lib/promscrape/targetstatus.qtpl:371
+//line lib/promscrape/targetstatus.qtpl:360
streamqueryArgs(qw422016, filter, override)
-//line lib/promscrape/targetstatus.qtpl:371
+//line lib/promscrape/targetstatus.qtpl:360
qt422016.ReleaseWriter(qw422016)
-//line lib/promscrape/targetstatus.qtpl:371
+//line lib/promscrape/targetstatus.qtpl:360
}
-//line lib/promscrape/targetstatus.qtpl:371
+//line lib/promscrape/targetstatus.qtpl:360
func queryArgs(filter *requestFilter, override map[string]string) string {
-//line lib/promscrape/targetstatus.qtpl:371
+//line lib/promscrape/targetstatus.qtpl:360
qb422016 := qt422016.AcquireByteBuffer()
-//line lib/promscrape/targetstatus.qtpl:371
+//line lib/promscrape/targetstatus.qtpl:360
writequeryArgs(qb422016, filter, override)
-//line lib/promscrape/targetstatus.qtpl:371
+//line lib/promscrape/targetstatus.qtpl:360
qs422016 := string(qb422016.B)
-//line lib/promscrape/targetstatus.qtpl:371
+//line lib/promscrape/targetstatus.qtpl:360
qt422016.ReleaseByteBuffer(qb422016)
-//line lib/promscrape/targetstatus.qtpl:371
+//line lib/promscrape/targetstatus.qtpl:360
return qs422016
-//line lib/promscrape/targetstatus.qtpl:371
+//line lib/promscrape/targetstatus.qtpl:360
}
-//line lib/promscrape/targetstatus.qtpl:373
+//line lib/promscrape/targetstatus.qtpl:362
func streamformatLabels(qw422016 *qt422016.Writer, labels *promutils.Labels) {
-//line lib/promscrape/targetstatus.qtpl:374
+//line lib/promscrape/targetstatus.qtpl:363
labelsList := labels.GetLabels()
-//line lib/promscrape/targetstatus.qtpl:374
+//line lib/promscrape/targetstatus.qtpl:363
qw422016.N().S(`{`)
-//line lib/promscrape/targetstatus.qtpl:376
+//line lib/promscrape/targetstatus.qtpl:365
for i, label := range labelsList {
-//line lib/promscrape/targetstatus.qtpl:377
+//line lib/promscrape/targetstatus.qtpl:366
qw422016.E().S(label.Name)
-//line lib/promscrape/targetstatus.qtpl:377
+//line lib/promscrape/targetstatus.qtpl:366
qw422016.N().S(`=`)
-//line lib/promscrape/targetstatus.qtpl:377
+//line lib/promscrape/targetstatus.qtpl:366
qw422016.E().Q(label.Value)
-//line lib/promscrape/targetstatus.qtpl:378
+//line lib/promscrape/targetstatus.qtpl:367
if i+1 < len(labelsList) {
-//line lib/promscrape/targetstatus.qtpl:378
+//line lib/promscrape/targetstatus.qtpl:367
qw422016.N().S(`,`)
-//line lib/promscrape/targetstatus.qtpl:378
+//line lib/promscrape/targetstatus.qtpl:367
qw422016.N().S(` `)
-//line lib/promscrape/targetstatus.qtpl:378
+//line lib/promscrape/targetstatus.qtpl:367
}
+//line lib/promscrape/targetstatus.qtpl:368
+ }
+//line lib/promscrape/targetstatus.qtpl:368
+ qw422016.N().S(`}`)
+//line lib/promscrape/targetstatus.qtpl:370
+}
+
+//line lib/promscrape/targetstatus.qtpl:370
+func writeformatLabels(qq422016 qtio422016.Writer, labels *promutils.Labels) {
+//line lib/promscrape/targetstatus.qtpl:370
+ qw422016 := qt422016.AcquireWriter(qq422016)
+//line lib/promscrape/targetstatus.qtpl:370
+ streamformatLabels(qw422016, labels)
+//line lib/promscrape/targetstatus.qtpl:370
+ qt422016.ReleaseWriter(qw422016)
+//line lib/promscrape/targetstatus.qtpl:370
+}
+
+//line lib/promscrape/targetstatus.qtpl:370
+func formatLabels(labels *promutils.Labels) string {
+//line lib/promscrape/targetstatus.qtpl:370
+ qb422016 := qt422016.AcquireByteBuffer()
+//line lib/promscrape/targetstatus.qtpl:370
+ writeformatLabels(qb422016, labels)
+//line lib/promscrape/targetstatus.qtpl:370
+ qs422016 := string(qb422016.B)
+//line lib/promscrape/targetstatus.qtpl:370
+ qt422016.ReleaseByteBuffer(qb422016)
+//line lib/promscrape/targetstatus.qtpl:370
+ return qs422016
+//line lib/promscrape/targetstatus.qtpl:370
+}
+
+//line lib/promscrape/targetstatus.qtpl:374
+func streamendpointContent(qw422016 *qt422016.Writer, endpoint, targetID string) {
+//line lib/promscrape/targetstatus.qtpl:374
+ qw422016.N().S(`
+`)
+//line lib/promscrape/targetstatus.qtpl:375
+ qw422016.E().S(endpoint)
+//line lib/promscrape/targetstatus.qtpl:375
+ qw422016.N().S(` `)
+//line lib/promscrape/targetstatus.qtpl:375
+ qw422016.N().S(` `)
+//line lib/promscrape/targetstatus.qtpl:375
+ qw422016.N().S(`
+`)
+//line lib/promscrape/targetstatus.qtpl:376
+ if targetID != "" {
+//line lib/promscrape/targetstatus.qtpl:376
+ qw422016.N().S(`
+(response )
+`)
//line lib/promscrape/targetstatus.qtpl:379
}
//line lib/promscrape/targetstatus.qtpl:379
- qw422016.N().S(`}`)
-//line lib/promscrape/targetstatus.qtpl:381
+ qw422016.N().S(`
+`)
+//line lib/promscrape/targetstatus.qtpl:380
}
-//line lib/promscrape/targetstatus.qtpl:381
-func writeformatLabels(qq422016 qtio422016.Writer, labels *promutils.Labels) {
-//line lib/promscrape/targetstatus.qtpl:381
+//line lib/promscrape/targetstatus.qtpl:380
+func writeendpointContent(qq422016 qtio422016.Writer, endpoint, targetID string) {
+//line lib/promscrape/targetstatus.qtpl:380
qw422016 := qt422016.AcquireWriter(qq422016)
-//line lib/promscrape/targetstatus.qtpl:381
- streamformatLabels(qw422016, labels)
-//line lib/promscrape/targetstatus.qtpl:381
+//line lib/promscrape/targetstatus.qtpl:380
+ streamendpointContent(qw422016, endpoint, targetID)
+//line lib/promscrape/targetstatus.qtpl:380
qt422016.ReleaseWriter(qw422016)
-//line lib/promscrape/targetstatus.qtpl:381
+//line lib/promscrape/targetstatus.qtpl:380
}
-//line lib/promscrape/targetstatus.qtpl:381
-func formatLabels(labels *promutils.Labels) string {
-//line lib/promscrape/targetstatus.qtpl:381
+//line lib/promscrape/targetstatus.qtpl:380
+func endpointContent(endpoint, targetID string) string {
+//line lib/promscrape/targetstatus.qtpl:380
qb422016 := qt422016.AcquireByteBuffer()
-//line lib/promscrape/targetstatus.qtpl:381
- writeformatLabels(qb422016, labels)
-//line lib/promscrape/targetstatus.qtpl:381
+//line lib/promscrape/targetstatus.qtpl:380
+ writeendpointContent(qb422016, endpoint, targetID)
+//line lib/promscrape/targetstatus.qtpl:380
qs422016 := string(qb422016.B)
-//line lib/promscrape/targetstatus.qtpl:381
+//line lib/promscrape/targetstatus.qtpl:380
qt422016.ReleaseByteBuffer(qb422016)
-//line lib/promscrape/targetstatus.qtpl:381
+//line lib/promscrape/targetstatus.qtpl:380
return qs422016
-//line lib/promscrape/targetstatus.qtpl:381
+//line lib/promscrape/targetstatus.qtpl:380
+}
+
+//line lib/promscrape/targetstatus.qtpl:382
+func streamlabelsContent(qw422016 *qt422016.Writer, targetID string, config *ScrapeWork) {
+//line lib/promscrape/targetstatus.qtpl:382
+ qw422016.N().S(`
+
+ `)
+//line lib/promscrape/targetstatus.qtpl:385
+ streamformatLabels(qw422016, config.Labels)
+//line lib/promscrape/targetstatus.qtpl:385
+ qw422016.N().S(`
+
+`)
+//line lib/promscrape/targetstatus.qtpl:387
+ if config.OriginalLabels != nil {
+//line lib/promscrape/targetstatus.qtpl:387
+ qw422016.N().S(`
+
+ `)
+//line lib/promscrape/targetstatus.qtpl:389
+ streamformatLabels(qw422016, config.OriginalLabels)
+//line lib/promscrape/targetstatus.qtpl:389
+ qw422016.N().S(`
+
+`)
+//line lib/promscrape/targetstatus.qtpl:391
+ }
+//line lib/promscrape/targetstatus.qtpl:391
+ qw422016.N().S(`
+`)
+//line lib/promscrape/targetstatus.qtpl:392
+}
+
+//line lib/promscrape/targetstatus.qtpl:392
+func writelabelsContent(qq422016 qtio422016.Writer, targetID string, config *ScrapeWork) {
+//line lib/promscrape/targetstatus.qtpl:392
+ qw422016 := qt422016.AcquireWriter(qq422016)
+//line lib/promscrape/targetstatus.qtpl:392
+ streamlabelsContent(qw422016, targetID, config)
+//line lib/promscrape/targetstatus.qtpl:392
+ qt422016.ReleaseWriter(qw422016)
+//line lib/promscrape/targetstatus.qtpl:392
+}
+
+//line lib/promscrape/targetstatus.qtpl:392
+func labelsContent(targetID string, config *ScrapeWork) string {
+//line lib/promscrape/targetstatus.qtpl:392
+ qb422016 := qt422016.AcquireByteBuffer()
+//line lib/promscrape/targetstatus.qtpl:392
+ writelabelsContent(qb422016, targetID, config)
+//line lib/promscrape/targetstatus.qtpl:392
+ qs422016 := string(qb422016.B)
+//line lib/promscrape/targetstatus.qtpl:392
+ qt422016.ReleaseByteBuffer(qb422016)
+//line lib/promscrape/targetstatus.qtpl:392
+ return qs422016
+//line lib/promscrape/targetstatus.qtpl:392
+}
+
+//line lib/promscrape/targetstatus.qtpl:394
+func streamdebugRelabelingContent(qw422016 *qt422016.Writer, targetID string) {
+//line lib/promscrape/targetstatus.qtpl:394
+ qw422016.N().S(`
+`)
+//line lib/promscrape/targetstatus.qtpl:395
+ if targetID != "" {
+//line lib/promscrape/targetstatus.qtpl:395
+ qw422016.N().S(`
+target `)
+//line lib/promscrape/targetstatus.qtpl:396
+ qw422016.N().S(` `)
+//line lib/promscrape/targetstatus.qtpl:396
+ qw422016.N().S(`
+metrics
+`)
+//line lib/promscrape/targetstatus.qtpl:398
+ }
+//line lib/promscrape/targetstatus.qtpl:398
+ qw422016.N().S(`
+`)
+//line lib/promscrape/targetstatus.qtpl:399
+}
+
+//line lib/promscrape/targetstatus.qtpl:399
+func writedebugRelabelingContent(qq422016 qtio422016.Writer, targetID string) {
+//line lib/promscrape/targetstatus.qtpl:399
+ qw422016 := qt422016.AcquireWriter(qq422016)
+//line lib/promscrape/targetstatus.qtpl:399
+ streamdebugRelabelingContent(qw422016, targetID)
+//line lib/promscrape/targetstatus.qtpl:399
+ qt422016.ReleaseWriter(qw422016)
+//line lib/promscrape/targetstatus.qtpl:399
+}
+
+//line lib/promscrape/targetstatus.qtpl:399
+func debugRelabelingContent(targetID string) string {
+//line lib/promscrape/targetstatus.qtpl:399
+ qb422016 := qt422016.AcquireByteBuffer()
+//line lib/promscrape/targetstatus.qtpl:399
+ writedebugRelabelingContent(qb422016, targetID)
+//line lib/promscrape/targetstatus.qtpl:399
+ qs422016 := string(qb422016.B)
+//line lib/promscrape/targetstatus.qtpl:399
+ qt422016.ReleaseByteBuffer(qb422016)
+//line lib/promscrape/targetstatus.qtpl:399
+ return qs422016
+//line lib/promscrape/targetstatus.qtpl:399
+}
+
+//line lib/promscrape/targetstatus.qtpl:401
+func streamdiscoveredJobsRelabelContent(qw422016 *qt422016.Writer, originalLabels *promutils.Labels) {
+//line lib/promscrape/targetstatus.qtpl:401
+ qw422016.N().S(`
+`)
+//line lib/promscrape/targetstatus.qtpl:402
+ if originalLabels != nil {
+//line lib/promscrape/targetstatus.qtpl:402
+ qw422016.N().S(`
+`)
+//line lib/promscrape/targetstatus.qtpl:403
+ targetID := getLabelsID(originalLabels)
+
+//line lib/promscrape/targetstatus.qtpl:403
+ qw422016.N().S(`
+debug
+`)
+//line lib/promscrape/targetstatus.qtpl:405
+ }
+//line lib/promscrape/targetstatus.qtpl:405
+ qw422016.N().S(`
+`)
+//line lib/promscrape/targetstatus.qtpl:406
+}
+
+//line lib/promscrape/targetstatus.qtpl:406
+func writediscoveredJobsRelabelContent(qq422016 qtio422016.Writer, originalLabels *promutils.Labels) {
+//line lib/promscrape/targetstatus.qtpl:406
+ qw422016 := qt422016.AcquireWriter(qq422016)
+//line lib/promscrape/targetstatus.qtpl:406
+ streamdiscoveredJobsRelabelContent(qw422016, originalLabels)
+//line lib/promscrape/targetstatus.qtpl:406
+ qt422016.ReleaseWriter(qw422016)
+//line lib/promscrape/targetstatus.qtpl:406
+}
+
+//line lib/promscrape/targetstatus.qtpl:406
+func discoveredJobsRelabelContent(originalLabels *promutils.Labels) string {
+//line lib/promscrape/targetstatus.qtpl:406
+ qb422016 := qt422016.AcquireByteBuffer()
+//line lib/promscrape/targetstatus.qtpl:406
+ writediscoveredJobsRelabelContent(qb422016, originalLabels)
+//line lib/promscrape/targetstatus.qtpl:406
+ qs422016 := string(qb422016.B)
+//line lib/promscrape/targetstatus.qtpl:406
+ qt422016.ReleaseByteBuffer(qb422016)
+//line lib/promscrape/targetstatus.qtpl:406
+ return qs422016
+//line lib/promscrape/targetstatus.qtpl:406
}