-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[CM] Send error from beats back to Kibana #9382
Labels
Comments
4 tasks
ph
added a commit
to ph/beats
that referenced
this issue
Feb 4, 2019
…backend Motivation: Currently CM allow send on the next tick a ConfigOK => true if the previous config was successfully applied. This PR do the following thing: 1. Add a AuthClient that wraps a Client but make sure that all calls are authenticated using the defined UUID and the AccessToken. 2. Add an EventsReporter as part of the `api` package that will send asynchrously api.Event to the CM backend. The reporter is started and closed at the same time of the Manager, on close events are flushed to the backend. 3. Events are send in batch of a 1000 to the Kibana endpoint. (configurable) 5. Any errors from `BlackList` or `Reload` are send as Event. 6. Introduce Manager's State with the following: STARTING, IN_PROGRESS, RUNNING, FAILED, STOPPED and will be send to the event endpoints. 7. Events are send by default every 30 sec. (configurable) PATH: /api/beats/{UUID}/events exist Verb used: "POST" Request example: ```json [ {"type": "STATE", "event": { "type": "STARTING", "message": "State change: STARTING"}}, {"type": "STATE", "event": { "type": "STARTING", "message": "State change: IN_PROGRESS"}}, {"type": "STATE", "event": { "type": "STARTING", "message": "State change: FAILED"}}, {"type": "ERROR", "event": { "type": "CONFIG", "message": "a bad error", "uuid": "xxxxxxxxxxxxx"}} # uuid could be omnitted {"type": "ERROR", "event": { "type": "CONFIG", "message": "another bad error", "uuid": "xxxxxxxxxxxxx"}} {"type": "STATE", "event": { "type": "STARTING", "message": "State change: STOPPED"}}, ] ``` Expected response: ```json { "response": [ { "success": true } { "success": true } { "success": true } { "success": true } { "success": true } { "success": true } ] } ``` - [ ] Add the UUID from the API, waiting on api implementation to do that / review. Fixes: elastic#9382
ph
added a commit
that referenced
this issue
Feb 4, 2019
…bana backend (#9865) * Allow Central management to send errors or events back to the Kibana backend Motivation: Currently CM allow send on the next tick a ConfigOK => true if the previous config was successfully applied. This PR do the following thing: 1. Add a AuthClient that wraps a Client but make sure that all calls are authenticated using the defined UUID and the AccessToken. 2. Add an EventsReporter as part of the `api` package that will send asynchrously api.Event to the CM backend. The reporter is started and closed at the same time of the Manager, on close events are flushed to the backend. 3. Events are send in batch of a 1000 to the Kibana endpoint. (configurable) 5. Any errors from `BlackList` or `Reload` are send as Event. 6. Introduce Manager's State with the following: STARTING, IN_PROGRESS, RUNNING, FAILED, STOPPED and will be send to the event endpoints. 7. Events are send by default every 30 sec. (configurable) PATH: /api/beats/{UUID}/events exist Verb used: "POST" Request example: ```json [ {"type": "STATE", "event": { "type": "STARTING", "message": "State change: STARTING"}}, {"type": "STATE", "event": { "type": "STARTING", "message": "State change: IN_PROGRESS"}}, {"type": "STATE", "event": { "type": "STARTING", "message": "State change: FAILED"}}, {"type": "ERROR", "event": { "type": "CONFIG", "message": "a bad error", "uuid": "xxxxxxxxxxxxx"}} # uuid could be omnitted {"type": "ERROR", "event": { "type": "CONFIG", "message": "another bad error", "uuid": "xxxxxxxxxxxxx"}} {"type": "STATE", "event": { "type": "STARTING", "message": "State change: STOPPED"}}, ] ``` Expected response: ```json { "response": [ { "success": true } { "success": true } { "success": true } { "success": true } { "success": true } { "success": true } ] } ``` Fixes: #9382
ph
added a commit
to ph/beats
that referenced
this issue
Feb 4, 2019
…bana backend (elastic#9865) * Allow Central management to send errors or events back to the Kibana backend Motivation: Currently CM allow send on the next tick a ConfigOK => true if the previous config was successfully applied. This PR do the following thing: 1. Add a AuthClient that wraps a Client but make sure that all calls are authenticated using the defined UUID and the AccessToken. 2. Add an EventsReporter as part of the `api` package that will send asynchrously api.Event to the CM backend. The reporter is started and closed at the same time of the Manager, on close events are flushed to the backend. 3. Events are send in batch of a 1000 to the Kibana endpoint. (configurable) 5. Any errors from `BlackList` or `Reload` are send as Event. 6. Introduce Manager's State with the following: STARTING, IN_PROGRESS, RUNNING, FAILED, STOPPED and will be send to the event endpoints. 7. Events are send by default every 30 sec. (configurable) PATH: /api/beats/{UUID}/events exist Verb used: "POST" Request example: ```json [ {"type": "STATE", "event": { "type": "STARTING", "message": "State change: STARTING"}}, {"type": "STATE", "event": { "type": "STARTING", "message": "State change: IN_PROGRESS"}}, {"type": "STATE", "event": { "type": "STARTING", "message": "State change: FAILED"}}, {"type": "ERROR", "event": { "type": "CONFIG", "message": "a bad error", "uuid": "xxxxxxxxxxxxx"}} # uuid could be omnitted {"type": "ERROR", "event": { "type": "CONFIG", "message": "another bad error", "uuid": "xxxxxxxxxxxxx"}} {"type": "STATE", "event": { "type": "STARTING", "message": "State change: STOPPED"}}, ] ``` Expected response: ```json { "response": [ { "success": true } { "success": true } { "success": true } { "success": true } { "success": true } { "success": true } ] } ``` Fixes: elastic#9382 (cherry picked from commit 16fb12e)
ph
added a commit
that referenced
this issue
Feb 5, 2019
…s or events back to the Kibana backend (#10548) * [CM] Allow Central management to send errors or events back to the Kibana backend (#9865) * Allow Central management to send errors or events back to the Kibana backend Motivation: Currently CM allow send on the next tick a ConfigOK => true if the previous config was successfully applied. This PR do the following thing: 1. Add a AuthClient that wraps a Client but make sure that all calls are authenticated using the defined UUID and the AccessToken. 2. Add an EventsReporter as part of the `api` package that will send asynchrously api.Event to the CM backend. The reporter is started and closed at the same time of the Manager, on close events are flushed to the backend. 3. Events are send in batch of a 1000 to the Kibana endpoint. (configurable) 5. Any errors from `BlackList` or `Reload` are send as Event. 6. Introduce Manager's State with the following: STARTING, IN_PROGRESS, RUNNING, FAILED, STOPPED and will be send to the event endpoints. 7. Events are send by default every 30 sec. (configurable) PATH: /api/beats/{UUID}/events exist Verb used: "POST" Request example: ```json [ {"type": "STATE", "event": { "type": "STARTING", "message": "State change: STARTING"}}, {"type": "STATE", "event": { "type": "STARTING", "message": "State change: IN_PROGRESS"}}, {"type": "STATE", "event": { "type": "STARTING", "message": "State change: FAILED"}}, {"type": "ERROR", "event": { "type": "CONFIG", "message": "a bad error", "uuid": "xxxxxxxxxxxxx"}} # uuid could be omnitted {"type": "ERROR", "event": { "type": "CONFIG", "message": "another bad error", "uuid": "xxxxxxxxxxxxx"}} {"type": "STATE", "event": { "type": "STARTING", "message": "State change: STOPPED"}}, ] ``` Expected response: ```json { "response": [ { "success": true } { "success": true } { "success": true } { "success": true } { "success": true } { "success": true } ] } ``` Fixes: #9382 (cherry picked from commit 16fb12e)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In the current UI form we only display a boolean flag next to the beats that defines if the beats has the configuration applied or not. Beats is a complex agent and this is not enough to provide feedback to the user, we want to introduce in Kibana a STATE field instead that will represent the following concept:
Beats requirements/tasks:
Nice to have:
CC @mattapperson @monicasarbu
The text was updated successfully, but these errors were encountered: