diff --git a/command/agent/agent_endpoint.go b/command/agent/agent_endpoint.go index 9a64838b6..b897d5242 100644 --- a/command/agent/agent_endpoint.go +++ b/command/agent/agent_endpoint.go @@ -207,7 +207,7 @@ func (s *HTTPServer) AgentCheckUpdate(resp http.ResponseWriter, req *http.Reques total := len(update.Output) if total > CheckBufSize { - update.Output = fmt.Sprintf("%s\n...\nCaptured %d of %d bytes", + update.Output = fmt.Sprintf("%s ... (captured %d of %d bytes)", update.Output[:CheckBufSize], CheckBufSize, total) } diff --git a/command/agent/check.go b/command/agent/check.go index b82cd0544..c35d0320e 100644 --- a/command/agent/check.go +++ b/command/agent/check.go @@ -283,10 +283,10 @@ func (c *CheckTTL) getExpiredOutput() string { const prefix = "TTL expired" if c.lastOutput == "" { - return fmt.Sprintf("%s (no output was available before timeout)", prefix) + return prefix } - return fmt.Sprintf("%s (last output before timeout follows)\n\n%s", prefix, c.lastOutput) + return fmt.Sprintf("%s (last output before timeout follows): %s", prefix, c.lastOutput) } // SetStatus is used to update the status of the check,