2. Installing OpenDistro for Elasticsearch Plugins

The Opendistro allows us to add plugins to our elastic stack, in particular the security plugin which will allow us to secure our stack and add further features like users and roles management, the alerting plugins which will allow us to create rules and send alerts via slack, webhooks and lately they added Email.

circle-exclamation
circle-info
  • Further information about Opendistro plugins can be found herearrow-up-right

  • We are running 7.8.0 so the compatible opendistro plugin version is 1.9.0.0

Disable XPACK security

First lets disable xpack security on both Elasticsearch and Kibana and add this line to their configuration files

xpack.security.enabled: false

Installing Security plugin for Elasticsearch

Navigate to the Elasticsearch home directory (most likely, it is /usr/share/elasticsearch), and run the install command for each plugin.

$ sudo bin/elasticsearch-plugin install https://d3g5vo6xdbdb9a.cloudfront.net/downloads/elasticsearch-plugins/opendistro-security/opendistro_security-1.9.0.0.zip

Installing Alerting plugin for Elasticsearch

Before installing alerting plugin, the job scheduler plugin is required to be able to send alerts and take data snapshots.

Job Scheduler Plugin

$ sudo bin/elasticsearch-plugin install https://d3g5vo6xdbdb9a.cloudfront.net/downloads/elasticsearch-plugins/opendistro-job-scheduler/opendistro-job-scheduler-1.9.0.0.zip

Alerting Plugin

Installing Security Plugin for Kibana

Elasticsearch security plugin has a corresponding Kibana plugin which would be a great addition in order to make management tasks easy from a UI.

Navigate to the Kibana home directory (likely /usr/share/kibana) and run the install command for each plugin.

This plugin provides a user interface for managing users, roles, mappings, action groups, and tenants.

Installing Alerting Plugin for Kibana

This plugin provides a user interface for creating monitors and managing alerts.

Setting up default certificates

After installing the modules we must restart Elasticsearch and Kibana to take into account the installed plugins but before restarting them we must run the following script to generate the default certificates of opendistro

circle-exclamation

Default credentials are admin:admin to test if everything is working check Elasticsearch response by running the following command

circle-exclamation

After restart you would notice some changes to Elasticsearch configuration file.

Changing Logstash and Kibana's configuration

Since we installed security plugin all communication now to our node is in https so we need to change their configurations accordingly.

Copy demo certificates to accessible locations for kibana and logstash and change, if necessary, the owner and group of the files.

Kibana.yml

Logstash.yml

Last updated