diff --git a/prober/prober.go b/prober/prober.go index 333661a38..2a43628bd 100644 --- a/prober/prober.go +++ b/prober/prober.go @@ -496,7 +496,8 @@ func (p *Prober) RunHandler(w http.ResponseWriter, r *http.Request) error { return nil } - stats := fmt.Sprintf("Previous runs: success rate %d%%, median latency %v", + stats := fmt.Sprintf("Last %d probes: success rate %d%%, median latency %v\n", + len(prevInfo.RecentResults), int(prevInfo.RecentSuccessRatio()*100), prevInfo.RecentMedianLatency()) if err != nil { return tsweb.Error(respStatus, fmt.Sprintf("Probe failed: %s\n%s", err.Error(), stats), err) diff --git a/prober/status.go b/prober/status.go index 034c5302d..aa9ef99d0 100644 --- a/prober/status.go +++ b/prober/status.go @@ -86,7 +86,7 @@ func (p *Prober) StatusHandler(opts ...statusHandlerOpt) tsweb.ReturnHandlerFunc } s := probeStatus{ProbeInfo: info} if !info.End.IsZero() { - s.TimeSinceLast = time.Since(info.End) + s.TimeSinceLast = time.Since(info.End).Truncate(time.Second) } for textTpl, urlTpl := range params.probeLinks { text, err := renderTemplate(textTpl, info) diff --git a/prober/status.html b/prober/status.html index eecce1463..ff0f06c13 100644 --- a/prober/status.html +++ b/prober/status.html @@ -71,12 +71,12 @@ - + - + - + {{range $name, $probeInfo := .Probes}} @@ -100,8 +100,8 @@
NameClass & LabelsProbe Class & Labels IntervalResultLast Attempt Success LatencyErrorLast Error
{{$probeInfo.Interval}} {{if $probeInfo.TimeSinceLast}} - {{$probeInfo.TimeSinceLast.String}}
- {{$probeInfo.End}} + {{$probeInfo.TimeSinceLast.String}} ago
+ {{$probeInfo.End.Format "2006-01-02T15:04:05Z07:00"}} {{else}} Never {{end}}