This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
elastic:kibanaonlinux [2023/03/09 19:34] – created olaf | elastic:kibanaonlinux [2024/10/20 14:41] (current) – Updated location of node since Kibana 8.15 olaf | ||
---|---|---|---|
Line 45: | Line 45: | ||
- | Install vim, tools for importing the elastic key ring and allow apt to download through https. | + | Install vim, tools for importing the elastic key ring, allow apt to download through https, for mounting SMB shares and unzip. |
Then get the elastic key ring and add the repository | Then get the elastic key ring and add the repository | ||
<code bash> | <code bash> | ||
- | apt install -y vim gpg apt-transport-https | + | apt install -y vim gpg apt-transport-https |
wget -qO - https:// | wget -qO - https:// | ||
echo "deb [signed-by=/ | echo "deb [signed-by=/ | ||
</ | </ | ||
+ | Install Kibana | ||
+ | <code bash> | ||
+ | apt update | ||
+ | apt install kibana | ||
+ | </ | ||
+ | |||
+ | Change / | ||
+ | <code yaml> | ||
+ | In / | ||
+ | server.port: | ||
+ | server.host: | ||
+ | elasticsearch.hosts: | ||
+ | server.publicBaseUrl: | ||
+ | # SSL config | ||
+ | server.ssl.enabled: | ||
+ | server.ssl.certificate: | ||
+ | server.ssl.key: | ||
+ | |||
+ | # looging settings below are default in Linux installations (no need to modify) | ||
+ | # But: those settings need to be adjusted and used in Windows setups | ||
+ | # Enables you to specify a file where Kibana stores log output. | ||
+ | logging: | ||
+ | appenders: | ||
+ | file: | ||
+ | type: file | ||
+ | fileName: / | ||
+ | layout: | ||
+ | type: json | ||
+ | root: | ||
+ | appenders: | ||
+ | - default | ||
+ | - file | ||
+ | # layout: | ||
+ | # type: json | ||
+ | </ | ||
+ | |||
+ | |||
+ | On one of the Elasticsearch nodes generate an access token for Kibana | ||
+ | <code bash> | ||
+ | / | ||
+ | |||
+ | eyJ2ZXIiOiI4LjYuMiIsImFkciI6WyIxMC42OC4xMDAuMTQ6OTIwMCJdLCJvZ3IoIoI0MzBhMWRiYWFhZGFmMjEzMjBiYzEyZTI5ZWM5NjhlOTNmZWQzMDA4YzgxMGMwYTY3NjMzOGYyZDY5NjE3OTAxIiwia2V5IjoiampEdXg0WUJtUDNfUFh6QlhVSWQ6WXJGMETtbV9ScWlqelZpMTJfckFpZyJ9 | ||
+ | </ | ||
+ | |||
+ | On the Kibana node configure Kibana: | ||
+ | <code bash> | ||
+ | / | ||
+ | ? Enter enrollment token: eyJ2ZXIiOiI4LjYuMiIsImFkciI6WyIxMC42OC4xMDAuMTQ6OTIwMCJdLCJvZ3IoIoI0MzBhMWRiYWFhZGFmMjEzMjBiYzEyZTI5ZWM5NjhlOTNmZWQzMDA4YzgxMGMwYTY3NjMzOGYyZDY5NjE3OTAxIiwia2V5IjoiampEdXg0WUJtUDNfUFh6QlhVSWQ6WXJGMETtbV9ScWlqelZpMTJfckFpZyJ9 | ||
+ | |||
+ | ✔ Kibana configured successfully. | ||
+ | |||
+ | To start Kibana run: | ||
+ | bin/kibana | ||
+ | |||
+ | </ | ||
+ | |||
+ | Get the elasticsearch.serviceAccountToken from ''/ | ||
+ | <code yaml> | ||
+ | |||
+ | Generate encryption keys ... | ||
+ | <code bash>/ | ||
+ | |||
+ | xpack.encryptedSavedObjects.encryptionKey: | ||
+ | xpack.reporting.encryptionKey: | ||
+ | xpack.security.encryptionKey: | ||
+ | </ | ||
+ | … and add all values to the kibana-keystore | ||
+ | <code bash> | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | </ | ||
+ | remove the line with the '' | ||
+ | |||
+ | To be able to copy files between the ES nodes and Kibana a mount for the SMB share is needed.\\ | ||
+ | Create a file containing the credentials for the share in the root user directory: | ||
+ | <code bash> | ||
+ | cat > / | ||
+ | username=kenny | ||
+ | password=kennyspassword | ||
+ | < | ||
+ | </ | ||
+ | |||
+ | To mount the share for the snapshot repository with the correct permissions for the elasticsearch user, we need to know the user id (uid) of the elasticsearch user: | ||
+ | '' | ||
+ | '' | ||
+ | |||
+ | Create the mount directory | ||
+ | <code bash> | ||
+ | mkdir /mnt/backup | ||
+ | </ | ||
+ | |||
+ | Add the share used for repository in / | ||
+ | <code bash> | ||
+ | // | ||
+ | </ | ||
+ | |||
+ | |||
+ | Mount the share | ||
+ | <code bash> | ||
+ | mount // | ||
+ | </ | ||
+ | |||
+ | |||
+ | |||
+ | On one of the elasticsearch nodes\\ | ||
+ | |||
+ | Generate the SSL certificate and key for Kibana\\ | ||
+ | <code bash> | ||
+ | / | ||
+ | |||
+ | Tell to save it as '' | ||
+ | <code bash> | ||
+ | cp / | ||
+ | </ | ||
+ | |||
+ | Back to the Kibana node\\ | ||
+ | Create the directory for the certificate and key | ||
+ | copy the certificate file, unzip it, move the certificate and key to the certs directory and clean up | ||
+ | <code bash> | ||
+ | mkdir / | ||
+ | cd / | ||
+ | cp / | ||
+ | unzip deb11-elk-04_http.zip | ||
+ | mv deb11-elk-04_https/ | ||
+ | rm -rf deb11-elk-04_https | ||
+ | rm deb11-elk-04_http.zip | ||
+ | chown -R root:kibana / | ||
+ | </ | ||
+ | |||
+ | Allow Kibana to use HTTPS default port (443) ... | ||
+ | |||
+ | Up to Kibana 8.14.x: | ||
+ | <code bash> | ||
+ | setcap cap_net_bind_service=+epi / | ||
+ | setcap cap_net_bind_service=+epi / | ||
+ | setcap cap_net_bind_service=+epi / | ||
+ | setcap cap_net_bind_service=+epi / | ||
+ | </ | ||
+ | |||
+ | Since Kibana 8.15: | ||
+ | <code bash> | ||
+ | setcap cap_net_bind_service=+epi / | ||
+ | setcap cap_net_bind_service=+epi / | ||
+ | setcap cap_net_bind_service=+epi / | ||
+ | setcap cap_net_bind_service=+epi / | ||
+ | </ | ||
+ | |||
+ | |||
+ | |||
+ | Install Kibana as service and start it | ||
+ | <code bash> | ||
+ | systemctl daemon-reload | ||
+ | systemctl enable kibana.service | ||
+ | |||
+ | systemctl start kibana.service | ||
+ | </ | ||
+ | |||
+ | Kibana is now availbale at '' | ||
+ | |||
+ | Either use the generated password from the installation of ES or generate a new one on a ES node with | ||
+ | <code bash> | ||
+ | / | ||
+ | </ | ||
+ | Login with elastic and the password | ||
+ | Kibana is installed |