File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
x-pack/filebeat/input/azureeventhub Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ import (
23
23
v2 "github.com/elastic/beats/v7/filebeat/input/v2"
24
24
"github.com/elastic/beats/v7/libbeat/beat"
25
25
"github.com/elastic/beats/v7/libbeat/common/acker"
26
+ "github.com/elastic/beats/v7/libbeat/management/status"
26
27
"github.com/elastic/elastic-agent-libs/logp"
27
28
"github.com/elastic/elastic-agent-libs/mapstr"
28
29
)
@@ -68,6 +69,9 @@ func (in *eventHubInputV1) Run(
68
69
) error {
69
70
var err error
70
71
72
+ // Update the status to starting
73
+ inputContext .UpdateStatus (status .Starting , "" )
74
+
71
75
// Create pipelineClient for publishing events.
72
76
in .pipelineClient , err = createPipelineClient (pipeline )
73
77
if err != nil {
@@ -105,9 +109,11 @@ func (in *eventHubInputV1) Run(
105
109
err = in .run (ctx )
106
110
if err != nil {
107
111
in .log .Errorw ("error running input" , "error" , err )
112
+ inputContext .UpdateStatus (status .Failed , err .Error ())
108
113
return err
109
114
}
110
115
116
+ inputContext .UpdateStatus (status .Stopped , "" )
111
117
return nil
112
118
}
113
119
You can’t perform that action at this time.
0 commit comments