diff --git a/pkg/endpoint/endpoint.go b/pkg/endpoint/endpoint.go
index <HASH>..<HASH> 100644
--- a/pkg/endpoint/endpoint.go
+++ b/pkg/endpoint/endpoint.go
@@ -993,9 +993,10 @@ func (e *Endpoint) LogStatusOK(typ StatusType, msg string) {
 func (e *Endpoint) logStatusLocked(typ StatusType, code StatusCode, msg string) {
 	sts := &statusLogMsg{
 		Status: Status{
-			Code: code,
-			Msg:  msg,
-			Type: typ,
+			Code:  code,
+			Msg:   msg,
+			Type:  typ,
+			State: e.state,
 		},
 		Timestamp: time.Now().UTC(),
 	}
diff --git a/pkg/endpoint/status.go b/pkg/endpoint/status.go
index <HASH>..<HASH> 100644
--- a/pkg/endpoint/status.go
+++ b/pkg/endpoint/status.go
@@ -40,9 +40,10 @@ const (
 )
 
 type Status struct {
-	Code StatusCode `json:"code"`
-	Msg  string     `json:"msg"`
-	Type StatusType `json:"status-type"`
+	Code  StatusCode `json:"code"`
+	Msg   string     `json:"msg"`
+	Type  StatusType `json:"status-type"`
+	State string     `json:"state"`
 }
 
 func (sc StatusCode) ColorString() string {
endpoint: Store endpoint state in status log

We now store the state of the endpoint when we store a status log. This
can be later exported via the API and used to understand the lifecycle of an
endpoint.