elasticsearch apm-server kibana
wget https://raw.githubusercontent.com/yidinghan/eak/master/docker-compose.yml
docker-compose up -d
Go to localhost:5601
, or what your machine IP
Wait for kibana to be available, then you are ready to try apm
-
Since v6.4, apm dashboard setup move to Kibana UI.
-
- start method
// change from require('elastic-apm-node/start'); // to require('elastic-apm-node').start();
elastic-apm-node.js
config change
// change from appName: 'apm-reseach', // to serviceName: 'apm-reseach',
-
with docker.elastic.co/kibana/kibana:6.2.2
- New tab
APM
is ready to go
- New tab
-
with playdingnow/elastic-apm-server:1.5.0
- drop
Waterline
from dashboard temporary
- drop
-
with docker.elastic.co/kibana/kibana:6.1.1
- A new tab named
APM
appears in the left sidebar
- A new tab named
-
with playdingnow/elastic-apm-server:v1.2
- The default secret_token have been changed from
''
toxxVpmQB2HMzCL9PgBHVrnxjNXXw5J7bd79DFm6sjBJR5HPXDhcF8MSb3vv4bpg44
- The default secret_token have been changed from
-
with compose 2.2 feature, healthcheck
- your may need to wait a while in the
up
stage - because kibana depends on es
- apm-server depends on es and kibana
- your may need to wait a while in the
-
apm-server may exit before elasticsearch is ready
- exit status could be found by
docker-compose ps
- once exit then you should restart it, like
docker-compose up -d
- exit status could be found by
-
docker elastic: https://www.docker.elastic.co/
-
elasticsearch
- image:
docker pull docker.elastic.co/elasticsearch/elasticsearch:6.5.1
- github: https://github.com/elastic/elasticsearch
- docker: https://www.elastic.co/guide/en/elasticsearch/reference/6.0/docker.html
- vm.max_map_count: docker-library/elasticsearch#111 (comment)
$ grep vm.max_map_count /etc/sysctl.conf vm.max_map_count=262144 $ sysctl -w vm.max_map_count=262144
- image:
-
apm-server
- image:
docker pull docker.elastic.co/apm/apm-server:6.5.1
- github: https://github.com/elastic/apm-server
- docker: https://www.elastic.co/guide/en/apm/server/current/running-on-docker.html
- config: https://github.com/elastic/apm-server/blob/master/apm-server.reference.yml
- image:
-
kibana
- image:
docker pull docker.elastic.co/kibana/kibana:6.5.1
- github: https://github.com/elastic/kibana
- docker: https://www.elastic.co/guide/en/kibana/6.0/docker.html
- image:
-
apm agent
The higher the waterline, the higher the service load, formula is as follows
waterline = sum([waterline_0, waterline_1, ..., waterline_n]) / count(duration)
waterline_x = count(duration, [border_x_start, border_x_end]) * a_x
Where
- duration is
transaction.duration.us
- border_x is interval border, like [0, 100] means from 0ms to 100ms
- a_x is interval coefficient of border_x, like 1/2/100 or whatever you want
waterline = ( count(duration, [0, 200]) * 1 + count(duration, [200, *]) * 2 ) / count(duration)
In a point
10 = count(duration, [0, 200])
1 = count(duration, [200, *])
Then, in 3 decimal places precision
waterline = ( 10 * 1 + 1 * 2 ) / 11 = 1.091