Skip to content
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

Merged
merged 7 commits into from
Mar 5, 2021

Conversation

pmuellr
Copy link
Member

@pmuellr pmuellr commented Feb 24, 2021

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.

For maintainers

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.
@pmuellr pmuellr force-pushed the event-log/update-readme branch from 027eb59 to 86d4ada Compare February 24, 2021 15:15
@pmuellr pmuellr added docs Feature:EventLog Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) v7.12.0 v7.13.0 v8.0.0 release_note:skip Skip the PR/issue when compiling release notes labels Feb 24, 2021
@pmuellr pmuellr marked this pull request as ready for review February 24, 2021 15:20
@pmuellr pmuellr requested a review from a team as a code owner February 24, 2021 15:20
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-alerting-services (Team:Alerting Services)

Copy link
Contributor

@mikecote mikecote left a 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).

@mikecote
Copy link
Contributor

This will resolve #89998 but it feels like we need some asciidoc (user-facing) about event log ILM? #82435

Copy link
Contributor

@YulNaumenko YulNaumenko left a 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.

@pmuellr
Copy link
Member Author

pmuellr commented Feb 24, 2021

@elasticmachine merge upstream

@pmuellr
Copy link
Member Author

pmuellr commented Feb 24, 2021

This will resolve #89998 but it feels like we need some asciidoc (user-facing) about event log ILM? #82435

Ya, forgot about that - just assigned that issue to myself. I think it can go in the alerting settings page, somewhere.

@YulNaumenko YulNaumenko requested a review from gchaps March 1, 2021 19:14
Copy link
Contributor

@gchaps gchaps left a 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


## Basic Usage - Logging Events
A client API is available for other plugins to
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
A client API is available for other plugins to
A client API is available for other plugins to:


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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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

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}`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The default index name is `.kibana-event-log-${kibanaVersion}-${ILM-sequence}`
The default index name is `.kibana-event-log-${kibanaVersion}-${ILM-sequence}`.

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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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

- `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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- `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


[ilm rollover action docs]: https://www.elastic.co/guide/en/elasticsearch/reference/current/ilm-rollover.html
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
[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


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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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

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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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

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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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

...
```

4. To log an event, call `logEvent()` on the `eventLogger` object you created:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where's step 3?

Copy link
Member Author

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

@pmuellr
Copy link
Member Author

pmuellr commented Mar 3, 2021

resolved all of @gchaps comments in commit 5ef393d

@pmuellr
Copy link
Member Author

pmuellr commented Mar 4, 2021

@elasticmachine merge upstream

@kibanamachine
Copy link
Contributor

💛 Build succeeded, but was flaky


Test Failures

Kibana 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 URL

Link to Jenkins

Standard Out

Failed Tests Reporter:
  - Test has failed 1 times on tracked branches: https://github.com/elastic/kibana/issues/92358

[00:00:00]       │
[00:00:00]         └-: spaces api with security
[00:00:00]           └-> "before all" hook in "spaces api with security"
[00:00:00]           └-> "before all" hook in "spaces api with security"
[00:00:00]             │ info [o.e.x.s.a.r.TransportPutRoleAction] [kibana-ci-immutable-ubuntu-18-tests-xxl-1614894650782542559] added role [kibana_legacy_user]
[00:00:00]             │ info [o.e.x.s.a.r.TransportPutRoleAction] [kibana-ci-immutable-ubuntu-18-tests-xxl-1614894650782542559] added role [kibana_dual_privileges_user]
[00:00:00]             │ info [o.e.x.s.a.r.TransportPutRoleAction] [kibana-ci-immutable-ubuntu-18-tests-xxl-1614894650782542559] added role [kibana_dual_privileges_dashboard_only_user]
[00:00:00]             │ info [o.e.x.s.a.r.TransportPutRoleAction] [kibana-ci-immutable-ubuntu-18-tests-xxl-1614894650782542559] added role [kibana_rbac_user]
[00:00:00]             │ info [o.e.x.s.a.r.TransportPutRoleAction] [kibana-ci-immutable-ubuntu-18-tests-xxl-1614894650782542559] added role [kibana_rbac_dashboard_only_user]
[00:00:00]             │ info [o.e.x.s.a.r.TransportPutRoleAction] [kibana-ci-immutable-ubuntu-18-tests-xxl-1614894650782542559] added role [kibana_rbac_default_space_all_user]
[00:00:00]             │ info [o.e.x.s.a.r.TransportPutRoleAction] [kibana-ci-immutable-ubuntu-18-tests-xxl-1614894650782542559] added role [kibana_rbac_default_space_read_user]
[00:00:00]             │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-ubuntu-18-tests-xxl-1614894650782542559] [.ds-ilm-history-5-2021.03.04-000001] creating index, cause [initialize_data_stream], templates [ilm-history], shards [1]/[0]
[00:00:00]             │ info [o.e.c.m.MetadataCreateDataStreamService] [kibana-ci-immutable-ubuntu-18-tests-xxl-1614894650782542559] adding data stream [ilm-history-5] with write index [.ds-ilm-history-5-2021.03.04-000001] and backing indices []
[00:00:00]             │ info [o.e.x.s.a.r.TransportPutRoleAction] [kibana-ci-immutable-ubuntu-18-tests-xxl-1614894650782542559] added role [kibana_rbac_space_1_all_user]
[00:00:00]             │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-ubuntu-18-tests-xxl-1614894650782542559] current.health="GREEN" message="Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[.ds-ilm-history-5-2021.03.04-000001][0]]])." previous.health="YELLOW" reason="shards started [[.ds-ilm-history-5-2021.03.04-000001][0]]"
[00:00:00]             │ info [o.e.x.i.IndexLifecycleTransition] [kibana-ci-immutable-ubuntu-18-tests-xxl-1614894650782542559] moving index [.ds-ilm-history-5-2021.03.04-000001] from [null] to [{"phase":"new","action":"complete","name":"complete"}] in policy [ilm-history-ilm-policy]
[00:00:00]             │ info [o.e.x.s.a.r.TransportPutRoleAction] [kibana-ci-immutable-ubuntu-18-tests-xxl-1614894650782542559] added role [kibana_rbac_space_1_read_user]
[00:00:00]             │ info [o.e.x.i.IndexLifecycleTransition] [kibana-ci-immutable-ubuntu-18-tests-xxl-1614894650782542559] moving index [.ds-ilm-history-5-2021.03.04-000001] from [{"phase":"new","action":"complete","name":"complete"}] to [{"phase":"hot","action":"unfollow","name":"branch-check-unfollow-prerequisites"}] in policy [ilm-history-ilm-policy]
[00:00:00]             │ info [o.e.x.i.IndexLifecycleTransition] [kibana-ci-immutable-ubuntu-18-tests-xxl-1614894650782542559] moving index [.ds-ilm-history-5-2021.03.04-000001] from [{"phase":"hot","action":"unfollow","name":"branch-check-unfollow-prerequisites"}] to [{"phase":"hot","action":"rollover","name":"check-rollover-ready"}] in policy [ilm-history-ilm-policy]
[00:00:00]             │ info [o.e.x.s.a.r.TransportPutRoleAction] [kibana-ci-immutable-ubuntu-18-tests-xxl-1614894650782542559] added role [kibana_rbac_space_2_all_user]
[00:00:00]             │ info [o.e.x.s.a.r.TransportPutRoleAction] [kibana-ci-immutable-ubuntu-18-tests-xxl-1614894650782542559] added role [kibana_rbac_space_2_read_user]
[00:00:00]             │ info [o.e.x.s.a.r.TransportPutRoleAction] [kibana-ci-immutable-ubuntu-18-tests-xxl-1614894650782542559] added role [kibana_rbac_space_1_2_all_user]
[00:00:00]             │ info [o.e.x.s.a.r.TransportPutRoleAction] [kibana-ci-immutable-ubuntu-18-tests-xxl-1614894650782542559] added role [kibana_rbac_space_1_2_read_user]
[00:00:00]             │ info [o.e.x.s.a.r.TransportPutRoleAction] [kibana-ci-immutable-ubuntu-18-tests-xxl-1614894650782542559] added role [kibana_rbac_default_space_saved_objects_all_user]
[00:00:00]             │ info [o.e.x.s.a.r.TransportPutRoleAction] [kibana-ci-immutable-ubuntu-18-tests-xxl-1614894650782542559] added role [kibana_rbac_default_space_saved_objects_read_user]
[00:00:00]             │ info [o.e.x.s.a.r.TransportPutRoleAction] [kibana-ci-immutable-ubuntu-18-tests-xxl-1614894650782542559] added role [kibana_rbac_space_1_saved_objects_all_user]
[00:00:00]             │ info [o.e.x.s.a.r.TransportPutRoleAction] [kibana-ci-immutable-ubuntu-18-tests-xxl-1614894650782542559] added role [kibana_rbac_space_1_saved_objects_read_user]
[00:00:01]             │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-ubuntu-18-tests-xxl-1614894650782542559] added user [not_a_kibana_user]
[00:00:01]             │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-ubuntu-18-tests-xxl-1614894650782542559] added user [a_kibana_legacy_user]
[00:00:01]             │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-ubuntu-18-tests-xxl-1614894650782542559] added user [a_kibana_dual_privileges_user]
[00:00:01]             │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-ubuntu-18-tests-xxl-1614894650782542559] added user [a_kibana_dual_privileges_dashboard_only_user]
[00:00:01]             │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-ubuntu-18-tests-xxl-1614894650782542559] added user [a_kibana_rbac_user]
[00:00:01]             │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-ubuntu-18-tests-xxl-1614894650782542559] added user [a_kibana_rbac_dashboard_only_user]
[00:00:01]             │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-ubuntu-18-tests-xxl-1614894650782542559] added user [a_kibana_rbac_default_space_all_user]
[00:00:01]             │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-ubuntu-18-tests-xxl-1614894650782542559] added user [a_kibana_rbac_default_space_read_user]
[00:00:01]             │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-ubuntu-18-tests-xxl-1614894650782542559] added user [a_kibana_rbac_space_1_all_user]
[00:00:01]             │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-ubuntu-18-tests-xxl-1614894650782542559] added user [a_kibana_rbac_space_1_read_user]
[00:00:02]             │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-ubuntu-18-tests-xxl-1614894650782542559] added user [a_kibana_rbac_space_2_all_user]
[00:00:02]             │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-ubuntu-18-tests-xxl-1614894650782542559] added user [a_kibana_rbac_space_2_read_user]
[00:00:02]             │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-ubuntu-18-tests-xxl-1614894650782542559] added user [a_kibana_rbac_space_1_2_all_user]
[00:00:02]             │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-ubuntu-18-tests-xxl-1614894650782542559] added user [a_kibana_rbac_space_1_2_read_user]
[00:00:02]             │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-ubuntu-18-tests-xxl-1614894650782542559] added user [a_kibana_rbac_default_space_saved_objects_all_user]
[00:00:02]             │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-ubuntu-18-tests-xxl-1614894650782542559] added user [a_kibana_rbac_default_space_saved_objects_read_user]
[00:00:02]             │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-ubuntu-18-tests-xxl-1614894650782542559] added user [a_kibana_rbac_space_1_saved_objects_all_user]
[00:00:02]             │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-ubuntu-18-tests-xxl-1614894650782542559] added user [a_kibana_rbac_space_1_saved_objects_read_user]
[00:00:02]             │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-ubuntu-18-tests-xxl-1614894650782542559] added user [a_apm_user]
[00:00:03]             │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-ubuntu-18-tests-xxl-1614894650782542559] added user [a_machine_learning_admin]
[00:00:03]             │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-ubuntu-18-tests-xxl-1614894650782542559] added user [a_machine_learning_user]
[00:00:03]             │ info [o.e.x.s.a.u.TransportPutUserAction] [kibana-ci-immutable-ubuntu-18-tests-xxl-1614894650782542559] added user [a_monitoring_user]
[00:03:53]           └-: delete
[00:03:53]             └-> "before all" hook in "delete"
[00:04:55]             └-: superuser from the space_1 space
[00:04:55]               └-> "before all" hook for "should return 204 when referencing the space_1 space explicitly in the URL"
[00:04:55]               └-> should return 204 when referencing the space_1 space explicitly in the URL
[00:04:55]                 └-> "before each" hook: global before each for "should return 204 when referencing the space_1 space explicitly in the URL"
[00:04:55]                 └-> "before each" hook for "should return 204 when referencing the space_1 space explicitly in the URL"
[00:04:55]                   │ info [saved_objects/spaces] Loading "mappings.json"
[00:04:55]                   │ info [saved_objects/spaces] Loading "data.json"
[00:04:55]                   │ info [o.e.c.m.MetadataDeleteIndexService] [kibana-ci-immutable-ubuntu-18-tests-xxl-1614894650782542559] [.kibana_task_manager_8.0.0_001/4RIjuA5HRkav77pakg30eg] deleting index
[00:04:55]                   │ info [o.e.c.m.MetadataDeleteIndexService] [kibana-ci-immutable-ubuntu-18-tests-xxl-1614894650782542559] [.kibana_8.0.0_001/c7H3TaU0SLS3b9AZqEcb1g] deleting index
[00:04:55]                   │ info [saved_objects/spaces] Deleted existing index ".kibana_8.0.0_001"
[00:04:55]                   │ info [saved_objects/spaces] Deleted existing index ".kibana_task_manager_8.0.0_001"
[00:04:55]                   │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-ubuntu-18-tests-xxl-1614894650782542559] [.kibana_8.0.0_001] creating index, cause [api], templates [], shards [1]/[0]
[00:04:55]                   │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-ubuntu-18-tests-xxl-1614894650782542559] current.health="GREEN" message="Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[.kibana_8.0.0_001][0]]])." previous.health="YELLOW" reason="shards started [[.kibana_8.0.0_001][0]]"
[00:04:55]                   │ info [saved_objects/spaces] Created index ".kibana_8.0.0_001"
[00:04:55]                   │ debg [saved_objects/spaces] ".kibana_8.0.0_001" settings {"index":{"auto_expand_replicas":"0-1","number_of_replicas":"0","number_of_shards":"1"}}
[00:04:55]                   │ info [saved_objects/spaces] Indexed 31 docs into ".kibana"
[00:04:55]                   │ debg Migrating saved objects
[00:04:55]                   │ proc [kibana]   log   [22:45:47.019] [warning][collector-set][plugins][usageCollection] ResponseError: index_not_found_exception
[00:04:55]                   │ proc [kibana]     at onBody (/dev/shm/workspace/kibana-build-xpack-20/node_modules/@elastic/elasticsearch/lib/Transport.js:333:23)
[00:04:55]                   │ proc [kibana]     at IncomingMessage.onEnd (/dev/shm/workspace/kibana-build-xpack-20/node_modules/@elastic/elasticsearch/lib/Transport.js:260:11)
[00:04:55]                   │ proc [kibana]     at IncomingMessage.emit (events.js:327:22)
[00:04:55]                   │ proc [kibana]     at endReadableNT (internal/streams/readable.js:1327:12)
[00:04:55]                   │ proc [kibana]     at processTicksAndRejections (internal/process/task_queues.js:80:21) {
[00:04:55]                   │ proc [kibana]   meta: {
[00:04:55]                   │ proc [kibana]     body: { error: [Object], status: 404 },
[00:04:55]                   │ proc [kibana]     statusCode: 404,
[00:04:55]                   │ proc [kibana]     headers: {
[00:04:55]                   │ proc [kibana]       'content-type': 'application/json;charset=utf-8',
[00:04:55]                   │ proc [kibana]       'content-length': '449'
[00:04:55]                   │ proc [kibana]     },
[00:04:55]                   │ proc [kibana]     meta: {
[00:04:55]                   │ proc [kibana]       context: null,
[00:04:55]                   │ proc [kibana]       request: [Object],
[00:04:55]                   │ proc [kibana]       name: 'elasticsearch-js',
[00:04:55]                   │ proc [kibana]       connection: [Object],
[00:04:55]                   │ proc [kibana]       attempts: 0,
[00:04:55]                   │ proc [kibana]       aborted: false
[00:04:55]                   │ proc [kibana]     }
[00:04:55]                   │ proc [kibana]   }
[00:04:55]                   │ proc [kibana] }
[00:04:55]                   │ proc [kibana]   log   [22:45:47.024] [warning][collector-set][plugins][usageCollection] Unable to fetch data from core collector
[00:04:56]                   │ proc [kibana]   log   [22:45:47.352] [warning][collector-set][plugins][usageCollection] ResponseError: search_phase_execution_exception
[00:04:56]                   │ proc [kibana]     at onBody (/dev/shm/workspace/kibana-build-xpack-20/node_modules/@elastic/elasticsearch/lib/Transport.js:333:23)
[00:04:56]                   │ proc [kibana]     at IncomingMessage.onEnd (/dev/shm/workspace/kibana-build-xpack-20/node_modules/@elastic/elasticsearch/lib/Transport.js:260:11)
[00:04:56]                   │ proc [kibana]     at IncomingMessage.emit (events.js:327:22)
[00:04:56]                   │ proc [kibana]     at endReadableNT (internal/streams/readable.js:1327:12)
[00:04:56]                   │ proc [kibana]     at processTicksAndRejections (internal/process/task_queues.js:80:21) {
[00:04:56]                   │ proc [kibana]   meta: {
[00:04:56]                   │ proc [kibana]     body: { error: [Object], status: 400 },
[00:04:56]                   │ proc [kibana]     statusCode: 400,
[00:04:56]                   │ proc [kibana]     headers: {
[00:04:56]                   │ proc [kibana]       'content-type': 'application/json;charset=utf-8',
[00:04:56]                   │ proc [kibana]       'content-length': '752'
[00:04:56]                   │ proc [kibana]     },
[00:04:56]                   │ proc [kibana]     meta: {
[00:04:56]                   │ proc [kibana]       context: null,
[00:04:56]                   │ proc [kibana]       request: [Object],
[00:04:56]                   │ proc [kibana]       name: 'elasticsearch-js',
[00:04:56]                   │ proc [kibana]       connection: [Object],
[00:04:56]                   │ proc [kibana]       attempts: 0,
[00:04:56]                   │ proc [kibana]       aborted: false
[00:04:56]                   │ proc [kibana]     }
[00:04:56]                   │ proc [kibana]   }
[00:04:56]                   │ proc [kibana] }
[00:04:56]                   │ proc [kibana]   log   [22:45:47.353] [warning][collector-set][plugins][usageCollection] Unable to fetch data from saved_objects_tagging collector
[00:04:56]                   │ proc [kibana]   log   [22:45:47.431] [info][savedobjects-service] [.kibana] INIT -> OUTDATED_DOCUMENTS_SEARCH
[00:04:56]                   │ proc [kibana]   log   [22:45:47.433] [info][savedobjects-service] [.kibana_task_manager] INIT -> CREATE_NEW_TARGET
[00:04:56]                   │ info [o.e.c.m.MetadataCreateIndexService] [kibana-ci-immutable-ubuntu-18-tests-xxl-1614894650782542559] [.kibana_task_manager_8.0.0_001] creating index, cause [api], templates [], shards [1]/[1]
[00:04:56]                   │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-ubuntu-18-tests-xxl-1614894650782542559] updating number_of_replicas to [0] for indices [.kibana_task_manager_8.0.0_001]
[00:04:56]                   │ proc [kibana]   log   [22:45:47.450] [info][savedobjects-service] [.kibana] OUTDATED_DOCUMENTS_SEARCH -> UPDATE_TARGET_MAPPINGS
[00:04:56]                   │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-ubuntu-18-tests-xxl-1614894650782542559] [.kibana_8.0.0_001/dapazRBXQEetvKAUDgbK-Q] update_mapping [_doc]
[00:04:56]                   │ info [o.e.c.r.a.AllocationService] [kibana-ci-immutable-ubuntu-18-tests-xxl-1614894650782542559] current.health="GREEN" message="Cluster health status changed from [YELLOW] to [GREEN] (reason: [shards started [[.kibana_task_manager_8.0.0_001][0]]])." previous.health="YELLOW" reason="shards started [[.kibana_task_manager_8.0.0_001][0]]"
[00:04:56]                   │ proc [kibana]   log   [22:45:47.523] [info][savedobjects-service] [.kibana] UPDATE_TARGET_MAPPINGS -> UPDATE_TARGET_MAPPINGS_WAIT_FOR_TASK
[00:04:56]                   │ proc [kibana]   log   [22:45:47.534] [info][savedobjects-service] [.kibana_task_manager] CREATE_NEW_TARGET -> MARK_VERSION_INDEX_READY
[00:04:56]                   │ info [o.e.t.LoggingTaskListener] [kibana-ci-immutable-ubuntu-18-tests-xxl-1614894650782542559] 55155 finished with response BulkByScrollResponse[took=17.7ms,timed_out=false,sliceId=null,updated=31,created=0,deleted=0,batches=1,versionConflicts=0,noops=0,retries=0,throttledUntil=0s,bulk_failures=[],search_failures=[]]
[00:04:56]                   │ proc [kibana]   log   [22:45:47.558] [info][savedobjects-service] [.kibana_task_manager] MARK_VERSION_INDEX_READY -> DONE
[00:04:56]                   │ proc [kibana]   log   [22:45:47.559] [info][savedobjects-service] [.kibana_task_manager] Migration completed after 208ms
[00:04:56]                   │ proc [kibana]   log   [22:45:47.630] [info][savedobjects-service] [.kibana] UPDATE_TARGET_MAPPINGS_WAIT_FOR_TASK -> DONE
[00:04:56]                   │ proc [kibana]   log   [22:45:47.631] [info][savedobjects-service] [.kibana] Migration completed after 282ms
[00:04:56]                   │ debg [saved_objects/spaces] Migrated Kibana index after loading Kibana data
[00:04:56]                   │ debg [saved_objects/spaces] Ensured that default space exists in .kibana
[00:04:56]                   │ info [o.e.c.m.MetadataMappingService] [kibana-ci-immutable-ubuntu-18-tests-xxl-1614894650782542559] [.kibana_8.0.0_001/dapazRBXQEetvKAUDgbK-Q] update_mapping [_doc]
[00:04:57]                 └- ✖ fail: spaces api with security delete superuser from the space_1 space should return 204 when referencing the space_1 space explicitly in the URL
[00:04:57]                 │       Error: expected [ { key: 'default',
[00:04:57]                 │     doc_count: 8,
[00:04:57]                 │     countByType: 
[00:04:57]                 │      { doc_count_error_upper_bound: 0,
[00:04:57]                 │        sum_other_doc_count: 0,
[00:04:57]                 │        buckets: [Object] } },
[00:04:57]                 │   { key: 'space_1',
[00:04:57]                 │     doc_count: 7,
[00:04:57]                 │     countByType: 
[00:04:57]                 │      { doc_count_error_upper_bound: 0,
[00:04:57]                 │        sum_other_doc_count: 0,
[00:04:57]                 │        buckets: [Object] } } ] to sort of equal [ { key: 'default',
[00:04:57]                 │     doc_count: 9,
[00:04:57]                 │     countByType: 
[00:04:57]                 │      { doc_count_error_upper_bound: 0,
[00:04:57]                 │        sum_other_doc_count: 0,
[00:04:57]                 │        buckets: [Object] } },
[00:04:57]                 │   { doc_count: 7,
[00:04:57]                 │     key: 'space_1',
[00:04:57]                 │     countByType: 
[00:04:57]                 │      { doc_count_error_upper_bound: 0,
[00:04:57]                 │        sum_other_doc_count: 0,
[00:04:57]                 │        buckets: [Object] } } ]
[00:04:57]                 │       + expected - actual
[00:04:57]                 │ 
[00:04:57]                 │                  "key": "space"
[00:04:57]                 │                }
[00:04:57]                 │                {
[00:04:57]                 │                  "doc_count": 1
[00:04:57]                 │       +          "key": "config"
[00:04:57]                 │       +        }
[00:04:57]                 │       +        {
[00:04:57]                 │       +          "doc_count": 1
[00:04:57]                 │                  "key": "index-pattern"
[00:04:57]                 │                }
[00:04:57]                 │              ]
[00:04:57]                 │              "doc_count_error_upper_bound": 0
[00:04:57]                 │              "sum_other_doc_count": 0
[00:04:57]                 │            }
[00:04:57]                 │       -    "doc_count": 8
[00:04:57]                 │       +    "doc_count": 9
[00:04:57]                 │            "key": "default"
[00:04:57]                 │          }
[00:04:57]                 │          {
[00:04:57]                 │            "countByType": {
[00:04:57]                 │       
[00:04:57]                 │       at Assertion.assert (/dev/shm/workspace/parallel/20/kibana/packages/kbn-expect/expect.js:100:11)
[00:04:57]                 │       at Assertion.eql (/dev/shm/workspace/parallel/20/kibana/packages/kbn-expect/expect.js:244:8)
[00:04:57]                 │       at expectEmptyResult (test/spaces_api_integration/common/suites/delete.ts:133:24)
[00:04:57]                 │       at runMicrotasks (<anonymous>)
[00:04:57]                 │       at processTicksAndRejections (internal/process/task_queues.js:93:5)
[00:04:57]                 │ 
[00:04:57]                 │ 

Stack Trace

Error: expected [ { key: 'default',
    doc_count: 8,
    countByType: 
     { doc_count_error_upper_bound: 0,
       sum_other_doc_count: 0,
       buckets: [Object] } },
  { key: 'space_1',
    doc_count: 7,
    countByType: 
     { doc_count_error_upper_bound: 0,
       sum_other_doc_count: 0,
       buckets: [Object] } } ] to sort of equal [ { key: 'default',
    doc_count: 9,
    countByType: 
     { doc_count_error_upper_bound: 0,
       sum_other_doc_count: 0,
       buckets: [Object] } },
  { doc_count: 7,
    key: 'space_1',
    countByType: 
     { doc_count_error_upper_bound: 0,
       sum_other_doc_count: 0,
       buckets: [Object] } } ]
    at Assertion.assert (/dev/shm/workspace/parallel/20/kibana/packages/kbn-expect/expect.js:100:11)
    at Assertion.eql (/dev/shm/workspace/parallel/20/kibana/packages/kbn-expect/expect.js:244:8)
    at expectEmptyResult (test/spaces_api_integration/common/suites/delete.ts:133:24)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:93:5) {
  actual: '[\n' +
    '  {\n' +
    '    "countByType": {\n' +
    '      "buckets": [\n' +
    '        {\n' +
    '          "doc_count": 3\n' +
    '          "key": "visualization"\n' +
    '        }\n' +
    '        {\n' +
    '          "doc_count": 2\n' +
    '          "key": "dashboard"\n' +
    '        }\n' +
    '        {\n' +
    '          "doc_count": 2\n' +
    '          "key": "space"\n' +
    '        }\n' +
    '        {\n' +
    '          "doc_count": 1\n' +
    '          "key": "index-pattern"\n' +
    '        }\n' +
    '      ]\n' +
    '      "doc_count_error_upper_bound": 0\n' +
    '      "sum_other_doc_count": 0\n' +
    '    }\n' +
    '    "doc_count": 8\n' +
    '    "key": "default"\n' +
    '  }\n' +
    '  {\n' +
    '    "countByType": {\n' +
    '      "buckets": [\n' +
    '        {\n' +
    '          "doc_count": 3\n' +
    '          "key": "visualization"\n' +
    '        }\n' +
    '        {\n' +
    '          "doc_count": 2\n' +
    '          "key": "dashboard"\n' +
    '        }\n' +
    '        {\n' +
    '          "doc_count": 1\n' +
    '          "key": "config"\n' +
    '        }\n' +
    '        {\n' +
    '          "doc_count": 1\n' +
    '          "key": "index-pattern"\n' +
    '        }\n' +
    '      ]\n' +
    '      "doc_count_error_upper_bound": 0\n' +
    '      "sum_other_doc_count": 0\n' +
    '    }\n' +
    '    "doc_count": 7\n' +
    '    "key": "space_1"\n' +
    '  }\n' +
    ']',
  expected: '[\n' +
    '  {\n' +
    '    "countByType": {\n' +
    '      "buckets": [\n' +
    '        {\n' +
    '          "doc_count": 3\n' +
    '          "key": "visualization"\n' +
    '        }\n' +
    '        {\n' +
    '          "doc_count": 2\n' +
    '          "key": "dashboard"\n' +
    '        }\n' +
    '        {\n' +
    '          "doc_count": 2\n' +
    '          "key": "space"\n' +
    '        }\n' +
    '        {\n' +
    '          "doc_count": 1\n' +
    '          "key": "config"\n' +
    '        }\n' +
    '        {\n' +
    '          "doc_count": 1\n' +
    '          "key": "index-pattern"\n' +
    '        }\n' +
    '      ]\n' +
    '      "doc_count_error_upper_bound": 0\n' +
    '      "sum_other_doc_count": 0\n' +
    '    }\n' +
    '    "doc_count": 9\n' +
    '    "key": "default"\n' +
    '  }\n' +
    '  {\n' +
    '    "countByType": {\n' +
    '      "buckets": [\n' +
    '        {\n' +
    '          "doc_count": 3\n' +
    '          "key": "visualization"\n' +
    '        }\n' +
    '        {\n' +
    '          "doc_count": 2\n' +
    '          "key": "dashboard"\n' +
    '        }\n' +
    '        {\n' +
    '          "doc_count": 1\n' +
    '          "key": "config"\n' +
    '        }\n' +
    '        {\n' +
    '          "doc_count": 1\n' +
    '          "key": "index-pattern"\n' +
    '        }\n' +
    '      ]\n' +
    '      "doc_count_error_upper_bound": 0\n' +
    '      "sum_other_doc_count": 0\n' +
    '    }\n' +
    '    "doc_count": 7\n' +
    '    "key": "space_1"\n' +
    '  }\n' +
    ']',
  showDiff: true
}

Metrics [docs]

✅ unchanged

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@pmuellr pmuellr added the auto-backport Deprecated - use backport:version if exact versions are needed label Mar 5, 2021
@pmuellr pmuellr merged commit 1c4c7c2 into elastic:master Mar 5, 2021
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Mar 5, 2021
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.
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Mar 5, 2021
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.
@kibanamachine
Copy link
Contributor

💚 Backport successful

7.12 / #93714
7.x / #93715

Successful backport PRs will be merged automatically after passing CI.

kibanamachine added a commit that referenced this pull request Mar 5, 2021
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]>
kibanamachine added a commit that referenced this pull request Mar 5, 2021
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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-backport Deprecated - use backport:version if exact versions are needed backported docs Feature:EventLog release_note:skip Skip the PR/issue when compiling release notes Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) v7.12.0 v7.13.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Alerting GA - Event log documentation
6 participants