Top Banner
Monitoring microservices: Docker, Mesos and Kubernetes visibility at scale
39

Monitoring microservices: Docker, Mesos and Kubernetes visibility at scale

Jan 06, 2017

Download

Software

Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Monitoring microservices: Docker, Mesos and Kubernetes visibility at scale

Monitoring microservices: Docker, Mesos and

Kubernetes visibility at scale

Page 2: Monitoring microservices: Docker, Mesos and Kubernetes visibility at scale

Me

Alessandro Gallotta Software Engineer @sysdig

@alex_gallotta

@sysdig

Page 3: Monitoring microservices: Docker, Mesos and Kubernetes visibility at scale

Introducing Sysdig

• Capture system events, filter them, run useful scripts • Lua scripting • Open Source • Nice curses UI

lsof

nets

tat

tcpd

ump

htopps

stra

ce

Page 4: Monitoring microservices: Docker, Mesos and Kubernetes visibility at scale

and more

• track user activity • top files/processes/connections by • cpu • bytes • …

• logs • containers • tracers • you name it, we track it

Page 5: Monitoring microservices: Docker, Mesos and Kubernetes visibility at scale

Design Goals

• Production-ready • Simple • lightweight

• Rich data • Natural workflow • Native support for containers • Native support for and more…

Page 6: Monitoring microservices: Docker, Mesos and Kubernetes visibility at scale

Demo time

Page 7: Monitoring microservices: Docker, Mesos and Kubernetes visibility at scale

Containers are Great…

• Simple • Scalable • Isolated • Service-oriented • Elastic • Flexible • Separation of concerns

Page 8: Monitoring microservices: Docker, Mesos and Kubernetes visibility at scale

But Some Things Are Becoming More Complex

CacheWebserverDatabase

Legacy Monolitic App

Page 9: Monitoring microservices: Docker, Mesos and Kubernetes visibility at scale

But Some Things Are Becoming More Complex

Computing Node

Computing Node

Computing Node

Service1Service2Service3

Computing Node

Computing Node

Computing Node

Container-based App

Page 10: Monitoring microservices: Docker, Mesos and Kubernetes visibility at scale

But Some Things Are Becoming More Complex

Computing Node

Computing Node

Computing Node

Computing Node

Computing Node

Computing Node

Container-based App

Service1Service2Service3

Page 11: Monitoring microservices: Docker, Mesos and Kubernetes visibility at scale

But Things Are Becoming More ComplexComputing Node

Computing Node

Computing Node

Service1Service2Service3

Computing Node

Computing Node

Computing Node

Container-based App

Two Problems

Page 12: Monitoring microservices: Docker, Mesos and Kubernetes visibility at scale

Problem #1: How Do We Get Data Out of These Guys?

Computing Node

Computing Node

Computing Node

Service1Service2Service3

Computing Node

Computing Node

Computing Node

Container-based App

• System • Network • Process • JVM • Response Time • Requests • Errors

Page 13: Monitoring microservices: Docker, Mesos and Kubernetes visibility at scale

Problem #2: How Do We Get Make Sense of the Data?

Computing Node

Computing Node

Computing Node

Service1Service2Service3

Computing Node

Computing Node

Computing Node

Container-based App

Page 14: Monitoring microservices: Docker, Mesos and Kubernetes visibility at scale

Complexity Calls for Great Monitoring

• Isolated •Automated •Orchestration-aware • Simple • Scalable

Page 15: Monitoring microservices: Docker, Mesos and Kubernetes visibility at scale

The Orchestrated Version of This

Page 16: Monitoring microservices: Docker, Mesos and Kubernetes visibility at scale

Complexity Also Calls for Great Troubleshooting

What‘s the network activity of my

Marathon group?

What’s using the CPU the Wordpress

task?

How the hell does my Mesos task

work?!

Where’s the bottleneck?What’s the response

time of my login service?

What transactions is my Redis service serving?

Page 17: Monitoring microservices: Docker, Mesos and Kubernetes visibility at scale

Hypervisor

How Do I Get Data Out of These Things: VMs

VM1 VM3 VM2

Page 18: Monitoring microservices: Docker, Mesos and Kubernetes visibility at scale

Hypervisor

Monitoring VMs, Option 1

VM1 VM3 VM2

Hypervisor-level instrumentation, Amazon CloudWatch

Page 19: Monitoring microservices: Docker, Mesos and Kubernetes visibility at scale

Hypervisor

Monitoring VMs, Option 2

VM1 VM3 VM2

Monitoring Agent

Page 20: Monitoring microservices: Docker, Mesos and Kubernetes visibility at scale

OS

Monitoring Containers

Container1 Container3 Container2

Page 21: Monitoring microservices: Docker, Mesos and Kubernetes visibility at scale

OS

Monitoring Containers, Option 1

Container1 Container3 Container2

Monitoring Agent

Page 22: Monitoring microservices: Docker, Mesos and Kubernetes visibility at scale

OS

Monitoring Containers, Option 1

Container1 Container3 Container2

Monitoring Agent

• Not scalable • Not composable • Adds dependencies/size • Kills the concept of one process per container

Page 23: Monitoring microservices: Docker, Mesos and Kubernetes visibility at scale

OS

Monitoring Containers, Option 2

Container1 Container3 Container2

Container runtime – level monitoring Kernel-level instrumentation

Page 24: Monitoring microservices: Docker, Mesos and Kubernetes visibility at scale

OS

Monitoring Containers, Option 3

Container1 Monitoring Container

Container2

Page 25: Monitoring microservices: Docker, Mesos and Kubernetes visibility at scale

Sysdig Data Collection

Kernel

Container1

Docker

Container2

Docker

Container3

LXCAppApp

Page 26: Monitoring microservices: Docker, Mesos and Kubernetes visibility at scale

Sysdig Data Collection

Kernel

Container1

Docker

Container2

Docker

Container3

LXCAppApp

Instrumentation through kernel module

Page 27: Monitoring microservices: Docker, Mesos and Kubernetes visibility at scale

Sysdig Data Collection

Kernel

Container1

Docker

Container2

Docker

Container3

LXCAppApp

sysdig

Docker

Capture and analysis

Page 28: Monitoring microservices: Docker, Mesos and Kubernetes visibility at scale

Sky cloud is the limit

• Correlate data • Scale with your infrastructure • Alerts, notifications, visualization tools • Continuous data collection and retention from production systems

Page 29: Monitoring microservices: Docker, Mesos and Kubernetes visibility at scale

Sysdig Cloud

• Sysdig evolution for the cloud • Preserve the premises • production ready • natural workflow • ease of use • 0 to low config needed

Page 30: Monitoring microservices: Docker, Mesos and Kubernetes visibility at scale

Out of the box support

Page 31: Monitoring microservices: Docker, Mesos and Kubernetes visibility at scale

Demo time 2

Page 32: Monitoring microservices: Docker, Mesos and Kubernetes visibility at scale

How About Security?

Did someone log into one of our containers?

Has something been installed in

one of the containers?

Have we been hacked?Were configuration files

changed?

Page 33: Monitoring microservices: Docker, Mesos and Kubernetes visibility at scale

How About Security?

Did someone log into one of our containers?

Have we been hacked?Were configuration files

changed?

Has something been installed in

one of the containers?

Page 34: Monitoring microservices: Docker, Mesos and Kubernetes visibility at scale

An anomaly detection system built on top of the sysdig engine

Page 35: Monitoring microservices: Docker, Mesos and Kubernetes visibility at scale

Falco Architecture

Kernel

Container1

Docker

Container2

rkt

Container3

LXCAppApp

Rule system

Docker

• File activity • Network Activity • User Activity • Process execution • IPC • …

Page 36: Monitoring microservices: Docker, Mesos and Kubernetes visibility at scale

Rules Examples

rule: shell_in_container desc: a shell running in a container condition: container.id != host and proc.name = bash output: “Shell running in container (user=%user.name container_id=%container.id container_name=%container.name shell=%proc.name parent=%proc.pname)” priority: WARNING

Page 37: Monitoring microservices: Docker, Mesos and Kubernetes visibility at scale

Rules Examples

rule: mysqld_spawn_process desc: mysqld spawning a new process after startup. condition: spawn_process and proc.name = mysqld and not proc_is_new output: “mysqld spawned new process after startup (user=%user.name command=%proc.cmdline file=%fd.name)” priority: WARNING

Page 38: Monitoring microservices: Docker, Mesos and Kubernetes visibility at scale

Rules Examples

macro: open_connection condition: syscall.type=connect and evt.dir=< and fd.sockfamily =ip

rule: system_binaries_network_activity desc: any network connection initiated by system binaries that are not expected to send or receive any network traffic condition: open_connection and proc.name in (ls, ps, mkdir, … ) output: Known system binary made network connection (user=%user.name command=%proc.cmdline connection=%fd.name) priority: WARNING"

Page 39: Monitoring microservices: Docker, Mesos and Kubernetes visibility at scale

Thank You!www.sysdig.org

www.sysdig.org/falco

@alex_gallotta

@sysdig

github.com/draios

www.sysdig.com