SlideShare a Scribd company logo
Sensu 1.x & Kubernetes
Lee Briggs
Senior Infrastructure Engineer
22/08/2018
© 2016 Apptio, All rights reserved (v2.5)2
$(whoami)
 Based in Seattle (formerly London & Yorkshire)
 Work for Apptio
 We are hiring!
 Github:
https://github.com/jaxxstorm
 Twitter:
https://twitter.com/briggsl
 Blog:
https://www.leebriggs.co.uk
© 2016 Apptio, All rights reserved (v2.5)3
Kubernetes/Sensu Background
 Using Sensu since 2012
 Over 7000 sensu clients in dev & prod
 Running/operating Kubernetes since 2016
 Actually attempted to run k8s v1.0
 Operating multiple clusters
 Across several regions/environments/cloud providers
 Run a hybrid monitoring stack
 Prometheus for container based workloads
 Sensu for all other workloads
 Very excited about Sensu 2.0!
© 2016 Apptio, All rights reserved (v2.5)4
© 2016 Apptio, All rights reserved (v2.5)5
Target Audience
 You’re familiar with/running sensu 1.x
 You know Sensu 1.x fairly well
 You probably have a cloud footprint
 Used to ephemeral clients
 Just getting started using container based workloads
 Investigating a orchestration tool
 Strongly recommend Kubernetes!
© 2016 Apptio, All rights reserved (v2.5)6
Before I begin
 A lot of the concepts here were inspired by another talk:
 Tom Wilkie did an amazing talk at GrafanaCon EU
 https://grafana.com/blog/2018/08/02/the-red-method-how-to-instrument-your-
services/
Monitoring Models
© 2016 Apptio, All rights reserved (v2.5)8
Host Based Monitoring
 A lot of traditional monitoring systems are host based
 Nagios
 Sensu
 Zabbix
 This was fine for a long time, because most of our operational workload
was host based!
© 2016 Apptio, All rights reserved (v2.5)9
USE Method
 Popularized by Brendan Gregg:
http://www.brendangregg.com/usemethod.html
 For every resource, monitor:
 Utilization (% time that the resource was busy)
 Saturation (amount of work resource has to do, often queue length)
 Errors (count of error events)
 This can be hard to apply to some resources
 How does sensu 1.x handle this?
 You have to set arbitrary thresholds, which might not always be best
© 2016 Apptio, All rights reserved (v2.5)10
Service Based Monitoring
 The hosts running the service no longer matter
 As long as the service is healthy, we don’t care about the underlying
constructs
 With containers and many cloud platforms, this is the desired end state
 Examples:
 Prometheus
 TICK (Telegraf, InfluxDB, Kapacitor, Chronograf)
© 2016 Apptio, All rights reserved (v2.5)11
RED Method
 Popularized by Tom Wilkie himself:
 For every resource, monitor:
 Rate (the number of requests per second)
 Errors (the number of those requests that are failing)
 Duration (the amount of time those requests take)
© 2016 Apptio, All rights reserved (v2.5)12
4 Golden Rules
 From the Google SRE Book: https://landing.google.com/sre/book.html
 For each service, monitor:
 Latency (time taken to serve a request)
 Traffic (how much demand is placed on your system)
 Errors (rate of requests that are failing)
 Saturation (how “full” your service is)
Kubernetes
© 2016 Apptio, All rights reserved (v2.5)14
Kubernetes Monitoring Requirements
 Kubernetes applications require service based monitoring
 Too many ephemeral components
 Metric based monitoring is highly desirable
 Monitor on trends, not thresholds
 However, Kubernetes still needs hosts to run
 The controlplane, workers, etcd all runs on a host
 The USE method still applies here
© 2016 Apptio, All rights reserved (v2.5)15
Transitioning to Containers
 Most enterprises can’t go “all-in” with containers
 Usually you’d move some workloads to containers first
 You already have an awesome monitoring solution!
 And implementing it was a lot of work
 The hard truth is that a lot of companies use cloud providers like
traditional datacenters
 So your application(s) might not be designed for ephemeral workloads
© 2016 Apptio, All rights reserved (v2.5)16
Finding a middle ground
 Use Sensu 1.x for the more static components in your stack
 Think of the USE method
 Number of replicas is an example
 There are some tricks to make Sensu service based
 Using source attributes
 API based monitoring
 Monitor the kubernetes components that are relatively static
 # replicas
 Controlplane
 Application health
Sensu on Kubernetes
© 2016 Apptio, All rights reserved (v2.5)18
Running Sensu on Kubernetes
 Running Sensu on Kubernetes kinda makes sense
 Components:
 Redis - https://github.com/spotahome/redis-operator
 No RabbitMQ
 There’s not currently an operator for RabbitMQ
 Uncomfortable running stateful workloads without some kind of operator pattern
 You could run it outside the cluster but adds overhead
 API
 Standard Sensu Deployment
 Server
 Standard Sensu Deployment
 Client
 Daemonset
 Sidecar containers
© 2016 Apptio, All rights reserved (v2.5)19
Example Repo
 Contains:
 Deployment manifests for sensu/redis
 Example application with healthcheck monitoring
 Sock shop microservices demo
 https://github.com/jaxxstorm/sensu-on-kubernetes
 https://github.com/jaxxstorm/docker-sensu-kubernetes
Quick Demo
Going further
© 2016 Apptio, All rights reserved (v2.5)22
Extensions
 If you’re comfortable with Sensu, the journey doesn’t have to end here
 Prometheus & Sensu together: https://blog.sensuapp.org/the-sensu-prometheus-
collector-972c441d45e
 Sens8 – Sensu Operator: https://github.com/hootsuite/sens8
 Sensu 2.0! https://github.com/portertech/sensu-demo
 More in depth example of k8s & Sensu together: https://blog.sensuapp.org/our-
journey-implementing-sensu-to-monitor-kubernetes-in-production-5764aff2dd50
© 2016 Apptio, All rights reserved (v2.5)23
Summary
 Monitoring is a journey
 It moves and migrates with your infrastructure
 Sensu’s flexibility allows it to be used in a variety of hosting & monitoring
models
 Sensu 2.x continues with this flexibility
 Use existing tools as you make transitions!
THANK YOU

More Related Content

PPTX
NetflixOSS on OpenStack
PPTX
Eran Rom, IBM - Bringing Compute to Openstack Swift, OpenStack Israel 2015
PDF
Asterisk as a Virtual Network Function Part 1
PDF
OpenStack Storage Buddy Ceph
PPTX
Tacker vancouver project onboarding new
PDF
Asterisk as a Virtual Network Function Part 2
PPTX
Tacker vancouver project update
PDF
Asterisk as a Virtual Network Function Part 3
NetflixOSS on OpenStack
Eran Rom, IBM - Bringing Compute to Openstack Swift, OpenStack Israel 2015
Asterisk as a Virtual Network Function Part 1
OpenStack Storage Buddy Ceph
Tacker vancouver project onboarding new
Asterisk as a Virtual Network Function Part 2
Tacker vancouver project update
Asterisk as a Virtual Network Function Part 3

What's hot (20)

PDF
Asterisk as a Virtual Network Function Part 4
PDF
My early experience with Mirantis OpenStack 6.0
PPTX
Monitoring Weave Cloud with Prometheus
PPTX
Deploy High Availability Kubernetes with Kubespray
PPTX
Deploying Kubernetes on GCP with Kubespray
ODP
Moving PHP to the Cloud
PDF
Loki: An Opensource Zipkin/Prometheus Mashup written in Go.
PDF
Self Created Load Balancer for MTA on AWS
PDF
AWS re:Invent re:Cap 2019: My ElasticSearch Journey on AWS
PDF
Kubernetes: Managed or Not Managed?
PDF
[OpenInfra Days Korea 2018] Day 2 - E3-2: "핸즈온 워크샵: Kubespray, Helm, Armada를 ...
PDF
FaaS-and-Furious
PDF
gRPC @ Weaveworks
PPTX
REX: Cloud Native Apps on a K8S stack
PDF
Open stack monitoring with minimal effort
PDF
OpenNebulaConf2018 - Hybrid Clouds: Dancing with "Automated" Virtual Machines...
PDF
OpenStack reliability metrics
PDF
Spinnaker - Bay Area AWS Meetup - 20160726
PPTX
Shallow Dive in to Serverless Architecture
PDF
How to share a Kubernetes cluster securely through Lens spaces
Asterisk as a Virtual Network Function Part 4
My early experience with Mirantis OpenStack 6.0
Monitoring Weave Cloud with Prometheus
Deploy High Availability Kubernetes with Kubespray
Deploying Kubernetes on GCP with Kubespray
Moving PHP to the Cloud
Loki: An Opensource Zipkin/Prometheus Mashup written in Go.
Self Created Load Balancer for MTA on AWS
AWS re:Invent re:Cap 2019: My ElasticSearch Journey on AWS
Kubernetes: Managed or Not Managed?
[OpenInfra Days Korea 2018] Day 2 - E3-2: "핸즈온 워크샵: Kubespray, Helm, Armada를 ...
FaaS-and-Furious
gRPC @ Weaveworks
REX: Cloud Native Apps on a K8S stack
Open stack monitoring with minimal effort
OpenNebulaConf2018 - Hybrid Clouds: Dancing with "Automated" Virtual Machines...
OpenStack reliability metrics
Spinnaker - Bay Area AWS Meetup - 20160726
Shallow Dive in to Serverless Architecture
How to share a Kubernetes cluster securely through Lens spaces
Ad

Similar to Sensu and Kubernetes 1.x (20)

PDF
Kubernetes: My BFF
PPTX
WTF is Sensu and Monitoring
PPTX
Redis on Kubernetes
PDF
Kubernetes Architecture - beyond a black box - Part 1
PPTX
Kube cfg-mgmt
PDF
From CoreOS to Kubernetes and Concourse CI
PDF
Why kubernetes for Serverless (FaaS)
PDF
Kubernetes for Serverless - Serverless Summit 2017 - Krishna Kumar
PPTX
Kubernetes @ Squarespace (SRE Portland Meetup October 2017)
PDF
Monitoring on Kubernetes using Prometheus - Chandresh
PPTX
Monitoring on Kubernetes using prometheus
PDF
Overcoming scalability issues in your prometheus ecosystem
PPSX
Service Mesh - Observability
PDF
SRE principles and (Kubernetes) Operator practice | DevNation Tech Talk
PDF
An Introduction to Sensu by Bethany Erskine
PDF
Sensu at nycdevops Meetup
PDF
Kubernetes Architecture - beyond a black box - Part 2
PDF
Sense and Sensu-bility: Painless Metrics And Monitoring In The Cloud with Sensu
PDF
Kubernetes and CoreOS @ Athens Docker meetup
PDF
Overcoming (organizational) scalability issues in your Prometheus ecosystem
Kubernetes: My BFF
WTF is Sensu and Monitoring
Redis on Kubernetes
Kubernetes Architecture - beyond a black box - Part 1
Kube cfg-mgmt
From CoreOS to Kubernetes and Concourse CI
Why kubernetes for Serverless (FaaS)
Kubernetes for Serverless - Serverless Summit 2017 - Krishna Kumar
Kubernetes @ Squarespace (SRE Portland Meetup October 2017)
Monitoring on Kubernetes using Prometheus - Chandresh
Monitoring on Kubernetes using prometheus
Overcoming scalability issues in your prometheus ecosystem
Service Mesh - Observability
SRE principles and (Kubernetes) Operator practice | DevNation Tech Talk
An Introduction to Sensu by Bethany Erskine
Sensu at nycdevops Meetup
Kubernetes Architecture - beyond a black box - Part 2
Sense and Sensu-bility: Painless Metrics And Monitoring In The Cloud with Sensu
Kubernetes and CoreOS @ Athens Docker meetup
Overcoming (organizational) scalability issues in your Prometheus ecosystem
Ad

More from Sensu Inc. (20)

PPTX
Introducing GoAlert: a brand-new on-call scheduling and notification open sou...
PDF
Monitoring Graceful Failure
PDF
The Bonsai Asset Index : A new way for the community to share resources
PPTX
PPB's Sensu Journey
PDF
Testing and monitoring and broken things
PDF
Order from chaos: automating monitoring configuration
PDF
Keynote: Measuring the right things
PDF
Keynote: Scaling Sensu Go
PDF
Keynote: Sensu as a multi-cloud monitoring control plane
PDF
AIOps & Observability to Lead Your Digital Transformation
PDF
Ecosystem session: Sensu + Puppet
PPTX
Herding cats & catching fire: Workday's telemetry & middleware
PDF
7 Years of Sensu: Then, Now, and Soon
PPTX
Pull, don’t push: Architectures for monitoring and configuration in a microse...
PPTX
Assets in Sensu 2.0
PPTX
The Box.com success story: migrating 350K Nagios objects to Sensu
PPTX
Project 3M: Meaningful Monitoring and Messaging
PPTX
Sharing Sensu with Multiple Teams using Ansible
PPTX
Where's My Beer: Building a Better Kegerator with a Raspberry Pi & Sensu
PDF
Reimagining Sensu
Introducing GoAlert: a brand-new on-call scheduling and notification open sou...
Monitoring Graceful Failure
The Bonsai Asset Index : A new way for the community to share resources
PPB's Sensu Journey
Testing and monitoring and broken things
Order from chaos: automating monitoring configuration
Keynote: Measuring the right things
Keynote: Scaling Sensu Go
Keynote: Sensu as a multi-cloud monitoring control plane
AIOps & Observability to Lead Your Digital Transformation
Ecosystem session: Sensu + Puppet
Herding cats & catching fire: Workday's telemetry & middleware
7 Years of Sensu: Then, Now, and Soon
Pull, don’t push: Architectures for monitoring and configuration in a microse...
Assets in Sensu 2.0
The Box.com success story: migrating 350K Nagios objects to Sensu
Project 3M: Meaningful Monitoring and Messaging
Sharing Sensu with Multiple Teams using Ansible
Where's My Beer: Building a Better Kegerator with a Raspberry Pi & Sensu
Reimagining Sensu

Recently uploaded (20)

PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Accuracy of neural networks in brain wave diagnosis of schizophrenia
PPTX
Big Data Technologies - Introduction.pptx
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Getting Started with Data Integration: FME Form 101
PPTX
1. Introduction to Computer Programming.pptx
PPTX
Group 1 Presentation -Planning and Decision Making .pptx
PPTX
Machine Learning_overview_presentation.pptx
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Machine learning based COVID-19 study performance prediction
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Accuracy of neural networks in brain wave diagnosis of schizophrenia
Big Data Technologies - Introduction.pptx
The Rise and Fall of 3GPP – Time for a Sabbatical?
Network Security Unit 5.pdf for BCA BBA.
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Getting Started with Data Integration: FME Form 101
1. Introduction to Computer Programming.pptx
Group 1 Presentation -Planning and Decision Making .pptx
Machine Learning_overview_presentation.pptx
Building Integrated photovoltaic BIPV_UPV.pdf
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
20250228 LYD VKU AI Blended-Learning.pptx
Unlocking AI with Model Context Protocol (MCP)
Machine learning based COVID-19 study performance prediction
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf

Sensu and Kubernetes 1.x

  • 1. Sensu 1.x & Kubernetes Lee Briggs Senior Infrastructure Engineer 22/08/2018
  • 2. © 2016 Apptio, All rights reserved (v2.5)2 $(whoami)  Based in Seattle (formerly London & Yorkshire)  Work for Apptio  We are hiring!  Github: https://github.com/jaxxstorm  Twitter: https://twitter.com/briggsl  Blog: https://www.leebriggs.co.uk
  • 3. © 2016 Apptio, All rights reserved (v2.5)3 Kubernetes/Sensu Background  Using Sensu since 2012  Over 7000 sensu clients in dev & prod  Running/operating Kubernetes since 2016  Actually attempted to run k8s v1.0  Operating multiple clusters  Across several regions/environments/cloud providers  Run a hybrid monitoring stack  Prometheus for container based workloads  Sensu for all other workloads  Very excited about Sensu 2.0!
  • 4. © 2016 Apptio, All rights reserved (v2.5)4
  • 5. © 2016 Apptio, All rights reserved (v2.5)5 Target Audience  You’re familiar with/running sensu 1.x  You know Sensu 1.x fairly well  You probably have a cloud footprint  Used to ephemeral clients  Just getting started using container based workloads  Investigating a orchestration tool  Strongly recommend Kubernetes!
  • 6. © 2016 Apptio, All rights reserved (v2.5)6 Before I begin  A lot of the concepts here were inspired by another talk:  Tom Wilkie did an amazing talk at GrafanaCon EU  https://grafana.com/blog/2018/08/02/the-red-method-how-to-instrument-your- services/
  • 8. © 2016 Apptio, All rights reserved (v2.5)8 Host Based Monitoring  A lot of traditional monitoring systems are host based  Nagios  Sensu  Zabbix  This was fine for a long time, because most of our operational workload was host based!
  • 9. © 2016 Apptio, All rights reserved (v2.5)9 USE Method  Popularized by Brendan Gregg: http://www.brendangregg.com/usemethod.html  For every resource, monitor:  Utilization (% time that the resource was busy)  Saturation (amount of work resource has to do, often queue length)  Errors (count of error events)  This can be hard to apply to some resources  How does sensu 1.x handle this?  You have to set arbitrary thresholds, which might not always be best
  • 10. © 2016 Apptio, All rights reserved (v2.5)10 Service Based Monitoring  The hosts running the service no longer matter  As long as the service is healthy, we don’t care about the underlying constructs  With containers and many cloud platforms, this is the desired end state  Examples:  Prometheus  TICK (Telegraf, InfluxDB, Kapacitor, Chronograf)
  • 11. © 2016 Apptio, All rights reserved (v2.5)11 RED Method  Popularized by Tom Wilkie himself:  For every resource, monitor:  Rate (the number of requests per second)  Errors (the number of those requests that are failing)  Duration (the amount of time those requests take)
  • 12. © 2016 Apptio, All rights reserved (v2.5)12 4 Golden Rules  From the Google SRE Book: https://landing.google.com/sre/book.html  For each service, monitor:  Latency (time taken to serve a request)  Traffic (how much demand is placed on your system)  Errors (rate of requests that are failing)  Saturation (how “full” your service is)
  • 14. © 2016 Apptio, All rights reserved (v2.5)14 Kubernetes Monitoring Requirements  Kubernetes applications require service based monitoring  Too many ephemeral components  Metric based monitoring is highly desirable  Monitor on trends, not thresholds  However, Kubernetes still needs hosts to run  The controlplane, workers, etcd all runs on a host  The USE method still applies here
  • 15. © 2016 Apptio, All rights reserved (v2.5)15 Transitioning to Containers  Most enterprises can’t go “all-in” with containers  Usually you’d move some workloads to containers first  You already have an awesome monitoring solution!  And implementing it was a lot of work  The hard truth is that a lot of companies use cloud providers like traditional datacenters  So your application(s) might not be designed for ephemeral workloads
  • 16. © 2016 Apptio, All rights reserved (v2.5)16 Finding a middle ground  Use Sensu 1.x for the more static components in your stack  Think of the USE method  Number of replicas is an example  There are some tricks to make Sensu service based  Using source attributes  API based monitoring  Monitor the kubernetes components that are relatively static  # replicas  Controlplane  Application health
  • 18. © 2016 Apptio, All rights reserved (v2.5)18 Running Sensu on Kubernetes  Running Sensu on Kubernetes kinda makes sense  Components:  Redis - https://github.com/spotahome/redis-operator  No RabbitMQ  There’s not currently an operator for RabbitMQ  Uncomfortable running stateful workloads without some kind of operator pattern  You could run it outside the cluster but adds overhead  API  Standard Sensu Deployment  Server  Standard Sensu Deployment  Client  Daemonset  Sidecar containers
  • 19. © 2016 Apptio, All rights reserved (v2.5)19 Example Repo  Contains:  Deployment manifests for sensu/redis  Example application with healthcheck monitoring  Sock shop microservices demo  https://github.com/jaxxstorm/sensu-on-kubernetes  https://github.com/jaxxstorm/docker-sensu-kubernetes
  • 22. © 2016 Apptio, All rights reserved (v2.5)22 Extensions  If you’re comfortable with Sensu, the journey doesn’t have to end here  Prometheus & Sensu together: https://blog.sensuapp.org/the-sensu-prometheus- collector-972c441d45e  Sens8 – Sensu Operator: https://github.com/hootsuite/sens8  Sensu 2.0! https://github.com/portertech/sensu-demo  More in depth example of k8s & Sensu together: https://blog.sensuapp.org/our- journey-implementing-sensu-to-monitor-kubernetes-in-production-5764aff2dd50
  • 23. © 2016 Apptio, All rights reserved (v2.5)23 Summary  Monitoring is a journey  It moves and migrates with your infrastructure  Sensu’s flexibility allows it to be used in a variety of hosting & monitoring models  Sensu 2.x continues with this flexibility  Use existing tools as you make transitions!