Introduction Prometheus

Introduction Prometheus

This slide was presented at "CloudNative Days Tokyo Meetup w/ Melanie Cebula" held on July 20, 2019.
It's 5 minutes Lightning Talks.

CloudNative Days Tokyo Meetup w/ Melanie Cebula - connpass
https://wantedly.connpass.com/event/135968/

Dcea5102277e5883c29e0b15e51ae1bd?s=128

kameneko

July 23, 2019
Tweet

Transcript

  1. Introduction Prometheus Takuma Nakagame, SAKURA internet Inc.

  2. Takuma Nakagame @kameneko1004 • SAKURA internet Inc. ◦ Cloud Service

    Provider • IT infrastructure engineer • Evangelist • LIKE ◦ Prometheus ◦ FreeNAS
  3. What is Prometheus?

  4. What is Prometheus? • A Monitoring system developed by the

    engineers of SoundCloud • Recording real-time metrics in a time series database build using a Pull model • Automatic discovery of their targets by ServiceDiscovery • Written in Golang
  5. Dream Hack Monitoring with Prometheus • 10,000 computers • 500

    swtiches Monitoring DreamHack - The World's Largest Digital Festival | PromCon 2016 https://promcon.io/2016-berlin/talks/monitoring-dreamhack-the-worlds-largest-digital-festival/
  6. Prometheus Architecture

  7. None
  8. What ?

  9. The minimum essential componets to use Prometheus

  10. • Prometheus Server • Exporter • Service Discovery • PromQL

  11. • Collecting the metrics from its targes • Filtering its

    metrics by PromQL ◦ WebGUI • Crating Alerts Prometheus Server
  12. Exporter • Monitoring Agent • Expanding its metrics by HTTP

    and periodically pull these to show • So-called Web server for just hitting API
  13. Exporter Exporters by their targets • Server : NodeExporter •

    MySQL : MySQL Server Exporter • Nginx : NGINX Exporter • Apache : Apache Exporter • and more!
  14. Service Discovery Automatic target discovery • Kubernetes • AWS EC2

    • GCP GCE • OpenStack • Azure
  15. PromQL • Prometheus Query Language • Filtering metrics • Defining

    Alert • WebGUI • API • Grafana
  16. An Example of PromQL http_requests_total Total number of requests in

    http http_requests_total{pod_name=”nginx1”} Total number of requests of POD ‘nginx1’ in http sum(http_requests_total) Sum of total requests in http
  17. Run Prometheus

  18. Run Prometheus Step 1. Binary download 2. Unarchive 3. Run!

  19. Download Binary https://github.com/prometheus/prometheus/releases $ wget https://github.com/prometheus/prometheus/releases/download/v2.11.1/prometheus-2.11.1.linux-amd64.tar.gz

  20. Unarchive $ tar -xvf prometheus-2.9.2.linux-amd64.tar.gz

  21. Run $ cd prometheus-2.9.2.linux-amd64/ $ ./prometheus

  22. Run $ cd prometheus-2.9.2.linux-amd64/ $ ./prometheus FINISH!

  23. Takeaways

  24. 3 Takeaways • Automatic target discovery • Plenty of Exporters

    • Simple