yidinghan / eak

elasticsearch apm-server kibana

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

EAK

elasticsearch apm-server kibana

Quick Run

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

Remarks

  • Since v6.4, apm dashboard setup move to Kibana UI.

  • with apm-agent-nodejs:v1.1.0

    • 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

  • with playdingnow/elastic-apm-server:1.5.0

    • drop Waterline from dashboard temporary
  • with docker.elastic.co/kibana/kibana:6.1.1

    • A new tab named APM appears in the left sidebar

  • with playdingnow/elastic-apm-server:1.4.3

    • The default apm-dashboards.json have been changed to customize data
    • One more visualization chart name is Waterline

  • with playdingnow/elastic-apm-server:v1.2

    • The default secret_token have been changed from '' to xxVpmQB2HMzCL9PgBHVrnxjNXXw5J7bd79DFm6sjBJR5HPXDhcF8MSb3vv4bpg44
  • 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
  • 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

Resources

Waterline

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

Example

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

About

elasticsearch apm-server kibana

License:Apache License 2.0


Languages

Language:JavaScript 53.3%Language:Shell 46.7%