You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Today when we encounter an error loading an input or output configuration send by the Elastic Agent we cannot associate that error with a specific input or integration. Instead we report the entire Beat component process as failed:
// any error during reload changes the whole state of the beat to failed
iflen(errs) >0 {
cm.status=lbmanagement.Failed
cm.message=fmt.Sprintf("%s", errs)
}
Instead of failing the entire component, errors should always be reported for the Unit representing the input configuration that failed. This can be done using the UpdateState method of the Elastic Agent V2 client.
For outputs this should be straightforward because there is only one output unit today:
// If there are any other errors, set the status accordingly.
// If len(errs), then the there were no previous and the only
// error has been reported already.
iflen(errs) >0 {
errs=append(errs, err)
cm.message=fmt.Sprintf("%s", errs)
}
For inputs we will need to propagate the input unit ID into the Beats object reloaded, because each input configuration is consolidated into a single Beat configuration representing all inputs:
Today when we encounter an error loading an input or output configuration send by the Elastic Agent we cannot associate that error with a specific input or integration. Instead we report the entire Beat component process as failed:
beats/x-pack/libbeat/management/managerV2.go
Lines 627 to 631 in 3325ba1
Instead of failing the entire component, errors should always be reported for the Unit representing the input configuration that failed. This can be done using the UpdateState method of the Elastic Agent V2 client.
For outputs this should be straightforward because there is only one output unit today:
beats/x-pack/libbeat/management/managerV2.go
Lines 591 to 610 in 3325ba1
For inputs we will need to propagate the input unit ID into the Beats object reloaded, because each input configuration is consolidated into a single Beat configuration representing all inputs:
beats/x-pack/libbeat/management/managerV2.go
Line 747 in 3325ba1
Definition of Done:
elastic-agent status
.The text was updated successfully, but these errors were encountered: