mirror of
https://github.com/deviantony/docker-elk.git
synced 2026-01-02 11:10:08 +01:00
APM Server extension
The APM Server receives data from APM agents and transforms them into Elasticsearch documents that can be visualised in Kibana.
Usage
To include APM Server in the stack, run Docker Compose from the root of the repository with an additional command line
argument referencing the apm-server-compose.yml file:
$ docker-compose -f docker-compose.yml -f extensions/apm-server/apm-server-compose.yml up
Meanwhile, you can navigate to the APM application in Kibana and follow the setup instructions to get started.
Connecting an agent to APM Server
The most basic configuration to send traces to APM server is to specify the SERVICE_NAME and SERVICE_URL. Here is an
example Python Flask configuration:
import elasticapm
from elasticapm.contrib.flask import ElasticAPM
from flask import Flask
app = Flask(__name__)
app.config['ELASTIC_APM'] = {
# Set required service name. Allowed characters:
# a-z, A-Z, 0-9, -, _, and space
'SERVICE_NAME': 'PYTHON_FLASK_TEST_APP',
# Set custom APM Server URL (default: http://localhost:8200)
'SERVER_URL': 'http://apm-server:8200',
'DEBUG': True,
}
More configuration settings can be found for each language in the following documentation page: Install APM agents.
Checking connectivity and importing default APM dashboards
- On the Kibana home page, click
Add APMunder the Observability panel. - Click
Check APM Server statusto confirm the server is up and running. - Click
Check agent statusto verify your agent has registered properly. - Click
Load Kibana objectsto create an index pattern for APM. - Click
Launch APMto be taken to the APM dashboard.