Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.next.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -208,3 +208,4 @@
- Add `lumberjack` input type to the Filebeat spec. {pull}[959]
- Add support for hints' based autodiscovery in kubernetes provider. {pull}[698]
- Improve logging during upgrades. {pull}[1287]
- Added status message to CheckinRequest {pull}[1369]
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,7 @@ func (f *fleetGateway) execute(ctx context.Context) (*fleetapi.CheckinResponse,
AckToken: ackToken,
Metadata: ecsMeta,
Status: f.statusController.StatusString(),
Message: f.statusController.Status().Message,
}

resp, err := cmd.Execute(ctx, req)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import (
"github.com/elastic/elastic-agent/internal/pkg/agent/storage"
"github.com/elastic/elastic-agent/internal/pkg/agent/storage/store"
"github.com/elastic/elastic-agent/internal/pkg/core/state"
"github.com/elastic/elastic-agent/internal/pkg/core/status"
"github.com/elastic/elastic-agent/internal/pkg/fleetapi"
noopacker "github.com/elastic/elastic-agent/internal/pkg/fleetapi/acker/noop"
"github.com/elastic/elastic-agent/internal/pkg/scheduler"
Expand Down Expand Up @@ -717,6 +718,7 @@ func TestRetriesOnFailures(t *testing.T) {
statusController.On("RegisterComponent", "gateway").Return(fleetReporter).Once()
statusController.On("RegisterLocalComponent", "gateway-checkin").Return(localReporter).Once()
statusController.On("StatusString").Return("string")
statusController.On("Status").Return(status.AgentStatus{Message: "message"})

gateway, err := newFleetGatewayWithScheduler(
ctx,
Expand Down
1 change: 1 addition & 0 deletions internal/pkg/fleetapi/checkin_cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ const checkingPath = "/api/fleet/agents/%s/checkin"
// CheckinRequest consists of multiple events reported to fleet ui.
type CheckinRequest struct {
Status string `json:"status"`
Message string `json:"message"`
AckToken string `json:"ack_token,omitempty"`
Metadata *info.ECSMeta `json:"local_metadata,omitempty"`
}
Expand Down