28
Application performance management with PacketBeat, Elasticsearch and Kibana Tudor Golubenco (@tudor_g)

Application performance management with PacketBeat

  • Upload
    ledieu

  • View
    223

  • Download
    1

Embed Size (px)

Citation preview

Page 1: Application performance management with PacketBeat

Application performance management with PacketBeat, Elasticsearch and Kibana

Tudor Golubenco (@tudor_g)

Page 2: Application performance management with PacketBeat

What is PacketBeat? ¯\_(ツ)_/¯

Page 3: Application performance management with PacketBeat

What is PacketBeat

• “Open Source Application Monitoring”

• “Monitoring & Troubleshooting for Distributed Applications”

• “Distributed Wireshark with a lot more analytics features”

• “Application Performance Management”

Page 4: Application performance management with PacketBeat

How it works? ಠ_ಠ

Page 5: Application performance management with PacketBeat

How it works

• Captures the wire traffic

• Follows TCP streams, decodes HTTP, MySQL, PgSQL, REDIS, Thrift-RPC

• Looks for requests, waits for the matching response

• Records response time, URLs, response codes, etc

Page 6: Application performance management with PacketBeat

Show me! ( ̄^ ̄)

Page 7: Application performance management with PacketBeat
Page 8: Application performance management with PacketBeat

What do we do with the data? ¯\(°_o)/¯

Page 9: Application performance management with PacketBeat

The traditional way

• Decide what metrics you need (requests per second for each server, response time percentiles, etc.)

• Write code to extract these metrics, store them in a DB

• Store the transactions in a DB

• Drilling down is difficult

• Features like “Top 10 method with errors” are difficult to implement

Page 10: Application performance management with PacketBeat

PacketBeat + ELK

Page 11: Application performance management with PacketBeat

Why ELK?

• Already proven to scale and perform for logs

• Clear and simple flow for the data

• You don’t have to pre-create the metrics

• Ad-hoc troubleshooting and analytics by using Kibana

• Drilling down to the problematic transactions is trivial

• Top N features are trivial

• Slicing by different dimensions is easy

Page 12: Application performance management with PacketBeat

Show me! ( ̄^ ̄)

Page 13: Application performance management with PacketBeat
Page 14: Application performance management with PacketBeat
Page 15: Application performance management with PacketBeat
Page 16: Application performance management with PacketBeat
Page 17: Application performance management with PacketBeat

Pros of wire data

• Captures a lot of things that other approaches miss

• No changes to the code or to the monitored application

• Minimal knowledge about the monitored app is required

• No latency overhead

• When using tap points, zero CPU/memory overhead on the app servers

Page 18: Application performance management with PacketBeat

Cons of wire data

• There can be, like, tons of data

• Compared to log processing, larger CPU requirements

• Privacy concerns

• Doesn’t work for encrypted protocols

• Doesn’t work for “in-house” protocols

Page 19: Application performance management with PacketBeat

Next steps ( ͡° ͜ʖ ͡°)

Page 20: Application performance management with PacketBeat

More protocols

• Available:

• HTTP

• MySQL

• PostgreSQL

• REDIS

• Thrift-RPC

• Soon (tm):

• DNS

• Memcache

• MongoDB, RethinkDB

• Oracle, MSSQL

• XMLRPC / JSONRPC

• Your suggestions?

Page 21: Application performance management with PacketBeat

Sampling

• Wire data can be huge

• Troubleshooting convenience vs hardware requirements

• Sample by:

• protocol (e.g. store all MySQL requests, sample REDIS 1/10)

• method (e.g. store all PUTs requests, sample GETs 1/10)

• status code (e.g. store all errors, sample successes)

• response time (e.g. store all slow transactions)

Page 22: Application performance management with PacketBeat

String obfuscation

• Replace: select * from users where username=“Tudor” and id=3

• With: select * from users where username=S8 and id=N3

• Makes TopN charts better

• “The Mature Optimisation Handbook” - Carlos Bueno

Page 23: Application performance management with PacketBeat

Bonito

• Our own UI

• Similar to Kibana, but focused more on app performance

• Will be a Kibana 4 plugin

Page 24: Application performance management with PacketBeat
Page 25: Application performance management with PacketBeat

Deploying PacketBeat (´ ▽`).。o♡

Page 26: Application performance management with PacketBeat

Deploying

• Getting started guide

• packetbeat-deploy

• ansible roles for Packetbeat, Elasticsearch, Logstash, Redis, Kibana

• supports multiple ES nodes or all-in-one server

• ansible-playbook -i hosts site.yml

Page 27: Application performance management with PacketBeat

Thanks! ( ゚▽゚)/

Page 28: Application performance management with PacketBeat

Keep in touch

• Twitter: @packetbeat or @tudor_g

• www: packetbeat.com

• github.com/packetbeat/packetbeat