Deploy your Bitnami ELK Stack on Oracle Cloud Infrastructure Classic now! Launch Now

Bitnami ELK for Oracle Cloud Infrastructure Classic


The ELK stack is a log management platform consisting of Elasticsearch (deep search and data analytics), Logstash (centralized logging and parsing) and Kibana (powerful data visualizations).

First steps with the Bitnami ELK Stack

Welcome to your new Bitnami application running on Oracle Cloud Infrastructure Classic! Here are a few questions (and answers!) you might need when first starting with your application.

What credentials do I need?

You need two sets of credentials:

  • The application credentials that allow you to log in to your new Bitnami application. These credentials consist of a username and password.
  • The server credentials that allow you to log in to your Oracle Cloud Infrastructure Classic server using an SSH client and execute commands on the server using the command line. These credentials consist of an SSH username and key.

What is the administrator username set for me to log in to the application for the first time?

Username: user

What SSH username should I use for secure shell access to my application?

SSH username: bitnami

What are the default ports?

A port is an endpoint of communication in an operating system that identifies a specific process or a type of service. Bitnami stacks include several services or servers that require a port.

For security reasons, Oracle Cloud Infrastructure Classic have some or all their ports closed. For those applications launched from the Oracle Cloud Infrastructure Classic marketplace, make sure that the default access ports are opened. Check the how to open the server ports for remote access section to learn how to open ports in order to allow remote access to your server.

Port 22 is the default port for SSH connections.

Bitnami opens some ports for the main servers. These are the ports opened by default: 80, 443.

Getting started with Bitnami ELK Stack

To get started with Bitnami ELK Stack, we suggest the following example to read the Apache access_log and check the requests per minute to the ELK server:

Step 1. Configure Logstash

  • Load the ELK environment before starting the configuration of Logstash:

     $ sudo /opt/bitnami/use_elk 
  • Stop the Logstash service:

     $ sudo /opt/bitnami/ stop logstash
  • Create the file /opt/bitnami/logstash/conf/access-log.conf as below:

     input {
         file {
             path => "/opt/bitnami/apache2/logs/access_log"
             start_position => beginning
     filter {
         grok {
             match => { "message" => "COMBINEDAPACHELOG %{COMMONAPACHELOG} %{QS:referrer} %{QS:agent}" }
         date {
             match => [ "timestamp" , "dd/MMM/yyyy:HH:mm:ss Z" ]
     output {
         elasticsearch {
             hosts => [ "" ]
  • Check the configuration is OK. You should see an output message like below:

     $ /opt/bitnami/logstash/bin/logstash -f /opt/bitnami/logstash/conf/ --config.test_and_exit
     Configuration OK
  • Start the Logstash service:

     $ sudo /opt/bitnami/ start logstash

Step 2. Check Elasticsearch

  • Access your server via browser in order to generate data (http://SERVER-IP/).
  • Check Elasticsearch is receiving data. You should see an index called logstash-DATE:

     $ curl 'localhost:9200/_cat/indices?v'
     health status index               pri rep docs.count docs.deleted store.size
     green  open   .kibana               1   0          1            0      3.1kb          3.1kb
     yellow open   logstash-2017.02.21   5   1          1            2     11.2kb         11.2kb

Step 3. Configure Kibana pattern

  • Access the Kibana app via browser (http://SERVER-IP/elk/app/kibana), and use your user/password to pass the basic HTTP authentication.
  • Specify a timestamp by entering this value to the "Available Fields -> @timestamp" field.
  • Click the "Create" green button.
  • On the left bar, click the "Discover" menu item. You should see something like the screenshot below:

ELK data

Step 4. Create a Kibana dashboard

  • On the left bar, click "Visualize" menu item.
  • Select the "Vertical bar chart -> From a new search" menu options.
  • Select "logstash-*" index.
  • Click the "X-Axis -> Aggregation -> Date Histogram" button secuence.
  • Select "Minute" in the "Interval" field, and click "Apply changes" button.

ELK visualization

  • Save the visualization.
  • On the left bar, click "Dashboard" menu item.
  • Click the "Add" button, select the previous visualization and save the dashboard.

ELK dashboard

What is the default configuration?

ELK default configuration

Elasticsearch configuration file

The main configuration file for Elasticsearch is /opt/bitnami/elasticsearch/config/elasticsearch.yml.

Elasticsearch ports

By default, Elasticsearch will use port 9200 for requests and port 9300 for communication between nodes within the cluster. If these ports are in use when the server starts, it will attempt to use the next available port, such as 9201 or 9301.

Set custom ports using the configuration file, together with details such as the cluster name (elasticsearch by default), node name, address binding and discovery settings. All these settings are needed to add more nodes to your Elasticsearch cluster.

Elasticsearch log file

The ELK log file is created at /opt/bitnami/elasticsearch/logs/elasticsearch.log.

Logstash default configuration

Logstash configuration file

The main configuration file for Logstash is /opt/bitnami/logstash/conf/logstash.conf.

Logstash port

By default, Logstash will use port 9600. If this port is in use when the server starts, it will attempt to use the next available port, such as 9601.

Logstash log file

The Logstash log file is created at /opt/bitnami/logstash/logs/logstash.log.

Kibana default configuration

Kibana configuration file

The main configuration file for Kibana is /opt/bitnami/kibana/config/kibana.yml.

Kibana ports

By default, Kibana will use port 5601. If this port is in use when the server starts, it will attempt to use the next available port, such as 5602.

You can set a custom port using the configuration file, together with details such as the Elasticsearch URL ( by default), Kibana index, default application to load or verbosity level.

Kibana log file

The Kibana log file is created at /opt/bitnami/kibana/logs/kibana.log.

How to change the Elasticsearch password?

Follow the steps below to change the Elasticsearch password:

  • Execute the following command. You will be prompted to enter a new password for the user user.

    $ sudo /opt/bitnami/apache2/bin/htpasswd -c /opt/bitnami/elasticsearch/apache-conf/password user
  • Restart the Apache server:

    $ sudo /opt/bitnami/ restart apache

Now, you can access Elasticsearch using the new password.

How to connect remotely?

How to connect remotely to Elasticsearch?

IMPORTANT: Making this application's network ports public is a significant security risk. You are strongly advised to only allow access to those ports from trusted networks. If, for development purposes, you need to access from outside of a trusted network, please do not allow access to those ports via a public IP address. Instead, use a secure channel such as a VPN or an SSH tunnel. Follow these instructions to remotely connect safely and reliably.

To access the ELK server from another computer or application, make the following changes to the node's /opt/bitnami/elasticsearch/config/elasticsearch.yml file:

  • Specify the hostname or IP address where the server will be accesible. Set it to to listen on every interface.

  • network.publish_host: Specify the host name that the node publishes to other nodes for communication.

NOTE: Remember to configure the firewall on your server to allow traffic on the ports used by ELK. Refer to the FAQ for more information.

How to connect remotely to Logstash using SSL certificates?

It is strongly recommended to create an SSL certificate and key pair in order to verify the identity of ELK Server. In this example, we are going to use Filebeat to ship logs from our client servers to our ELK server:

  • Add the ELK Server's private IP address to the subjectAltName (SAN) field of the SSL certificate on the ELK server. To do so, open the OpenSSL configuration file (/opt/bitnami/common/openssl/openssl.cnf), find the [ v3_ca ] section in the file, and add this line under it (substitute in the ELK server's private IP address for the IP_ADDRESS placeholder):

      subjectAltName = IP: IP_ADDRESS
  • Generate the SSL certificate and private key in the appropriate locations (e.g. /opt/bitnami/logstash/ssl/), with the following commands:

      $ cd /opt/bitnami/logstash/ssl/
      $ openssl req -config /opt/bitnami/common/openssl/openssl.cnf -x509 -days 3650 -batch -nodes -newkey rsa:2048 -keyout logstash-remote.key -out logstash-remote.crt
  • Configure Logstash (/opt/bitnami/logstash/conf/) to add SSL certificates for the input protocol. The code below will add SSL certificates for the Beats plugin:

      input {
        beats {
          port => 5044
          ssl => true
          ssl_certificate => "/opt/bitnami/logstash/ssl/logstash-remote.crt"
          ssl_key => "/opt/bitnami/logstash/ssl/logstash-remote.key"
  • Restart Logstash:

      $ sudo /opt/bitnami/ restart logstash
  • Open port 5044 in the ELK server firewall

  • The logstash-remote.crt file should be copied to all the client instances that send logs to Logstash.

  • Install Filebeat in the client machine. For example, the commands below will install Filebeat:

    $ echo "deb stable main" |  sudo tee -a /etc/apt/sources.list.d/beats.list
    $ wget -qO - | sudo apt-key add -
    • Debian:

       $ sudo apt-get update
       $ sudo apt-get install filebeat
    • CentOS:

       $ sudo yum install filebeat
  • Configure Filebeat. In this example, we need to add the lines below in the filebeat configuration file (by default /etc/filebeat/filebeat.yml) to send syslog logs:

              - /var/log/auth.log
              - /var/log/syslog
              #  - /var/log/*.log
            document_type: syslog
          hosts: ["elk_server_private_ip:5044"]
          bulk_max_size: 1024
            certificate_authorities: ["<logstash-remote.crt_path>"]
  • Restart Filebeat service:

    • Debian:

      $ sudo service filebeat restart
    • CentOS:

      $ sudo systemctl restart filebeat

How to start or stop the services?

Each Bitnami stack includes a control script that lets you easily stop, start and restart services. The script is located at /opt/bitnami/ Call it without any service name arguments to start all services:

$ sudo /opt/bitnami/ start

Or use it to restart a single service, such as Apache only, by passing the service name as argument:

$ sudo /opt/bitnami/ restart apache

Use this script to stop all services:

$ sudo /opt/bitnami/ stop

Restart the services by running the script without any arguments:

$ sudo /opt/bitnami/ restart

Obtain a list of available services and operations by running the script without any arguments:

$ sudo /opt/bitnami/

How to access the administration panel?

Access the administration panel by browsing to http://SERVER-IP//app/kibana.

How to install a plugin?

How to install a plugin on Elasticsearch?

Install plugins with the plugin tool provided by Elasticsearch. For example, the command below will install the ICU plugin plugin:

$ cd /opt/bitnami/elasticsearch
$ sudo bin/elasticsearch-plugin install analysis-icu

Once the plugin has been installed, change the user and group ownership of the plugin directory to the elasticsearch user. For example:

$ sudo chown -R elasticsearch:elasticsearch /opt/bitnami/elasticsearch/plugins/analysis-icu/

How to install a plugin on Logstash?

Logstash supports input, filter, codec and output plugins. These are available as self-contained gems ( You can install, uninstall and upgrade plugins using the Command Line Interface (CLI) invocations described below:

  • Install a plugin:

      $ cd /opt/bitnami/logstash
      $ bin/logstash-plugin install PLUGIN
  • Update a plugin:

      $ bin/logstash-plugin update PLUGIN
  • List all installed plugins:

      $ bin/logstash-plugin list
  • Uninstall a plugin (for Logstash <= 2.4 versions):

      $ bin/logstash-plugin uninstall PLUGIN

How to install a plugin on Kibana?

Add-on functionality for Kibana is implemented with plug-in modules.

  • Install a plugin:

      $ cd /opt/bitnami/kibana
      $ bin/kibana-plugin install ORG/PLUGIN/VERSION
  • List all installed plugins:

      $ bin/kibana-plugin list
  • Remove a plugin:

      $ bin/kibana-plugin remove PLUGIN

You can also install a plugin manually by moving the plugin file to the plugins directory and unpacking the plugin files into a new directory.

How to install X-Pack?

X-Pack is an extension which adds additional features to Elasticsearch and Kibana, such as security enhancements, machine learning features and others.

In order to install X-Pack into the ELK stack, please follow the steps in the sections below.

Install X-Pack into Elasticsearch

The steps below describe how to install the X-Pack plugin into Elasticsearch:

  • Stop Elasticsearch:

      $ sudo /opt/bitnami/ stop elasticsearch
  • Install the X-Pack plugin in the /opt/bitnami/elasticsearch directory:

     $ cd /opt/bitnami/elasticsearch
     $ sudo bin/elasticsearch-plugin install x-pack
  • Update the ownership for newly created files and directories, so they are accessible for Elasticsearch:

     $ sudo chown -R elasticsearch:elasticsearch config/elasticsearch.keystore config/x-pack
  • Make sure that the host for Elasticsearch is publicly accessible for X-Pack:
    • Open /opt/bitnami/elasticsearch/config/elasticsearch.yml and update the network.publish_host property value to your server IP address.

      NOTE: X-Pack needs to access Elasticsearch on its assigned port (by default 9200). If you cannot access the port via the IP address mentioned above, change it to and save (this way X-Pack can access Elasticsearch locally). An alternative is to open the port in your firewall, as described in the FAQ.
    • Start Elasticsearch:

         $ sudo /opt/bitnami/ start elasticsearch
  • Generate X-Pack default passwords (note down the passwords you obtain for the elastic and kibana users):

     $ sudo bin/x-pack/setup-passwords auto

Disable Apache HTTP authentication

For security purposes, Bitnami enables HTTP authentication for Kibana. However, the X-Pack plugin enables HTTP authentication by default, making Kibana inaccessible.

In order to access Kibana again, please follow the steps below in order to disable the HTTP authentication enabled by Bitnami:

  • In the /opt/bitnami/elasticsearch/apache-conf/elasticsearch.conf file, remove the following lines and save:

     <LocationMatch "^/(elasticsearch|elk).*?">
       AuthType Basic
       AuthName "Insert your Elasticsearch credentials. If you have problems visit:"
       AuthBasicProvider file
       AuthUserFile "/opt/bitnami/elasticsearch/apache-conf/password"
       Require user user
  • Restart Apache:

     $ sudo /opt/bitnami/ restart apache

Install X-Pack into Kibana

The steps below describe how to install the X-Pack plugin into Kibana:

  • Stop Kibana:

     $ sudo /opt/bitnami/ stop kibana
  • Install the X-Pack plugin in the /opt/bitnami/kibana directory (this step may take up to 30 minutes):

     $ cd /opt/bitnami/kibana
     $ sudo bin/kibana-plugin install x-pack
  • Modify Kibana configuration for X-Pack to work with the Apache frontend server, to do so:
    • Open /opt/bitnami/kibana/config/kibana.yml.
    • Add the following lines and save, replacing KIBANA_PASSWORD with the credentials for the kibana user you created above:

         elasticsearch.username: kibana
         elasticsearch.password: KIBANA_PASSWORD
         xpack.reporting.kibanaServer.port: 80
         xpack.reporting.kibanaServer.protocol: http
  • Start Kibana:

     $ sudo /opt/bitnami/ start kibana

You can now access Kibana at http://SERVER-IP/elk/ with the credentials you created above.

How to create a full backup of Elasticsearch data?


Elasticsearch provides a snapshot function that you can use to back up your data. Follow these steps:

  • Register a repository where the snapshot will be stored. This may be a local directory or cloud storage (which requires additional plugins). In this example, we will use a local repository, which can be initialized via the Elasticsearch REST API with the following commands:

     $ cd /home/bitnami
     $ mkdir backups
     $ chown elasticsearch:bitnami /home/bitnami/backups/
     $ chmod u+rwx /home/bitnami/backups/
  • Update the /opt/bitnami/elasticsearch/config/elasticsearch.yml file and add the path.repo variable to it as shown below, pointing to the above repository location:

     path.repo: ["/home/bitnami/backups"]
  • Initialize the repository via the Elasticsearch REST API with the following commands:

     $ curl -XPUT 'http://localhost:9200/_snapshot/my_backup' -d '{

    The location property has to be set to the absolute path to the backup files. In this example, my_backup is the name of the backup repository.

    See registered repositories with this command:

     $ curl -XGET 'http://localhost:9200/_snapshot?pretty'
  • Once the repository is registered, launch the backup with the following command:

     $ curl -XPUT 'localhost:9200/_snapshot/my_backup/snapshot_1?wait_for_completion=true&pretty'

    In this example, my_backup is the name of the repository created previously and snapshot_1 is the name for the backup. The wait_for_completion option will block the command line until the snapshot is complete. To create the snapshot in the background, simply omit this option, as shown below:

     $ curl -XPUT 'localhost:9200/_snapshot/my_backup/snapshot_1'


To restore a backup over existing data, follow these steps:

  • Close the specific indices that will be overwritten with this command:

     $ curl -XPOST 'localhost:9200/my_index/_close'

    Optionally, close all indices:

     $ curl -XPOST 'localhost:9200/_all/_close'
  • Restore the backup with the following command. This command will also reopen the indices closed before.

     $ curl -XPOST 'localhost:9200/_snapshot/my_backup/snapshot_1/_restore'

For more information, refer to the official documentation.

How to upgrade ELK?

NOTE: It's highly recommended to perform a backup before any upgrade.

Upgrade Elasticsearch

Since version 0.90.7, Elasticsearch supports rolling upgrades. As a result, it's not necessary to stop the entire cluster during the upgrade process. Instead, it is possible to upgrade one node at a time and keep the rest of the cluster operating normally.

To upgrade a node, follow the steps below:

  • Disable shard reallocation using the command below:

     $ curl -XPUT localhost:9200/_cluster/settings -d '{
         "transient" : {
             "cluster.routing.allocation.enable" : "none"
  • Stop non-essential indexing and perform a synced flush (optional):

     $ curl -XPOST 'http://localhost:9200/_flush/synced'
  • Stop the node:

     $ curl -XPOST 'http://localhost:9200/_cluster/nodes/_local/_shutdown'
     $ sudo /opt/bitnami/ stop elasticsearch
  • Download the latest version.

  • Extract to a new directory (not overwriting the current installation) - for example, /tmp/new_elasticsearch.

  • Rename old files:

     $ cd /opt/bitnami
     $ sudo mv elasticsearch/bin elasticsearch/old_bin
     $ sudo mv elasticsearch/lib elasticsearch/old_lib
     $ sudo mv elasticsearch/modules elasticsearch/old_modules
  • Copy files from new installation directory:

     $ sudo cp -r /tmp/new_elasticsearch/bin elasticsearch/bin
     $ sudo cp -r /tmp/new_elasticsearch/lib elasticsearch/lib
     $ sudo cp -r /tmp/new_elasticsearch/modules elasticsearch/modules
  • Start the node again:

     $ sudo /opt/bitnami/ start elasticsearch
  • Remove the replicas:

     $ curl -XPUT -d{"number_of_replicas":0}
  • Confirm that the node joins the cluster:

     $ curl -XGET 'http://localhost:9200/_cat/nodes'
  • Re-enable shard reallocation:

     $ curl -XPUT localhost:9200/_cluster/settings -d '{
         "transient" : {
             "cluster.routing.allocation.enable" : "all"
  • Wait for the node to recover:

     $ curl -XGET 'http://localhost:9200/_cat/health'

Repeat the process for all remaining nodes of your cluster.

Upgrade Logstash

To upgrade Logstash, follow the steps below:

  • Stop the service:

     $ sudo /opt/bitnami/ stop logstash
  • Download the latest version.

  • Extract to a new directory (not overwriting the current installation) - for example, /tmp/new_logstash.

  • Backup old files:

     $ cd /opt/bitnami
     $ sudo cp logstash old_logstash
  • Copy files from new installation directory:

     $ sudo cp -r /tmp/new_logstash/* logstash/
  • Test your configuration file:

     $ logstash -t -f /opt/bitnami/logstash/conf/logstash.conf
  • Start the service again:

     $ sudo /opt/bitnami/ start logstash

Upgrade Kibana

To upgrade Kibana, follow these steps:

  • Create a snapshot of the existing .kibana index

  • Stop the service:

     $ sudo /opt/bitnami/ stop kibana
  • Download the latest version.

  • Extract to a new directory (not overwriting the current installation) - for example, /tmp/new_kibana.

  • Take note of the Kibana plugins that are already installed:

     $ kibana/bin/kibana-plugin list
  • Backup old files:

     $ cd /opt/bitnami
     $ sudo cp kibana old_kibana
  • Copy files from new installation directory:

     $ sudo cp -r /tmp/new_kibana/* kibana/
  • Recover the kibana.yml file:

     $ cp old_kibana/config/kibana.yml kibana/config/kibana.yml
  • Start the service again:

     $ sudo /opt/bitnami/ start kibana

How to create an SSL certificate?

OpenSSL is required to create an SSL certificate. A certificate request can then be sent to a certificate authority (CA) to get it signed into a certificate, or if you have your own certificate authority, you may sign it yourself, or you can use a self-signed certificate (because you just want a test certificate or because you are setting up your own CA).

Follow the steps below:

  • Generate a new private key:

     $ sudo openssl genrsa -out /opt/bitnami/apache2/conf/server.key 2048
  • Create a certificate:

     $ sudo openssl req -new -key /opt/bitnami/apache2/conf/server.key -out /opt/bitnami/apache2/conf/cert.csr
    IMPORTANT: Enter the server domain name when the above command asks for the "Common Name".
  • Send cert.csr to the certificate authority. When the certificate authority completes their checks (and probably received payment from you), they will hand over your new certificate to you.

  • Until the certificate is received, create a temporary self-signed certificate:

     $ sudo openssl x509 -in /opt/bitnami/apache2/conf/cert.csr -out /opt/bitnami/apache2/conf/server.crt -req -signkey /opt/bitnami/apache2/conf/server.key -days 365
  • Back up your private key in a safe location after generating a password-protected version as follows:

     $ sudo openssl rsa -des3 -in /opt/bitnami/apache2/conf/server.key -out privkey.pem

    Note that if you use this encrypted key in the Apache configuration file, it will be necessary to enter the password manually every time Apache starts. Regenerate the key without password protection from this file as follows:

     $ sudo openssl rsa -in privkey.pem -out /opt/bitnami/apache2/conf/server.key

Find more information about certificates at

How to enable HTTPS support with SSL certificates?

NOTE: The steps below assume that you are using a custom domain name and that you have already configured the custom domain name to point to your cloud server.

Bitnami images come with SSL support already pre-configured and with a dummy certificate in place. Although this dummy certificate is fine for testing and development purposes, you will usually want to use a valid SSL certificate for production use. You can either generate this on your own (explained here) or you can purchase one from a commercial certificate authority.

Once you obtain the certificate and certificate key files, you will need to update your server to use them. Follow these steps to activate SSL support:

  • Use the table below to identify the correct locations for your certificate and configuration files.

    Variable Value
    Current application URL https://[custom-domain]/
      Example: or
    Apache configuration file /opt/bitnami/apache2/conf/bitnami/bitnami.conf
    Certificate file /opt/bitnami/apache2/conf/server.crt
    Certificate key file /opt/bitnami/apache2/conf/server.key
    CA certificate bundle file (if present) /opt/bitnami/apache2/conf/server-ca.crt
  • Copy your SSL certificate and certificate key file to the specified locations.

    NOTE: If you use different names for your certificate and key files, you should reconfigure the SSLCertificateFile and SSLCertificateKeyFile directives in the corresponding Apache configuration file to reflect the correct file names.
  • If your certificate authority has also provided you with a PEM-encoded Certificate Authority (CA) bundle, you must copy it to the correct location in the previous table. Then, modify the Apache configuration file to include the following line below the SSLCertificateKeyFile directive. Choose the correct directive based on your scenario and Apache version:

    Variable Value
    Apache configuration file /opt/bitnami/apache2/conf/bitnami/bitnami.conf
    Directive to include (Apache v2.4.8+) SSLCACertificateFile "/opt/bitnami/apache2/conf/server-ca.crt"
    Directive to include (Apache < v2.4.8) SSLCertificateChainFile "/opt/bitnami/apache2/conf/server-ca.crt"
    NOTE: If you use a different name for your CA certificate bundle, you should reconfigure the SSLCertificateChainFile or SSLCACertificateFile directives in the corresponding Apache configuration file to reflect the correct file name.
  • Once you have copied all the server certificate files, you may make them readable by the root user only with the following commands:

     $ sudo chown root:root /opt/bitnami/apache2/conf/server*
     $ sudo chmod 600 /opt/bitnami/apache2/conf/server*
  • Open port 443 in the server firewall. Refer to the FAQ for more information.

  • Restart the Apache server.

You should now be able to access your application using an HTTPS URL.

How to force HTTPS redirection with Apache?

Add the following to the top of the /opt/bitnami/apps/elk/conf/httpd-prefix.conf file:

RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^/(.*) https://%{SERVER_NAME}/$1 [R,L]

After modifying the Apache configuration files:

  • Open port 443 in the server firewall. Refer to the FAQ for more information.

  • Restart Apache to apply the changes.

How to debug Apache errors?

Once Apache starts, it will create two log files at /opt/bitnami/apache2/logs/access_log and /opt/bitnami/apache2/logs/error_log respectively.

  • The access_log file is used to track client requests. When a client requests a document from the server, Apache records several parameters associated with the request in this file, such as: the IP address of the client, the document requested, the HTTP status code, and the current time.

  • The error_log file is used to record important events. This file includes error messages, startup messages, and any other significant events in the life cycle of the server. This is the first place to look when you run into a problem when using Apache.

If no error is found, you will see a message similar to:

Syntax OK

Updating the IP address or hostname

ELK requires updating the IP address/domain name if the machine IP address/domain name changes. The bnconfig tool also has an option which updates the IP address, called --machine_hostname (use --help to check if that option is available for your application). Note that this tool changes the URL to http://NEW_DOMAIN/elk.

$ sudo /opt/bitnami/apps/elk/bnconfig --machine_hostname NEW_DOMAIN

If you have configured your machine to use a static domain name or IP address, you should rename or remove the /opt/bitnami/apps/elk/bnconfig file.

$ sudo mv /opt/bitnami/apps/elk/bnconfig /opt/bitnami/apps/elk/bnconfig.disabled
NOTE: Be sure that your domain is propagated. Otherwise, this will not work. You can verify the new DNS record by using the Global DNS Propagation Checker and entering your domain name into the search field.

You can also change your hostname by modifying it in your hosts file. Enter the new hostname using your preferred editor.

$ sudo nano /etc/hosts
  • Add a new line with the IP address and the new hostname. Here's an example. Remember to replace the IP-ADDRESS and DOMAIN placeholders with the correct IP address and domain name.


How to upload files to the server with SFTP?

Although you can use any SFTP/SCP client to transfer files to your server, the link below explains how to configure FileZilla (Windows, Linux and Mac OS X), WinSCP (Windows) and Cyberduck (Mac OS X). It is required to use your server's private SSH key to configure the SFTP client properly. Choose your preferred application and follow the steps in the link below to connect to the server through SFTP.

How to upload files to the server

Troubleshooting ELK

How to debug errors in ELK?

The Elasticsearch log files are created at /opt/bitnami/elasticsearch/logs/.

The Logstash log files are created at /opt/bitnami/logstash/logs/.

The Kibana log file is created at /opt/bitnami/kibana/logs/kibana.log.

How to add nodes to an Elasticsearch cluster?

To add additional nodes to a cluster, update the following configuration parameters in the node's /opt/bitnami/elasticsearch/config/elasticsearch.yml file:

  • All the nodes should have the same cluster name to work properly.

  • The name of each node should be unique. Set meaningful names to your nodes according to their functions so it will be easier to identify them.

  • network.publish_host: The host name that a node publishes to other nodes for communication. This host should be accessible at least from the master node.

  • When nodes are in the same sub-network, they will auto-configure themselves into a cluster. In other cases, specify a list with your nodes in this parameter.

Refer to the Elasticsearch official documentation for more information.

How to make the Kibana dashboard public?

NOTE: For security reasons, we do not recommend disabling authentication.

By default, you will be prompted for a username and password every time you access the Kibana dashboard. This can create problems if, for example, you wish to embed Kibana data in other pages. To disable the authentication prompt, follow these steps:

  • Edit the Apache configuration file at /opt/bitnami/elasticsearch/apache-conf/elasticsearch.conf and remove the LocationMatch section.

  • Restart Apache by running the command below:

     $ sudo /opt/bitnami/ restart apache

How to install elasticsearch-head?

Elasticsearch-head is a Web front-end for an Elasticsearch cluster. For Elasticsearch 5.x, site plugins are not supported, so it needs to run as a standalone server. Follow these steps:

  • Install Node.js and npm. For example, the commands below will install them on Debian:

     $ sudo apt install nodejs-legacy npm
  • Download the elasticsearch-head ZIP file and decompress it:

     $ wget
     $ unzip
  • Install the modules and run the service:

     $ cd elasticsearch-head-master
     $ npm install
     $ ./node_modules/grunt/bin/grunt server &
  • Update the /opt/bitnami/elasticsearch/config/elasticsearch.yml file and enable CORS by setting http.cors.enabled to true:

     http.cors.enabled: true
  • In the same file, set the http.cors.allow-origin variable to the domains that are allowed to send cross-origin requests. If you prepend and append a "/" to the value, this will be treated as a regular expression. For example:

     http.cors.allow-origin: /https?:\/\/localhost(:[0-9]+)?/
NOTE: You can set the value of http.cors.allow-origin to "*" to allow CORS requests from anywhere if you wish. However, this is not recommended as it is a security risk.
  • Add Apache configuration for elasticsearch-head to /opt/bitnami/elasticsearch/apache-conf/elasticsearch.conf:

     ProxyPass        /elasticsearch-head
     ProxyPassReverse /elasticsearch-head
  • Restart the services:

     $ sudo /opt/bitnami/ restart apache
  • Browse to http://SERVER-IP/elasticsearch-head/?base_uri=http://SERVER-IP/elasticsearch and insert your Elasticsearch credentials. You should see something like the screenshot below:

elasticsearch-head interface

Which components are installed with the Bitnami ELK Stack?

The Bitnami ELK Stack ships the components listed below. If you want to know which specific version of each component is bundled in the stack you are downloading, check the README.txt file on the download page or in the stack installation directory. You can also find more information about each component using the links below.

Main components


Bitnami Documentation