This document discusses using Prometheus for open infrastructure and cloud monitoring. It introduces Prometheus as a time series database and monitoring tool. Key features covered include metrics collection, service discovery, graphing, and alerting. The architecture of Prometheus is explained, including scrapping metrics directly or via exporters. A demo of Prometheus and Grafana is proposed to monitor Kubernetes clusters and visualize CPU usage. Alerting configuration and routes in Prometheus and Alertmanager are also summarized.
13. 시계열 데이터 저장/처리에 최적화 Database
Metric Data
Example
• H/W Metric
• OS Metric
• VM/Container Metric
• Platform Metric
• Application Metric
Time Series
Database
• High write Performance
• Quick to process
• Easy Range Query
• Data Compaction
• Cost Efficient
14. 공통적인 특징을 요약하자면...
• Metric Storage (InfluxDB, Prometheus, OpenTSDB, Graphite …)
• Metric 수집을 위한 API 및 Interface 제공
• Metric 조회를 Query SQL / Web 관리 UI 제공
15. ‘Time + Counter’
Metric vs LOG
• Individual events
• Shaping before processing
• higher I/O and network requirements
• Scaling can be costly
• Great for Deep-dive and drill down
to individual events
‘Time + events’
• No shaping and Easy aggregation
• Quick to process & visualize
• Cost Efficient
• Great for Abnormal detection, trending
16. Metric vs LOG (Apache Access Log)
Method Path Code Response time
GET /foo 200 1234
POST /endpoint 500 299
GET /foo 200 399
GET /foo 200 273
GET /foo 200 101
POST /endpoint 500 300
GET /foo 200 450
GET /foo 200 2327
Requests
true
true
flase
true
true
true
true
true
Logs
Browser info
GET : 6 /foo: 6 200: 6 response_sum : 4784 response_count : 6 mobile : 5
POST: 2 /endpoint : 1 500: 1 response_sum : 599 response_count : 2 mobile : 2
Metrics
Requests
19. What is Prometheus
• Time-series database
• Metrics collection
• Service Discovery
• Graphing
• Alerting
Features
• Millions of Time series
• Thousands of targets
Performance
21. Prometheus Architecture
Prometheus
Server
+
Local Storage
Email
Slack
…
Alertmanager Hipchat
Webhook
push
Alert
Service Discovery
DNS, File
Kubernetes
Openstack
EC2, GCE, Azure
② Dynamic
Target
① Discover Target
Application A
(/metrics)
MySQL
Kafka
Pushgateway
Jobs
mysql
exporter
kafka_exporter
Metric Push
Web UI
Grafana
API Clients
Prom Query
Static Target
41. • CloudFoundry 기반 Prometheus Monitoring
https://github.com/PaaS-TA-Incubator/OpenPaaS-OWL
PaaS-TA Monitoring 적용 및 기여
42. • Kubernetes Cluster 별 Prometheus 배포/관리 수행
• Monitoring 통합 운영 준비
Cluster A Cluster B Cluster C
Global Prometheus Global Prometheus
Prometheus Federation
43. Exporter 확대
• Metric 확장 및 Monitoring 대상 추가
(Mysql, Postgres, Redis, ElasticSearch, BlackBox Exporter)
44. Alertmanager 기능 강화
• Kubernetes Alert 설정/관리 기능 제공
• Alert History 기능
Bosh exporter