{% import "github.com/VictoriaMetrics/VictoriaMetrics/lib/prompbmarshal" %} {% collapsespace %} {% func TargetsResponsePlain (jts []jobTargetsStatuses, showOriginLabels bool) -%} {% for _, js := range jts %} job={%q= js.job %} ({%d js.upCount %}/{%d js.targetsTotal %} up) {% newline %} {% for _, ts := range js.targetsStatus %} {% code labels := promLabelsString(ts.labels) ol := promLabelsString(ts.originalLabels) %} {%s= "\t" %}state={% if ts.up %}up{% else %}down{% endif %}, endpoint={%s= ts.endpoint %}, labels={%s= labels %} {% if showOriginLabels %}, originalLabels={%s= ol %}{% endif %}, last_scrape={%f.3 ts.lastScrapeTime.Seconds() %}s ago, scrape_duration={%f.3 ts.scrapeDuration.Seconds() %}s, error={%q= ts.error %} {% newline %} {% endfor %} {% endfor %} {% newline %} {% endfunc %} {% func TargetsResponseHTML(jts []jobTargetsStatuses, redirectPath string, onlyUnhealthy bool) %}
Endpoint | State | Labels | Last Scrape | Scrape Duration | Error |
---|---|---|---|---|---|
{%s ts.endpoint %} |
{% if ts.up %}UP{% else %}DOWN{% endif %} | {%= formatLabel(ts.labels) %} | {%f.3 ts.lastScrapeTime.Seconds() %}s ago | {%f.3 ts.scrapeDuration.Seconds() %}s | {%s ts.error %} |