Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
docker-elk
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
段孔乐
docker-elk
Commits
190f1746
Unverified
Commit
190f1746
authored
Mar 05, 2020
by
Antoine Cotten
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add APM Server extension tests
Update extension README
parent
2d90bfce
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
59 additions
and
23 deletions
+59
-23
.travis.yml
.travis.yml
+17
-5
run-tests-apm-server.sh
.travis/run-tests-apm-server.sh
+13
-0
README.md
extensions/apm-server/README.md
+20
-16
apm-server-compose.yml
extensions/apm-server/apm-server-compose.yml
+9
-2
No files found.
.travis.yml
View file @
190f1746
...
...
@@ -23,6 +23,7 @@ before_script:
-
sed -i -e 's/\(xpack.monitoring.elasticsearch.username:\) elastic/\1 logstash_system/g' -e 's/\(xpack.monitoring.elasticsearch.password:\) changeme/\1 testpasswd/g' logstash/config/logstash.yml
-
sed -i 's/\(password =>\) "changeme"/\1 "testpasswd"/g' logstash/pipeline/logstash.conf
-
sed -i 's/\(elasticsearch.password:\) changeme/\1 testpasswd/g' extensions/app-search/config/app-search.yml
-
sed -i 's/\(password:\) changeme/\1 testpasswd/g' extensions/apm-server/config/apm-server.yml
script
:
# Core Elastic Stack
...
...
@@ -35,18 +36,29 @@ script:
-
docker-compose logs elasticsearch
-
docker-compose logs kibana
-
docker-compose logs logstash
-
docker-compose
down -v
-
docker-compose
stop logstash kibana
# Extensions
-
docker-compose up -d elasticsearch
-
sleep 30
-
.travis/elasticsearch-setup-passwords.exp
# App Search
-
docker-compose -f docker-compose.yml -f extensions/app-search/app-search-compose.yml up -d app-search
-
.travis/run-tests-app-search.sh
-
docker-compose -f docker-compose.yml -f extensions/app-search/app-search-compose.yml ps
-
docker-compose -f docker-compose.yml -f extensions/app-search/app-search-compose.yml logs app-search
-
docker-compose -f docker-compose.yml -f extensions/app-search/app-search-compose.yml down -v
-
docker-compose -f docker-compose.yml -f extensions/app-search/app-search-compose.yml stop app-search
# APM Server
-
docker-compose -f docker-compose.yml -f extensions/apm-server/apm-server-compose.yml up -d apm-server
-
.travis/run-tests-apm-server.sh
-
docker-compose -f docker-compose.yml -f extensions/apm-server/apm-server-compose.yml ps
-
docker-compose -f docker-compose.yml -f extensions/apm-server/apm-server-compose.yml logs apm-server
-
docker-compose -f docker-compose.yml -f extensions/apm-server/apm-server-compose.yml stop apm-server
# Tear down
-
>-
docker-compose
-f docker-compose.yml
-f extensions/app-search/app-search-compose.yml
-f extensions/apm-server/apm-server-compose.yml
down -v
# Swarm
- docker swarm init
...
...
.travis/run-tests-apm-server.sh
0 → 100755
View file @
190f1746
#!/usr/bin/env bash
set
-eu
set
-o
pipefail
source
"
$(
dirname
${
BASH_SOURCE
[0]
})
/lib/testing.sh"
declare
MODE
=
""
log
'Waiting for readiness of APM Server'
poll_ready apm-server
'http://localhost:8200/'
extensions/apm-server/README.md
View file @
190f1746
# APM Server extension
Adds a container for Elasticsearch APM server. Forwards caught errors and traces to Elasticsearch to enable their
visualisation in
Kibana.
The APM Server receives data from APM agents and transforms them into Elasticsearch documents that can be visualised in
Kibana.
## Usage
If you want to include the APM server, run Docker Compose from the root of the repository with an additional command
line
argument referencing the
`apm-server-compose.yml`
file:
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:
```
console
$
docker-compose
-f
docker-compose.yml
-f
extensions/apm-server/apm-server-compose.yml up
```
## Connecting an agent to APM-Server
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 F
LASK
configuration:
example Python F
lask
configuration:
```
python
import
elasticapm
...
...
@@ -36,19 +38,21 @@ app.config['ELASTIC_APM'] = {
}
```
More configuration settings can be found
under the
**Configuration**
section for each language:
https://www.elastic.co/guide/en/apm/agent/index.html
More configuration settings can be found
for each language in the following documentation page:
[
Install APM
agents]
[
apm-agents
]
.
## Checking connectivity and importing default APM dashboards
From the Kibana Dashboard:
1.
`Add APM`
button under _Add Data to Kibana_ section
2.
Ignore all the install instructions and press
`Check APM Server status`
button.
3.
Press
`Check agent status`
4.
Press
`Load Kibana objects`
to get the default dashboards
5.
Lastly press the
`APM dashboard`
to the bottom right.
1.
On the Kibana home page, click
`Add APM`
under the _Observability_ panel.
2.
Click
`Check APM Server status`
to confirm the server is up and running.
3.
Click
`Check agent status`
to verify your agent has registered properly.
4.
Click
`Load Kibana objects`
to create an index pattern for APM.
5.
Click
`Launch APM`
to be taken to the APM dashboard.
## See also
[
Running APM Server on Docker
](
https://www.elastic.co/guide/en/apm/server/current/running-on-docker.html
)
[
Running APM Server on Docker
][
apm-docker
]
[
apm-agents
]:
https://www.elastic.co/guide/en/apm/get-started/current/agents.html
[
apm-docker
]:
https://www.elastic.co/guide/en/apm/server/current/running-on-docker.html
extensions/apm-server/apm-server-compose.yml
View file @
190f1746
...
...
@@ -6,10 +6,17 @@ services:
context
:
extensions/apm-server/
args
:
ELK_VERSION
:
$ELK_VERSION
command
:
# Disable strict permission checking on 'apm-server.yml' configuration file
# https://www.elastic.co/guide/en/beats/libbeat/current/config-file-permissions.html
-
--strict.perms=false
volumes
:
-
./extensions/apm-server/config/apm-server.yml:/usr/share/apm-server/apm-server.yml:ro
-
type
:
bind
source
:
./extensions/apm-server/config/apm-server.yml
target
:
/usr/share/apm-server/apm-server.yml
read_only
:
true
ports
:
-
"
8200:8200"
-
'
8200:8200'
networks
:
-
elk
depends_on
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment