generated from sendnrw/template_golang
exporter.go aktualisiert
Some checks failed
build-binaries / build (, amd64, linux) (push) Has been skipped
build-binaries / build (, arm, 7, linux) (push) Has been skipped
build-binaries / build (, arm64, linux) (push) Has been skipped
build-binaries / build (.exe, amd64, windows) (push) Has been skipped
build-binaries / release (push) Has been skipped
build-binaries / publish-agent (push) Has been skipped
release-tag / release-image (push) Failing after 2m2s
Some checks failed
build-binaries / build (, amd64, linux) (push) Has been skipped
build-binaries / build (, arm, 7, linux) (push) Has been skipped
build-binaries / build (, arm64, linux) (push) Has been skipped
build-binaries / build (.exe, amd64, windows) (push) Has been skipped
build-binaries / release (push) Has been skipped
build-binaries / publish-agent (push) Has been skipped
release-tag / release-image (push) Failing after 2m2s
This commit is contained in:
@@ -74,7 +74,7 @@ var (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
prometheus.MustRegister(pingUp, pingRTT, pingRTTAvg, pingPacketsSent, pingPacketsRecv)
|
prometheus.MustRegister(pingUp, pingRTT, pingRTTMs, pingRTTAvg, pingPacketsSent, pingPacketsRecv)
|
||||||
}
|
}
|
||||||
|
|
||||||
func (t *TargetRunner) Run(stop <-chan struct{}) {
|
func (t *TargetRunner) Run(stop <-chan struct{}) {
|
||||||
@@ -101,9 +101,11 @@ func (t *TargetRunner) Run(stop <-chan struct{}) {
|
|||||||
|
|
||||||
sec := res.RTT.Seconds()
|
sec := res.RTT.Seconds()
|
||||||
pingRTT.With(lbl).Set(sec)
|
pingRTT.With(lbl).Set(sec)
|
||||||
|
pingRTTMs.With(lbl).Set(sec * 1000)
|
||||||
|
|
||||||
avg := t.addToHistoryAndAvg(sec)
|
avg := t.addToHistoryAndAvg(sec)
|
||||||
pingRTTAvg.With(lbl).Set(avg)
|
pingRTTAvg.With(lbl).Set(avgSec)
|
||||||
|
pingRTTAvgMs.With(lbl).Set(avgSec * 1000)
|
||||||
} else {
|
} else {
|
||||||
pingUp.With(lbl).Set(0)
|
pingUp.With(lbl).Set(0)
|
||||||
// RTT nicht ändern oder auf 0 setzen?
|
// RTT nicht ändern oder auf 0 setzen?
|
||||||
|
|||||||
Reference in New Issue
Block a user