mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-12-15 08:23:34 +01:00
app/vmagent: fix creating target id if --promscrape.dropOriginalLabels
flag was used (#4616)
* app/vmagent: fix creating target id if `--promscrape.dropOriginalLabels` flag was used * app/vmagent: hide links if OriginalLabels was dropped * app/vmagent: update CHANGELOG.md and added information to the docs * app/vmagent: fix comments
This commit is contained in:
parent
7e24edd506
commit
f0d8f77e6d
@ -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
|
||||
|
@ -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.
|
||||
|
||||
|
@ -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
|
||||
|
@ -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)))
|
||||
}
|
||||
|
||||
|
@ -228,10 +228,7 @@
|
||||
%}
|
||||
<tr {% if !ts.up %}{%space%}class="alert alert-danger" role="alert" {% endif %}>
|
||||
<td class="endpoint">
|
||||
<a href="{%s endpoint %}" target="_blank">{%s endpoint %}</a> (
|
||||
<a href="target_response?id={%s targetID %}" target="_blank"
|
||||
title="click to fetch target response on behalf of the scraper">response</a>
|
||||
)
|
||||
{%= endpointContent(endpoint, targetID)%}
|
||||
</td>
|
||||
<td>
|
||||
{% if ts.up %}
|
||||
@ -241,17 +238,10 @@
|
||||
{% endif %}
|
||||
</td>
|
||||
<td class="labels">
|
||||
<div title="click to show original labels"
|
||||
onclick="document.getElementById('original-labels-{%s targetID %}').style.display='block'">
|
||||
{%= formatLabels(ts.sw.Config.Labels) %}
|
||||
</div>
|
||||
<div style="display:none" id="original-labels-{%s targetID %}">
|
||||
{%= formatLabels(ts.sw.Config.OriginalLabels) %}
|
||||
</div>
|
||||
{%= labelsContent(targetID, ts.sw.Config) %}
|
||||
</td>
|
||||
<td>
|
||||
<a href="target-relabel-debug?id={%s targetID %}" target="_blank">target</a>{% space %}
|
||||
<a href="metric-relabel-debug?id={%s targetID %}" target="_blank">metrics</a>
|
||||
{%= debugRelabelingContent(targetID)%}
|
||||
</td>
|
||||
<td>{%d ts.scrapesTotal %}</td>
|
||||
<td>{%d ts.scrapesFailed %}</td>
|
||||
@ -327,8 +317,7 @@
|
||||
{%= formatLabels(t.labels) %}
|
||||
</td>
|
||||
<td>
|
||||
{% code targetID := getLabelsID(t.originalLabels) %}
|
||||
<a href="target-relabel-debug?id={%s targetID %}" target="_blank">debug</a>
|
||||
{%= discoveredJobsRelabelContent(t.originalLabels) %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
@ -381,3 +370,37 @@
|
||||
{% endfunc %}
|
||||
|
||||
{% endstripspace %}
|
||||
|
||||
{% func endpointContent(endpoint, targetID string) %}
|
||||
<a href="{%s endpoint %}" target="_blank">{%s endpoint %}</a>{% space %}
|
||||
{% if targetID != "" %}
|
||||
(<a href="target_response?id={%s targetID %}" target="_blank"
|
||||
title="click to fetch target response on behalf of the scraper">response</a>)
|
||||
{% endif %}
|
||||
{% endfunc %}
|
||||
|
||||
{% func labelsContent(targetID string, config *ScrapeWork) %}
|
||||
<div title="click to show original labels"
|
||||
{% if targetID != "" %}onclick="document.getElementById('original-labels-{%s targetID %}').style.display='block'" {% endif %}>
|
||||
{%= formatLabels(config.Labels) %}
|
||||
</div>
|
||||
{% if config.OriginalLabels != nil %}
|
||||
<div style="display:none" id="original-labels-{%s targetID %}">
|
||||
{%= formatLabels(config.OriginalLabels) %}
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endfunc %}
|
||||
|
||||
{% func debugRelabelingContent(targetID string) %}
|
||||
{% if targetID != "" %}
|
||||
<a href="target-relabel-debug?id={%s targetID %}" target="_blank">target</a>{% space %}
|
||||
<a href="metric-relabel-debug?id={%s targetID %}" target="_blank">metrics</a>
|
||||
{% endif %}
|
||||
{% endfunc %}
|
||||
|
||||
{% func discoveredJobsRelabelContent(originalLabels *promutils.Labels) %}
|
||||
{% if originalLabels != nil %}
|
||||
{% code targetID := getLabelsID(originalLabels) %}
|
||||
<a href="target-relabel-debug?id={%s targetID %}" target="_blank">debug</a>
|
||||
{% endif %}
|
||||
{% endfunc %}
|
||||
|
@ -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(`><td class="endpoint"><a href="`)
|
||||
qw422016.N().S(`><td class="endpoint">`)
|
||||
//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(`</a> (<a href="target_response?id=`)
|
||||
//line lib/promscrape/targetstatus.qtpl:232
|
||||
qw422016.E().S(targetID)
|
||||
//line lib/promscrape/targetstatus.qtpl:232
|
||||
qw422016.N().S(`" target="_blank"title="click to fetch target response on behalf of the scraper">response</a>)</td><td>`)
|
||||
//line lib/promscrape/targetstatus.qtpl:237
|
||||
qw422016.N().S(`</td><td>`)
|
||||
//line lib/promscrape/targetstatus.qtpl:234
|
||||
if ts.up {
|
||||
//line lib/promscrape/targetstatus.qtpl:237
|
||||
//line lib/promscrape/targetstatus.qtpl:234
|
||||
qw422016.N().S(`<span class="badge bg-success">UP</span>`)
|
||||
//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(`<span class="badge bg-danger">DOWN</span>`)
|
||||
//line lib/promscrape/targetstatus.qtpl:241
|
||||
//line lib/promscrape/targetstatus.qtpl:238
|
||||
}
|
||||
//line lib/promscrape/targetstatus.qtpl:238
|
||||
qw422016.N().S(`</td><td class="labels">`)
|
||||
//line lib/promscrape/targetstatus.qtpl:241
|
||||
qw422016.N().S(`</td><td class="labels"><div title="click to show original labels"onclick="document.getElementById('original-labels-`)
|
||||
//line lib/promscrape/targetstatus.qtpl:245
|
||||
qw422016.E().S(targetID)
|
||||
//line lib/promscrape/targetstatus.qtpl:245
|
||||
qw422016.N().S(`').style.display='block'">`)
|
||||
streamlabelsContent(qw422016, targetID, ts.sw.Config)
|
||||
//line lib/promscrape/targetstatus.qtpl:241
|
||||
qw422016.N().S(`</td><td>`)
|
||||
//line lib/promscrape/targetstatus.qtpl:244
|
||||
streamdebugRelabelingContent(qw422016, targetID)
|
||||
//line lib/promscrape/targetstatus.qtpl:244
|
||||
qw422016.N().S(`</td><td>`)
|
||||
//line lib/promscrape/targetstatus.qtpl:246
|
||||
streamformatLabels(qw422016, ts.sw.Config.Labels)
|
||||
//line lib/promscrape/targetstatus.qtpl:246
|
||||
qw422016.N().S(`</div><div style="display:none" id="original-labels-`)
|
||||
//line lib/promscrape/targetstatus.qtpl:248
|
||||
qw422016.E().S(targetID)
|
||||
//line lib/promscrape/targetstatus.qtpl:248
|
||||
qw422016.N().S(`">`)
|
||||
//line lib/promscrape/targetstatus.qtpl:249
|
||||
streamformatLabels(qw422016, ts.sw.Config.OriginalLabels)
|
||||
//line lib/promscrape/targetstatus.qtpl:249
|
||||
qw422016.N().S(`</div></td><td><a href="target-relabel-debug?id=`)
|
||||
//line lib/promscrape/targetstatus.qtpl:253
|
||||
qw422016.E().S(targetID)
|
||||
//line lib/promscrape/targetstatus.qtpl:253
|
||||
qw422016.N().S(`" target="_blank">target</a>`)
|
||||
//line lib/promscrape/targetstatus.qtpl:253
|
||||
qw422016.N().S(` `)
|
||||
//line lib/promscrape/targetstatus.qtpl:253
|
||||
qw422016.N().S(`<a href="metric-relabel-debug?id=`)
|
||||
//line lib/promscrape/targetstatus.qtpl:254
|
||||
qw422016.E().S(targetID)
|
||||
//line lib/promscrape/targetstatus.qtpl:254
|
||||
qw422016.N().S(`" target="_blank">metrics</a></td><td>`)
|
||||
//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(`</td><td>`)
|
||||
//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(`</td><td>`)
|
||||
//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(`<td>`)
|
||||
//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</td><td>`)
|
||||
//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(`</td><td>`)
|
||||
//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(`</td></tr>`)
|
||||
//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(`</tbody></table></div></div></div>`)
|
||||
//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(`<div class="row mt-4"><div class="col-12">`)
|
||||
//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(`</div></div>`)
|
||||
//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(`<h4><span class="me-2">`)
|
||||
//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)</span>`)
|
||||
//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(`</h4><div id="scrape-job-`)
|
||||
//line lib/promscrape/targetstatus.qtpl:292
|
||||
//line lib/promscrape/targetstatus.qtpl:282
|
||||
qw422016.N().D(num)
|
||||
//line lib/promscrape/targetstatus.qtpl:292
|
||||
//line lib/promscrape/targetstatus.qtpl:282
|
||||
qw422016.N().S(`" class="scrape-job table-responsive"><table class="table table-striped table-hover table-bordered table-sm"><thead><tr><th scope="col" style="width: 5%">Status</th><th scope="col" style="width: 60%">Discovered Labels</th><th scope="col" style="width: 30%">Target Labels</th><th scope="col" stile="width: 5%">Debug relabeling</a></tr></thead><tbody>`)
|
||||
//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(`<tr`)
|
||||
//line lib/promscrape/targetstatus.qtpl:305
|
||||
//line lib/promscrape/targetstatus.qtpl:295
|
||||
if !t.up {
|
||||
//line lib/promscrape/targetstatus.qtpl:306
|
||||
//line lib/promscrape/targetstatus.qtpl:296
|
||||
qw422016.N().S(` `)
|
||||
//line lib/promscrape/targetstatus.qtpl:306
|
||||
//line lib/promscrape/targetstatus.qtpl:296
|
||||
qw422016.N().S(`role="alert"`)
|
||||
//line lib/promscrape/targetstatus.qtpl:306
|
||||
//line lib/promscrape/targetstatus.qtpl:296
|
||||
qw422016.N().S(` `)
|
||||
//line lib/promscrape/targetstatus.qtpl:307
|
||||
//line lib/promscrape/targetstatus.qtpl:297
|
||||
if t.labels.Len() > 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(`><td>`)
|
||||
//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(`<span class="badge bg-success">UP</span>`)
|
||||
//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(`<span class="badge bg-danger">DOWN</span>`)
|
||||
//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(`<span class="badge bg-warning">DROPPED</span>`)
|
||||
//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(`</td><td class="labels">`)
|
||||
//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(`</td><td class="labels">`)
|
||||
//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(`</td><td>`)
|
||||
//line lib/promscrape/targetstatus.qtpl:330
|
||||
targetID := getLabelsID(t.originalLabels)
|
||||
|
||||
//line lib/promscrape/targetstatus.qtpl:330
|
||||
qw422016.N().S(`<a href="target-relabel-debug?id=`)
|
||||
//line lib/promscrape/targetstatus.qtpl:331
|
||||
qw422016.E().S(targetID)
|
||||
//line lib/promscrape/targetstatus.qtpl:331
|
||||
qw422016.N().S(`" target="_blank">debug</a></td></tr>`)
|
||||
//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(`</td></tr>`)
|
||||
//line lib/promscrape/targetstatus.qtpl:323
|
||||
}
|
||||
//line lib/promscrape/targetstatus.qtpl:334
|
||||
//line lib/promscrape/targetstatus.qtpl:323
|
||||
qw422016.N().S(`</tbody></table></div>`)
|
||||
//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(`<button type="button" class="btn btn-primary btn-sm me-1"onclick="document.getElementById('scrape-job-`)
|
||||
//line lib/promscrape/targetstatus.qtpl:342
|
||||
//line lib/promscrape/targetstatus.qtpl:331
|
||||
qw422016.N().D(num)
|
||||
//line lib/promscrape/targetstatus.qtpl:342
|
||||
//line lib/promscrape/targetstatus.qtpl:331
|
||||
qw422016.N().S(`').style.display='none'">collapse</button><button type="button" class="btn btn-secondary btn-sm me-1"onclick="document.getElementById('scrape-job-`)
|
||||
//line lib/promscrape/targetstatus.qtpl:346
|
||||
//line lib/promscrape/targetstatus.qtpl:335
|
||||
qw422016.N().D(num)
|
||||
//line lib/promscrape/targetstatus.qtpl:346
|
||||
//line lib/promscrape/targetstatus.qtpl:335
|
||||
qw422016.N().S(`').style.display='block'">expand</button>`)
|
||||
//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(`
|
||||
<a href="`)
|
||||
//line lib/promscrape/targetstatus.qtpl:375
|
||||
qw422016.E().S(endpoint)
|
||||
//line lib/promscrape/targetstatus.qtpl:375
|
||||
qw422016.N().S(`" target="_blank">`)
|
||||
//line lib/promscrape/targetstatus.qtpl:375
|
||||
qw422016.E().S(endpoint)
|
||||
//line lib/promscrape/targetstatus.qtpl:375
|
||||
qw422016.N().S(`</a>`)
|
||||
//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(`
|
||||
(<a href="target_response?id=`)
|
||||
//line lib/promscrape/targetstatus.qtpl:377
|
||||
qw422016.E().S(targetID)
|
||||
//line lib/promscrape/targetstatus.qtpl:377
|
||||
qw422016.N().S(`" target="_blank"
|
||||
title="click to fetch target response on behalf of the scraper">response</a>)
|
||||
`)
|
||||
//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(`
|
||||
<div title="click to show original labels"
|
||||
`)
|
||||
//line lib/promscrape/targetstatus.qtpl:384
|
||||
if targetID != "" {
|
||||
//line lib/promscrape/targetstatus.qtpl:384
|
||||
qw422016.N().S(`onclick="document.getElementById('original-labels-`)
|
||||
//line lib/promscrape/targetstatus.qtpl:384
|
||||
qw422016.E().S(targetID)
|
||||
//line lib/promscrape/targetstatus.qtpl:384
|
||||
qw422016.N().S(`').style.display='block'" `)
|
||||
//line lib/promscrape/targetstatus.qtpl:384
|
||||
}
|
||||
//line lib/promscrape/targetstatus.qtpl:384
|
||||
qw422016.N().S(`>
|
||||
`)
|
||||
//line lib/promscrape/targetstatus.qtpl:385
|
||||
streamformatLabels(qw422016, config.Labels)
|
||||
//line lib/promscrape/targetstatus.qtpl:385
|
||||
qw422016.N().S(`
|
||||
</div>
|
||||
`)
|
||||
//line lib/promscrape/targetstatus.qtpl:387
|
||||
if config.OriginalLabels != nil {
|
||||
//line lib/promscrape/targetstatus.qtpl:387
|
||||
qw422016.N().S(`
|
||||
<div style="display:none" id="original-labels-`)
|
||||
//line lib/promscrape/targetstatus.qtpl:388
|
||||
qw422016.E().S(targetID)
|
||||
//line lib/promscrape/targetstatus.qtpl:388
|
||||
qw422016.N().S(`">
|
||||
`)
|
||||
//line lib/promscrape/targetstatus.qtpl:389
|
||||
streamformatLabels(qw422016, config.OriginalLabels)
|
||||
//line lib/promscrape/targetstatus.qtpl:389
|
||||
qw422016.N().S(`
|
||||
</div>
|
||||
`)
|
||||
//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(`
|
||||
<a href="target-relabel-debug?id=`)
|
||||
//line lib/promscrape/targetstatus.qtpl:396
|
||||
qw422016.E().S(targetID)
|
||||
//line lib/promscrape/targetstatus.qtpl:396
|
||||
qw422016.N().S(`" target="_blank">target</a>`)
|
||||
//line lib/promscrape/targetstatus.qtpl:396
|
||||
qw422016.N().S(` `)
|
||||
//line lib/promscrape/targetstatus.qtpl:396
|
||||
qw422016.N().S(`
|
||||
<a href="metric-relabel-debug?id=`)
|
||||
//line lib/promscrape/targetstatus.qtpl:397
|
||||
qw422016.E().S(targetID)
|
||||
//line lib/promscrape/targetstatus.qtpl:397
|
||||
qw422016.N().S(`" target="_blank">metrics</a>
|
||||
`)
|
||||
//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(`
|
||||
<a href="target-relabel-debug?id=`)
|
||||
//line lib/promscrape/targetstatus.qtpl:404
|
||||
qw422016.E().S(targetID)
|
||||
//line lib/promscrape/targetstatus.qtpl:404
|
||||
qw422016.N().S(`" target="_blank">debug</a>
|
||||
`)
|
||||
//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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user