monitoring, logging and tracing on kubernetes

52
#Perform2017 with Heapster, Grafana, Fluentd, Elastic Stack, Jolokia and OpenTracing Martin Etmajer @metmajer Dynatrace, Technology Lead Monitoring, Logging and Tracing on Kubernetes

Upload: martin-etmajer

Post on 21-Feb-2017

417 views

Category:

Technology


2 download

TRANSCRIPT

Page 1: Monitoring, Logging and Tracing on Kubernetes

#Perform2017

with Heapster, Grafana, Fluentd, Elastic Stack, Jolokia and OpenTracingMartin Etmajer @metmajerDynatrace, Technology Lead

Monitoring, Logging and Tracing on Kubernetes

Page 2: Monitoring, Logging and Tracing on Kubernetes
Page 3: Monitoring, Logging and Tracing on Kubernetes

Wolfgang Amadeus Mozart1756 – 1791

Page 4: Monitoring, Logging and Tracing on Kubernetes

The „Jay Z“ of classical music

Page 5: Monitoring, Logging and Tracing on Kubernetes

Mike Grabner

Page 6: Monitoring, Logging and Tracing on Kubernetes

Schwarzenegger

Page 7: Monitoring, Logging and Tracing on Kubernetes

Schnitzel

Page 8: Monitoring, Logging and Tracing on Kubernetes

#Perform20178

Monitoringwith Kubernetes Dashboard, Heapster, influxdb & Grafana

Page 10: Monitoring, Logging and Tracing on Kubernetes

$ git clone https://github.com/kubernetes/dashboard.git$ kubectl create –f src/deploy/kubernetes-dashboard.yaml

Example: Deploy Kubernetes Dashboardlikely to be present in your kube-system already

Page 14: Monitoring, Logging and Tracing on Kubernetes

collects resources usage, etc.

exposedvia REST

Page 15: Monitoring, Logging and Tracing on Kubernetes

Heapster

heapster

runs in a Pod

Page 16: Monitoring, Logging and Tracing on Kubernetes

heapster

Heapster

source

Kubernetes

REST client

sinks

influxdb

GCL

kafkaelasticsearch

GCM

graphite

KubernetesDashboard

via built-in client

REST API

Page 17: Monitoring, Logging and Tracing on Kubernetes

heapster

Example: Heapster (standalone)

source

Kubernetes

REST client

sinks

influxdb

GCL

kafkaelasticsearch

GCM

graphite

KubernetesDashboard

via built-in client

REST API

Page 19: Monitoring, Logging and Tracing on Kubernetes

Example: Deploy Heapster (standalone)

$ git clone https://github.com/kubernetes/heapster.git$ kubectl create –f heapster/deploy/kube-config/standalone/

Page 20: Monitoring, Logging and Tracing on Kubernetes

heapster

Example: Heapster (with influxdb and Grafana)

source

Kubernetes

REST client

sinks

influxdb grafana

KubernetesDashboard

via built-in client

REST API

query

Page 22: Monitoring, Logging and Tracing on Kubernetes

Example: Deploy Heapster (with influxdb and Grafana)

$ git clone https://github.com/kubernetes/heapster.git$ kubectl create –f heapster/deploy/kube-config/influxdb/

Page 23: Monitoring, Logging and Tracing on Kubernetes

#Perform201723

Loggingwith Fluentd and Elastic Stack

Page 24: Monitoring, Logging and Tracing on Kubernetes

continuous stream of log data for each container

Page 25: Monitoring, Logging and Tracing on Kubernetes

unified logging

Page 27: Monitoring, Logging and Tracing on Kubernetes

Fluentd

runs oneach host

Page 28: Monitoring, Logging and Tracing on Kubernetes

Example: Fluentd (for container logs to elasticsearch)

watch container logs

elasticsearch kibana

queryingestvia configuration

Page 30: Monitoring, Logging and Tracing on Kubernetes

Example: Deploy Fluentd (for container logs to elasticsearch)

$ git clone https://github.com/kubernetes/kubernetes.git$ kubectl create –f kubernetes/cluster/addons/fluentd-elasticsearch/

Page 31: Monitoring, Logging and Tracing on Kubernetes

#Perform201731

Monitoringwith Jolokia

Page 32: Monitoring, Logging and Tracing on Kubernetes

remote access to JMX MBeans

Page 33: Monitoring, Logging and Tracing on Kubernetes

remote access to JMX MBeans

exposed via REST

Page 34: Monitoring, Logging and Tracing on Kubernetes

Java Management Extensions (JMX)to manage and monitor applications

Source: https://en.wikipedia.org/wiki/Java_Management_Extensions

DynamicMBean MXBeanStandard

MBeanInstrumentationLevel

instrument resources

MBeanServerAgent Level

agent for registered MBeans

Connectors Adaptors

RemoteManagementLevel

provides access to MBeanServerRMI, HTTP/SOAP HTML, SNMP

Page 35: Monitoring, Logging and Tracing on Kubernetes

Example: Jolokia (get list of accessible MBeans)

$ curl http://localhost:8080/jolokia/list

includes memory, threading, gc, etc.

Page 36: Monitoring, Logging and Tracing on Kubernetes

Example: Jolokia (read memory usage data)

$ curl http://localhost:8080/jolokia/read/java.lang:type=Memory

name of MBean

Page 37: Monitoring, Logging and Tracing on Kubernetes

Example: Jolokia (read threading data)

$ curl http://localhost:8080/jolokia/read/java.lang:type=Threading

name of MBean

Page 38: Monitoring, Logging and Tracing on Kubernetes

#Perform201738

Tracingwith OpenTracing

Page 39: Monitoring, Logging and Tracing on Kubernetes

a formally specified standard API for reporting

with various API implementations

Page 42: Monitoring, Logging and Tracing on Kubernetes

Why distributed (end-to-end) tracing?

Source: https://research.google.com/pubs/pub36356.html

initiator

servicesremote calls

Page 43: Monitoring, Logging and Tracing on Kubernetes

Why distributed (end-to-end) tracing?

Source: https://research.google.com/pubs/pub36356.html

initiator

servicesremote calls

What does the architecture look like?

Page 44: Monitoring, Logging and Tracing on Kubernetes

Why distributed (end-to-end) tracing?

Source: https://research.google.com/pubs/pub36356.html

initiator

servicesremote calls

Where is most of the time spent?

Page 45: Monitoring, Logging and Tracing on Kubernetes

Why distributed (end-to-end) tracing?

Source: https://research.google.com/pubs/pub36356.html

initiator

servicesremote calls

How are services invoked?

Page 46: Monitoring, Logging and Tracing on Kubernetes

Why distributed (end-to-end) tracing?

Source: https://research.google.com/pubs/pub36356.html

initiator

servicesremote calls

Which services aren’t invoked?

Page 47: Monitoring, Logging and Tracing on Kubernetes
Page 48: Monitoring, Logging and Tracing on Kubernetes

#Perform201748

...and else?

Page 49: Monitoring, Logging and Tracing on Kubernetes
Page 50: Monitoring, Logging and Tracing on Kubernetes
Page 51: Monitoring, Logging and Tracing on Kubernetes
Page 52: Monitoring, Logging and Tracing on Kubernetes

Thank you.