-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[eventLog][docs] updates README.md #92563
Conversation
resolves elastic#89998 The README.md for the event log was a bit old, and was more focused on implementation details and information for plugin developers writing events. There wasn't much information available that was useful for folks using the event log for problem diagnosis. So the docs have been updated a bit in general, and more information has been added on the event document structure, and the actions and alerts events specifically.
027eb59
to
86d4ada
Compare
Pinging @elastic/kibana-alerting-services (Team:Alerting Services) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes LGTM! Heads up, there's overlap with @YulNaumenko's PR (#92562).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! I will merge with this changes after it will be in master.
@elasticmachine merge upstream |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, with a few minor comments
x-pack/plugins/event_log/README.md
Outdated
|
||
## Basic Usage - Logging Events | ||
A client API is available for other plugins to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A client API is available for other plugins to | |
A client API is available for other plugins to: |
x-pack/plugins/event_log/README.md
Outdated
|
||
2. Register provider / actions, and create your plugin's logger, using service | ||
API provided in the `setup` stage: | ||
The index written to is ILM-controlled. The actual ILM ploicy is editable by |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The index written to is ILM-controlled. The actual ILM ploicy is editable by | |
The index written to is controlled by ILM. The actual ILM policy is editable by |
x-pack/plugins/event_log/README.md
Outdated
eventLog.registerProviderActions('my-plugin', ['action-1, action-2']); | ||
const eventLogger: IEventLogger = eventLog.getLogger({ event: { provider: 'my-plugin' } }); | ||
... | ||
The default index name is `.kibana-event-log-${kibanaVersion}-${ILM-sequence}` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The default index name is `.kibana-event-log-${kibanaVersion}-${ILM-sequence}` | |
The default index name is `.kibana-event-log-${kibanaVersion}-${ILM-sequence}`. |
x-pack/plugins/event_log/README.md
Outdated
describing who is generating the event, and what kind of event it is. Plugins | ||
that write events need to register the `provider` and `action` values they | ||
will be using. Generally, each plugin should provide it's own `provider`, | ||
but a plugin could provide multiple, or a single provider might be used by |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
but a plugin could provide multiple, or a single provider might be used by | |
but a plugin could provide multiple providers, or a single provider might be used by |
x-pack/plugins/event_log/README.md
Outdated
- `action: execute` - generated when an alert executor runs | ||
- `action: execute-action` - generated when an alert schedules an action to run | ||
- `action: new-instance` - generated when an alert has a new instance id that is active | ||
- `action: recovered-instance` - generated when an alert has an previously active instance id is no longer active |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- `action: recovered-instance` - generated when an alert has an previously active instance id is no longer active | |
- `action: recovered-instance` - generated when an alert has a previously active instance id that is no longer active |
x-pack/plugins/event_log/README.md
Outdated
|
||
[ilm rollover action docs]: https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-rollover.html |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[ilm rollover action docs]: https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-rollover.html | |
[ILM rollover action docs]: https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-rollover.html |
x-pack/plugins/event_log/README.md
Outdated
|
||
Example events are actions firing, alerts running their scheduled functions, | ||
alerts scheduling actions to run, etc. | ||
For ad-hoc diagnostic purposes, your go-to tools are Discover and Lens. Your |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For ad-hoc diagnostic purposes, your go-to tools are Discover and Lens. Your | |
For ad-hoc diagnostic purposes, your go to tools are Discover and Lens. Your |
x-pack/plugins/event_log/README.md
Outdated
queries against it. For now, access via HTTP will not be available, due to | ||
security concerns and lack of use cases. | ||
Add the event log index as an index pattern. The only customization needed is | ||
to set the `event.duration` field to be a duration in nanoseconds. You'll |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
to set the `event.duration` field to be a duration in nanoseconds. You'll | |
to set the `event.duration` field to a duration in nanoseconds. You'll |
x-pack/plugins/event_log/README.md
Outdated
registerProviderActions(provider: string, actions: string[]): void; | ||
isProviderActionRegistered(provider: string, action: string): boolean; | ||
getProviderActions(): Map<string, Set<string>>; | ||
2. Register provider / actions, and create your plugin's logger, using service |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
2. Register provider / actions, and create your plugin's logger, using service | |
2. Register provider / actions, and create your plugin's logger, using the service |
x-pack/plugins/event_log/README.md
Outdated
... | ||
``` | ||
|
||
4. To log an event, call `logEvent()` on the `eventLogger` object you created: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where's step 3?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
THERE IS NO STEP 3!!! :-).
Fixed to change step 4 to step 3, my bad
resolved all of @gchaps comments in commit 5ef393d |
@elasticmachine merge upstream |
💛 Build succeeded, but was flaky
Test FailuresKibana Pipeline / general / X-Pack Spaces API Integration Tests -- security_and_spaces.x-pack/test/spaces_api_integration/security_and_spaces/apis/delete·ts.spaces api with security delete superuser from the space_1 space should return 204 when referencing the space_1 space explicitly in the URLStandard Out
Stack Trace
Metrics [docs]
History
To update your PR or re-run it, just comment with: |
resolves elastic#89998 The README.md for the event log was a bit old, and was more focused on implementation details and information for plugin developers writing events. There wasn't much information available that was useful for folks using the event log for problem diagnosis. So the docs have been updated a bit in general, and more information has been added on the event document structure, and the actions and alerts events specifically.
resolves elastic#89998 The README.md for the event log was a bit old, and was more focused on implementation details and information for plugin developers writing events. There wasn't much information available that was useful for folks using the event log for problem diagnosis. So the docs have been updated a bit in general, and more information has been added on the event document structure, and the actions and alerts events specifically.
resolves #89998 The README.md for the event log was a bit old, and was more focused on implementation details and information for plugin developers writing events. There wasn't much information available that was useful for folks using the event log for problem diagnosis. So the docs have been updated a bit in general, and more information has been added on the event document structure, and the actions and alerts events specifically. Co-authored-by: Patrick Mueller <[email protected]>
resolves #89998 The README.md for the event log was a bit old, and was more focused on implementation details and information for plugin developers writing events. There wasn't much information available that was useful for folks using the event log for problem diagnosis. So the docs have been updated a bit in general, and more information has been added on the event document structure, and the actions and alerts events specifically. Co-authored-by: Patrick Mueller <[email protected]>
resolves #89998
Summary
The README.md for the event log was a bit old, and was more focused on
implementation details and information for plugin developers writing events.
There wasn't much information available that was useful for folks using
the event log for problem diagnosis.
So the docs have been updated a bit in general, and more information has
been added on the event document structure, and the actions and alerts
events specifically.
Checklist
Delete any items that are not applicable to this PR.
Unit or functional tests were updated or added to match the most common scenariosAny UI touched in this PR is usable by keyboard only (learn more about keyboard accessibility)Any UI touched in this PR does not create any new axe failures (run axe in browser: FF, Chrome)If a plugin configuration key changed, check if it needs to be allowlisted in the cloud and added to the docker listThis renders correctly on smaller devices using a responsive layout. (You can test this in your browser)This was checked for cross-browser compatibilityFor maintainers
This was checked for breaking API changes and was labeled appropriately