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

Unify Kibana & Elasticsearch logging config keys #90764

Merged
merged 13 commits into from
Feb 16, 2021

Conversation

mshustov
Copy link
Contributor

@mshustov mshustov commented Feb 9, 2021

Summary

Part of #57551

This PR align Kibana logging configuration keys with log4j and renames:

  • appender.kind, layout.kind, strategy.kind, policy.kind to appender.type, layout.type, etc.
  • file-appender.path to file-appender.fileName
  • logger.xxx.context to logger.xxx.name

Plugin API changes

Kibana logging system uses a configuration schema inspired by log4j to provide Elasticsearch-compatible format. We renamed several logging configuration keys to align the naming schema with the Elasticsearch config:

  • *.kind is renamed to *.type
  • file-appender.path to file-appender.fileName
  • logger.xxx.context to logger.xxx.name

@mshustov mshustov added Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc release_note:plugin_api_changes Contains a Plugin API changes section for the breaking plugin API changes section. v8.0.0 v7.12.0 labels Feb 9, 2021
@mshustov
Copy link
Contributor Author

mshustov commented Feb 9, 2021

@elasticmachine merge upstream

@mshustov mshustov marked this pull request as ready for review February 11, 2021 17:09
@mshustov mshustov requested review from a team as code owners February 11, 2021 17:09
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-core (Team:Core)

@jportner
Copy link
Contributor

This is a breaking change for ECS audit logging which was introduced in 7.11. Is there any reason we can't keep the old fields around and deprecate them?

@mshustov
Copy link
Contributor Author

@jportner Is it already in GA as a stable feature? I can add a deprecation warning for the Security plugin. Would it work for you?

@jportner
Copy link
Contributor

@jportner Is it already in GA as a stable feature? I can add a deprecation warning for the Security plugin. Would it work for you?

Yes and yes, thanks!

@mshustov mshustov marked this pull request as draft February 11, 2021 22:06
@mshustov mshustov marked this pull request as ready for review February 15, 2021 17:29
Copy link
Member

@Bamieh Bamieh left a comment

Choose a reason for hiding this comment

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

LGTM. do we need to list the config changes here? #85858

@mshustov
Copy link
Contributor Author

mshustov commented Feb 16, 2021

do we need to list the config changes here?

@Bamieh We will when we deprecate the legacy logging config. The new logging config has never been announced yet in our docs nor release notes.

Copy link
Contributor

@jportner jportner left a comment

Choose a reason for hiding this comment

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

Security changes LGTM!

@mshustov mshustov merged commit 312351c into elastic:master Feb 16, 2021
@mshustov mshustov deleted the log-config-keys branch February 16, 2021 19:27
mshustov added a commit that referenced this pull request Feb 17, 2021
* align logging config with ES. rename kind to type.

* rename file "path" to "fileName"

* rename logger "context" to "name"

* update audit log docs and tests

* update docs

* fix integration tests

* update deprecations for audit appender

* add tests for audit logging deprecations

* fix eslint problem

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
# Conflicts:
#	x-pack/plugins/security/server/config_deprecations.ts
@kibanamachine
Copy link
Contributor

kibanamachine commented Mar 3, 2021

💔 Build Failed

Failed CI Steps


Test Failures

Kibana Pipeline / general / Jest Integration Tests.src/core/server/saved_objects/migrationsv2/integration_tests.migration v2 migrating from the same Kibana version copies all the document of the previous index to the new one

Link to Jenkins

Standard Out

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


Stack Trace

Error: expect(received).toBeGreaterThanOrEqual(expected)

Expected: >= 53
Received:    0
    at Object.<anonymous> (/dev/shm/workspace/parallel/3/kibana/src/core/server/saved_objects/migrationsv2/integration_tests/migration.test.ts:213:48)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)

Metrics [docs]

✅ unchanged

History

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release_note:plugin_api_changes Contains a Plugin API changes section for the breaking plugin API changes section. Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc v7.12.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants