Elastic Stack (cluster)

Deploy Elastic Stack, a unified observability platform for collecting, indexing, searching, and visualizing logs and operational data. It combines Elasticsearch, Logstash, and Kibana to ingest, analyze, and visualize operational data for monitoring, troubleshooting, and security analysis.

The app deploys a multi-node Elastic Stack cluster using an automated deployment script configured by Akamai.

1. Deploy Elastic Stack

 Estimated deployment time: 5–10 minutes for a cluster of 5 nodes.
 Larger clusters may take longer to provision.

Follow the deployment instructions from the Get started section to configure the app, deploy it, and verify software installation.

For information on the app-specific configurations, see the Configuration options section.

Base distribution

  • Supported distribution: Ubuntu 24.04 LTS

Configuration options

Configure the required options to deploy your instance. For additional customization, add advanced options.

The table maps the Cloud Manager UI fields to their corresponding API/CLI keys (stackscript_data) required for automated deployments.

StackScript ID: 1966222

UI fieldAPI/CLI keyDescription
Required options
Linode API tokentoken_passwordApplies to a custom domain. The Linode API token if you want to use Linode's DNS Manager to manage DNS records for your custom domain. It's also required to deploy additional Linode instances as part of this cluster. Follow Manage personal access tokens to get your token on your account with Read/Write access to Domains and Linodes.
  • If you provide the token along with the subdomain and domain, the installation attempts to create DNS records via the Linode API.
  • If you don't provide the token, you need to manually configure your DNS records through your DNS provider and point them to the IP address of the new instance.
Email address (for the Let's Encrypt SSL certificate)soa_email_addressThe email used to receive notifications about the renewal of the Let's Encrypt SSL certificate.
Limited sudo useruser_nameYour preferred username for the limited sudo user, entered without any capital letters, spaces, or special characters.
When adding a limited sudo user, the user is created with a strong generated password for your new Linode instance, and the account is assigned to the sudo group, which provides elevated permissions when running commands with the sudo prefix.
Note: For easier and more secure access with the sudo user, add an account SSH key for the Cloud Manager user during deployment and select that user as an authorized_user. Their SSH pubkey will be assigned to both the root and limited sudo users.
SSL InformationsslheaderSet to Yes by default. This requires providing details for a self-signed TLS/SSL certificate, like country, town, organization, and email address.
Country or regioncountry_nameApplies to a TLS/SSL certificate. The country or region for you or your organization. When using the API/CLI, specify it as a two-letter ISO country or region code.
State or province state_or_province_nameApplies to a TLS/SSL certificate. The state or province for you or your organization.
Localitylocality_nameApplies to a TLS/SSL certificate. The town or other locality for you or your organization.
Organizationorganization_nameApplies to a TLS/SSL certificate. The name of your organization.
Email addressemail_addressApplies to a TLS/SSL certificate. The email address you want to use for your certificate file. This email address may receive notifications about the state of your certificate, including when it's expired.
CA Common Nameca_common_nameApplies to a TLS/SSL certificate. The common name for the self-signed Certificate Authority (CA).
Advanced options
Disable root access over SSHdisable_rootApplies to a limited sudo user. To block the root user from logging in over SSH, select Yes. Defaults to No.
Note: When you disable the root user from logging in over SSH and don't provide a valid Account SSH Key assigned to the authorized_user, you can still switch to the root user. To do that, log in as root via the Lish console and run cat /home/$USERNAME/.credentials to view the generated password for the limited sudo user.
SubdomainsubdomainApplies to a custom domain. The subdomain you want to use, like blog for blog.example.com. Use it only if you specify a Domain.
DomaindomainApplies to a custom domain. The domain name you want to use, like example.com. Use it only if you specify a Linode API token.
Cluster SettingsclusterheaderSet to Yes by default. This is to provide details for your cluster settings, like its name, size, and more.
Cluster Namecluster_nameApplies to cluster settings. A descriptive name for your cluster.
Kibana Sizecluster_sizeApplies to cluster settings. A single Kibana instance created with Let’s Encrypt certificates. Defaults to 1. It can't be changed.
Note: To choose the Kibana instance, you first need to select a deployment region and then a plan for your Linode instance.
Elasticsearch Cluster Sizeelasticsearch_cluster_sizeApplies to cluster settings. The total number of nodes in your Elasticsearch cluster. Possible values are:
  • 2 (default)
  • 4
  • 6
  • 8
  • 10
  • 12
  • 14
Logstash Cluster Sizelogstash_cluster_sizeApplies to cluster settings. The total number of nodes in your Logstash cluster. Possible values are:
  • 2 (default)
  • 4
  • 6
  • 8
  • 10
  • 12
  • 14
Elasticsearch Instance Typeelasticsearch_cluster_typeApplies to cluster settings. The plan type for your Elasticsearch cluster. Possible values are:
  • Dedicated 4GB (default)
  • Dedicated 8GB
  • Dedicated 16GB
  • Dedicated 32GB
  • Dedicated 64GB
  • Dedicated 96GB
  • Dedicated 128GB
  • Dedicated 256GB
Logstash Instance Typelogstash_cluster_typeApplies to cluster settings. The plan type for your Logstash cluster. Possible values are:
  • Dedicated 4GB (default)
  • Dedicated 8GB
  • Dedicated 16GB
  • Dedicated 32GB
  • Dedicated 64GB
  • Dedicated 96GB
  • Dedicated 128GB
  • Dedicated 256GB
Filebeat IP addressesbeats_allowApplies to cluster settings. Filebeat IP addresses allowed to access Logstash. If you have Filebeat agents already installed, you can provide their IP addresses for an allowlist. The IP addresses must be comma-separated.
Logstash usernamelogstash_ingest_usernameApplies to cluster settings. A Logstash username to be created to access the specified index. When it's created, you can begin ingesting logs after deployment.
Elasticsearch indexelasticsearch_index_nameApplies to cluster settings. A name for the Elasticsearch index to be created for log ingestion. This lets you start ingesting logs. Edit the index name for your specific use case.
For example, if you have a WordPress application you want to perform log aggregation for, the index name wordpress-logs would be appropriate.

Notes:

  • After the app deployment completes, the password for your limited sudo user is generated and stored in the .credentials file in the home directory, along with application-specific passwords. Log in to your instance as root through the Lish console or SSH, then run cat /home/$USERNAME/.credentials to view its contents.
  • You can automatically configure a custom domain (optional) during deployment. To do that:
    1. First, configure your domain to use Linode’s name servers via your registrar. See Configure your domain's authoritative name servers for details.
    2. Once you complete that, specify the Linode API token, subdomain, and domain for the app in Cloud Manager or via API/CLI/Terraform.

Use API, CLI, or Terraform

In addition to deploying the app to a new Linode instance via Cloud Manager, you can also use the Linode API, CLI, or Terraform. When running the operation, you need to provide the StackScript ID, supported Linux distribution, and app-specific fields along with the standard Linode deployment configurations.

Note: Generate a personal access token to authenticate your API, CLI, or Terraform requests.

curl --location 'https://api.linode.com/v4/linode/instances' \
    --header 'Content-Type: application/json' \
    --header 'Accept: application/json' \
    --header 'Authorization: Bearer abc123def456hij789klm' \
    --data-raw '{
        "region": "us-east",
        "type": "g6-standard-2",
        "image": "linode/ubuntu24.04",
        "label": "my-elastic-search-cluster-one-click-app",
        "root_pass": "@C0mpl3x#P@ssw0rd",
        "stackscript_id": 1966222,
        "stackscript_data": {
            "token_password": "abc123def456hij789klm",
            "soa_email_address": "jsmith@example.com",
            "user_name": "jsmith",
            "country_name": "US",
            "state_or_province_name": "Massachusetts",
            "locality_name": "Cambridge",
            "organization_name": "Akamai Technologies",
            "email_address": "jsmith-other@example.com",
            "ca_common_name": "Elasticsearch CA"
        }
    }'
linode-cli linodes create \
    --region us-east \
    --type g6-standard-2 \
    --label my-elastic-search-cluster-one-click-app \
    --image linode/ubuntu24.04 \
    --root_pass @C0mpl3x#P@ssw0rd \
    --stackscript_id 1966222 \
    --stackscript_data '{"token_password": "abc123def456hij789klm", "soa_email_address": "jsmith@example.com", "user_name": "jsmith", "country_name": "US", "state_or_province_name": "Massachusetts", "locality_name": "Cambridge", "organization_name": "Akamai Technologies", "email_address": "jsmith-other@example.com", "ca_common_name": "Elasticsearch CA"}'
resource "linode_instance" "my-linode" {
    region         = "us-east"
    type           = "g6-standard-2"
    label          = "my-elastic-search-cluster-one-click-app"
    image          = "linode/ubuntu24.04"
    root_pass      = "@C0mpl3x#P@ssw0rd"
    stackscript_id = 1966222
    stackscript_data = {
        "token_password"         = "abc123def456hij789klm"
        "soa_email_address"      = "jsmith@example.com"
        "user_name"              = "jsmith"
        "country_name"           = "US"
        "state_or_province_name" = "Massachusetts"
        "locality_name"          = "Cambridge"
        "organization_name"      = "Akamai Technologies"
        "email_address"          = "jsmith-other@example.com"
        "ca_common_name"         = "Elasticsearch CA"
    }
}

2. Access Elastic Stack

Once the Elastic Stack cluster is deployed, log in to it using your browser.

  1. Log in to the provisioner node as your limited sudo user by running ssh USER@IP_ADDRESS. Replace USER with the sudo username you created, and IP_ADDRESS with the instance’s IPv4 address.

    Note: Your provisioner node is the first Linode created in your cluster and is also the instance running Kibana. To identify the node in your list of Linodes, look for the node appended with the name kibana. For example, kibana-1a2bc34d5.

  2. Open the .credentials file with the sudo cat /home/USER/.credentials command. Replace USER with your sudo username.

  3. In the .credentials file, locate the Kibana URL. After pasting the URL into your browser, you're redirected to the Elastic login page.

  4. Provide elastic as the username along with the password retrieved from the .credentials file.

    A successful login redirects you to the homepage. From there, you can add integrations, visualizations, and make other configuration changes.

Configure Filebeat (optional)

If you already have Filebeat on your system, follow these steps to configure it:

  1. Create a backup of your /etc/filebeat/filebeat.yml configuration.

    cp /etc/filebeat/filebeat.yml{,.bak}
  2. Update your Filebeat inputs.

    filebeat.inputs:
    
    # Each - is an input. Most options can be set at the input level, so
    # you can use different inputs for various configurations.
    # Below are the input-specific configurations.
    
    # filestream is an input for collecting log messages from files.
    - type: filestream
    
        # Unique ID among all inputs, an ID is required.
        id: web-01
    
        # Change to true to enable this input configuration.
        #enabled: false
        enabled: true
    
        # Paths that should be crawled and fetched. Glob based paths.
        paths:
            - /var/log/apache2/access.log

    In this example, the id must be unique to the instance so you know the source of the log. Ideally, this should be the instance’s hostname. This example uses the value web-01. Update paths to the log that you want to send to Logstash.

  3. While in /etc/filebeat/filebeat.yml, update the Filebeat output directive.

    output.logstash:
        # Logstash hosts
        hosts: ["logstash-1.example.com:5044", "logstash-2.example.com:5044"]
        loadbalance: true
    
        # List of root certificates for HTTPS server verifications
        ssl.certificate_authorities: ["/etc/filebeat/certs/ca.pem"]

    The hosts param can be the IP addresses of your Logstash host or an FQDN. In this example, logstash-1.example.com and logstash-2.example.com are added to the /etc/hosts file.

  4. Add a Certificate Authority (CA) certificate by adding the contents of ca.crt to your /etc/filebeat/certs/ca.pem file.

    To get your ca.crt, open a separate terminal session and log in to your Kibana node. Navigate to the /etc/kibana/certs/ca directory, and view the file contents with the cat command.

    cd /etc/kibana/certs/ca
    sudo cat ca.crt
  5. Copy the file contents and add it to your ca.pem file on your Filebeat system.

  6. Restart the Filebeat service.

    systemctl start filebeat
    systemctl enable filebeat

    Once complete, you should be able to start ingesting logs into your cluster using the index you created.

Additional resources

For more information about the installed packages, see their official documentation.

📘

Note that we can't vouch for the accuracy or timeliness of externally hosted resources.


Did this page help you?