changes job source for /target api (#1723)

use jobNameOriginal instead of relabeled as prometheus does

https://github.com/VictoriaMetrics/VictoriaMetrics/issues/1707
This commit is contained in:
Nikolay 2021-10-19 08:49:36 +03:00 committed by GitHub
parent ea8f625b53
commit cbcc622786
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -295,7 +295,7 @@ func (tsm *targetStatusMap) getTargetsStatusByJob() ([]jobTargetsStatuses, []str
byJob := make(map[string][]targetStatus)
tsm.mu.Lock()
for _, st := range tsm.m {
job := st.sw.Job()
job := st.sw.jobNameOriginal
byJob[job] = append(byJob[job], *st)
}
jobNames := append([]string{}, tsm.jobNames...)