印象里每次安装 ElK 组件的体验都不是很好,或多或少都遇到过奇奇怪怪的问题。本文几乎完全按照官方文档:Getting started with the Elastic Stack and Docker Compose: Part 1 通过 docker compose 安装 elasticsearch、kibana、metricbeat、filebeat 和 logstash,但是移除了 ssl 相关的配置。你可以直接按照原文档进行安装,但是对照本文可以帮助你更快速地移除不需要的配置以及绕开可能踩到的坑。 此安装方式尽量使用环境变量代替编写配置文件,便于在备份和分享时将敏感信息留存在本地。本次安装时间为 2023-12-14,使用官方镜像,版本为 8.11.2。
WARNING: Your kernel does not support cgroup swap limit. WARNING: Your kernel does not support swap limit capabilities. Limitation discarded. To prevent these messages, enable memory and swap accounting on your system. To enable these on system using GNU GRUB (GNU GRand Unified Bootloader), do the following.
[2023-12-14T18:02:17.493+00:00][ERROR][plugins.observabilityAIAssistant] Error: Unable to create actions client because the Encrypted Saved Objects plugin is missing encryption key. Please set xpack.encryptedSavedObjects.encryptionKey in the kibana.yml or use the bin/kibana-encryption-keys command. kibana | at getActionsClientWithRequest (/usr/share/kibana/node_modules/@kbn/actions-plugin/server/plugin.js:329:15) kibana | at Object.secureGetActionsClientWithRequest [as getActionsClientWithRequest] (/usr/share/kibana/node_modules/@kbn/actions-plugin/server/plugin.js:384:58) kibana | at handler (/usr/share/kibana/node_modules/@kbn/observability-ai-assistant-plugin/server/routes/connectors/route.js:25:65) kibana | at processTicksAndRejections (node:internal/process/task_queues:95:5) kibana | at wrappedHandler (/usr/share/kibana/node_modules/@kbn/server-route-repository/src/register_routes.js:57:13) kibana | at Router.handle (/usr/share/kibana/node_modules/@kbn/core-http-router-server-internal/src/router.js:154:30) kibana | at handler (/usr/share/kibana/node_modules/@kbn/core-http-router-server-internal/src/router.js:113:50) kibana | at exports.Manager.execute (/usr/share/kibana/node_modules/@hapi/hapi/lib/toolkit.js:60:28) kibana | at Object.internals.handler (/usr/share/kibana/node_modules/@hapi/hapi/lib/handler.js:46:20) kibana | at exports.execute (/usr/share/kibana/node_modules/@hapi/hapi/lib/handler.js:31:20) kibana | at Request._lifecycle (/usr/share/kibana/node_modules/@hapi/hapi/lib/request.js:371:32) kibana | at Request._execute (/usr/share/kibana/node_modules/@hapi/hapi/lib/request.js:281:9)
Kibana is currently running with legacy OpenSSL providers enabled! For details and instructions on how to disable see https://www.elastic.co/guide/en/kibana/8.11/production.html#openssl-legacy-provider ## Kibana Encryption Key Generation Utility
The 'generate' command guides you through the process of setting encryption keys for:
xpack.encryptedSavedObjects.encryptionKey Used to encrypt stored objects such as dashboards and visualizations https://www.elastic.co/guide/en/kibana/current/xpack-security-secure-saved-objects.html#xpack-security-secure-saved-objects
xpack.reporting.encryptionKey Used to encrypt saved reports https://www.elastic.co/guide/en/kibana/current/reporting-settings-kb.html#general-reporting-settings
xpack.security.encryptionKey Used to encrypt session information https://www.elastic.co/guide/en/kibana/current/security-settings-kb.html#security-session-and-cookie-settings
Already defined settings are ignored and can be regenerated using the --force flag. Check the documentation links for instructions on how to rotate encryption keys. Definitions should be set in the kibana.yml used configure Kibana.
Exiting: error loading config file: config file ("metricbeat.yml") can only be writable by the owner but the permissions are "-rw-rw-r--" (to fix the permissions use: 'chmod go-w /usr/share/metricbeat/metricbeat.yml')