Skip to content

About

Example configuration files for your apps to connect your apps to Elastic APM on Clever Cloud

Topics

Resources

Stars

1 star

Watchers

5 watching

Forks

Latest commit

 

History

14 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Clever loves Elastic

Add Elastic Application Performance Monitoring to your apps on Clever Cloud

Create an APM Server on Clever Cloud

When you provision the Elastic Stack add-on on Clever Cloud, you get an Elasticsearch Platinum instance, Kibana and an APM server.

  • Elasticsearch is a distributed search and analytics engine that centrally stores your data for real-time discovery and analysis.
  • Kibana is a visualization tool that lets you explore Elasticsearch data and track application metrics through dashboards. Organization members access Kibana through an automatically configured SSO system with no additional authentication setup required.
  • Elastic APM is an application performance monitoring solution that reveals where your application spends time, helping you identify and resolve issues quickly.

Both APM and Kibana are opt-in options that deploy as separate applications within your organization. Each receives its own application name following the pattern: Component Name - addon_[ID]. Provisioning takes approximately one minute. You can scale up/down or delete them independently, and Clever Cloud updates them automatically.

⚠️ Do not connect the Elastic Stack addon to your apps or you'll get the wrong environment variables. Instead, link your apps to the APM application (see below).

Connect your apps

Regardless of the language of your app, you'll need to connect your app to the APM on Clever Cloud.

Step 1: From the Clever Cloud Console

Follow these steps to connect your app deployed on Clever Cloud to Elastic APM.

Steps

  1. Go to your app menu "Service Dependencies"
  2. Choose "Link applications" and select your APM app.
  3. Restart your app to deploy with new APM environment variables.

Step 2: Check the connection

Now you can open your APM dashboard and check if your app appears in the Services list. It will appear by the name you gave it on the Console.

Not seeing your app in Kibana?

In some cases (like WordPress), previous steps all you'll need to do, but most apps will need to get the Elastic agent from core.

If you open APM and don't see your app listed in the Services list, it means you'll need to make a quick set up in the code.

Check this repository to find step-by-step instructions that fits your app language. Folders contain ready-to-work-example files that you can just add to your app and commit.

Export your logs to Elastic

You can export your logs to your Elastic addon with clever-tools, Clever Cloud CLI. See installation options to get started.

Once you got clever-tools installed, just create a log drain with the following commands:

clever drain create ElasticSearch https://xxx-elasticsearch.services.clever-cloud.com/_bulk --username USERNAME --password PASSWORD

What does this command means?

  • clever drain create is the command to create a drain
  • ElasticSearch allows you to use the Elastic bulk API
  • Fill the rest with Elasticsearch credentials you'll find on your Elastic Addon dashboard.
    • ⚠️ don't forget to add /_bulk at the end the domain name

Elastic creds on Clever Cloud Console

About

Example configuration files for your apps to connect your apps to Elastic APM on Clever Cloud

Topics

Resources

Stars

1 star

Watchers

5 watching

Forks

Releases

Packages

Contributors

Languages