Monitoring Kubernetes with Prometheus

Monitoring Kubernetes with Prometheus

Prometheus Tokyo Meetup #1

71d7f6cdf5b1934a1b69f0624f5a7523?s=128

Aya (Igarashi) Ozawa

April 12, 2017
Tweet

Transcript

  1. Monitoring k8s Prometheus Tokyo Meetup #1 with Prometheus

  2. ABOUT ME INTRODUCTION AYA IGARASHI @Ladicle NTT Communications Software Engineer

  3. AGENDA INTRODUCTION features 02 01 03 04 Prometheus & Kubernetes

    Overview Why use Prometheus? Introduce good points Summarize k8s service discovery easy installation and powerful monitoring pros and cons
  4. Prometheus? What is

  5. What is Prometheus? OVERVIEW • OSS monitoring & alerting tool

    • Built at SoundCloud (inspired by Borgmon) • Joined the • Written in Go • Pull model Characteristics Not Fit • 100% accuracy, such as billing
  6. Architecture OVERVIEW

  7. Kubernetes? What is

  8. What is Kubernetes(k8s)? OVERVIEW • OSS management tool of container

    • Built at Google (inspired by Borg) • Joined the CNCF • Written in Go • Latest version is 1.6 (Support RBAC) Characteristics Container Runtime • Docker • rkt • frakit etc….
  9. Prometheus? Why use

  10. Why use Prometheus? Deciding factors ◦ Containers are discovered via

    service discovery ◦ Flexible query and dashboarding support ◦ Smart alerting system such as grouping OVERVIEW
  11. Architecture OVERVIEW ◦ NodeExporter ▪ VM(baremetal) ◦ BlackboxExporter ▪ HTTP/TCP/DNS

    ◦ Kube-state-metrix ▪ Kubernetes cluster
  12. k8s Service Discovery OVERVIEW • Scrape node, pod, endpoint and

    service ◦ Node: NodeExporter ◦ Pod / Endpoint: CustomExporter ◦ Service: BlackboxExporter What can it do? • Provided official prometheus chart ◦ https://github.com/kubernetes/charts/tree/master/stable/prometheus How to use it?
  13. How to use it? OVERVIEW • Prometheus Server configuration Scrape

    pods and endpoints annotations: prometheus.io/scrape: 'true' prometheus.io/port: '2379' prometheus.io/metrics: /metrics
  14. How to use it? OVERVIEW Scrape service with BlackboxExporter •

    Probe endpoints over HTTP, HTTPS, DNS, TCP and ICMP. ◦ https://github.com/prometheus/blackbox_exporter
  15. Dashboard OVERVIEW • Provided official grafana chart ◦ https://github.com/kubernetes/charts/tree/master/stable/grafana How

    to install it? • Published k8s dashboards ◦ https://grafana.com/dashboards?search=kubernetes Beautiful dashboards
  16. Summarize OVERVIEW • 日本で使っているところが少ない • BlackboxExporterがchartsに入っていない • K8s 1.6のRBACにchartsが対応していない Cons.

    Pros. • β版だが普通に動く(今後のupdateに注意) • インストール周りが整備済み • PromQLが強力 • アラートをまとめるのが楽
  17. Thanks For Watching! See you next time