Open-source status page, incident response and uptime monitoring
TypeScript alertingincident-managementmcpmcp-servermonitoringmonitoring-as-codeobservabilityon-callopen-sourcesrestatus-pagestatuspagesynthetic-monitoringterraformtinybirdtursouptimeuptime-checkeruptime-monitor
🚀 add body data (#961)
Thibault Le Ouaye771b72a444b
diff --git a/apps/checker/ping.go b/apps/checker/ping.goindex 367ee8d01..47d48d6a4 100644--- a/apps/checker/ping.go+++ b/apps/checker/ping.go@@ -231,6 +231,16 @@ func SinglePing(ctx context.Context, client *http.Client, inputData request.Pingreturn Response{}, fmt.Errorf("error with monitorURL %s: %w", inputData.URL, err)}defer res.Body.Close()+ body, err := io.ReadAll(res.Body)++ if err != nil {+ return Response{+ Latency: latency,+ Timing: timing,+ Time: start.UTC().UnixMilli(),+ Error: fmt.Sprintf("Cannot read response body: %s", err.Error()),+ }, fmt.Errorf("error with monitorURL %s: %w", inputData.URL, err)+ }headers := make(map[string]string)for key := range res.Header {@@ -243,5 +253,6 @@ func SinglePing(ctx context.Context, client *http.Client, inputData request.PingHeaders: headers,Timing: timing,Latency: latency,+ Body: string(body),}, nil}