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
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
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….
Why use Prometheus? Deciding factors ○ Containers are discovered via service discovery ○ Flexible query and dashboarding support ○ Smart alerting system such as grouping OVERVIEW
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?
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
How to use it? OVERVIEW Scrape service with BlackboxExporter ● Probe endpoints over HTTP, HTTPS, DNS, TCP and ICMP. ○ https://github.com/prometheus/blackbox_exporter