prober: make status page more clear

Updates tailscale/corp#20583

Signed-off-by: Anton Tolchanov <anton@tailscale.com>
This commit is contained in:
Anton Tolchanov
2024-08-08 09:38:17 +01:00
committed by Anton Tolchanov
parent f79183dac7
commit 46db698333
3 changed files with 8 additions and 7 deletions
+2 -1
View File
@@ -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)