Upgrade to Pro — share decks privately, control downloads, hide ads and more …

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/

kameneko

July 23, 2019
Tweet

More Decks by kameneko

Other Decks in Technology

Transcript

  1. Introduction Prometheus
    Takuma Nakagame, SAKURA internet Inc.

    View full-size slide

  2. Takuma Nakagame
    @kameneko1004
    ● SAKURA internet Inc.
    ○ Cloud Service Provider
    ● IT infrastructure engineer
    ● Evangelist
    ● LIKE
    ○ Prometheus
    ○ FreeNAS

    View full-size slide

  3. What is Prometheus?

    View full-size slide

  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

    View full-size slide

  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/

    View full-size slide

  6. Prometheus Architecture

    View full-size slide

  7. The minimum essential componets to
    use Prometheus

    View full-size slide

  8. ● Prometheus Server
    ● Exporter
    ● Service Discovery
    ● PromQL

    View full-size slide

  9. ● Collecting the metrics from its targes
    ● Filtering its metrics by PromQL
    ○ WebGUI
    ● Crating Alerts
    Prometheus Server

    View full-size slide

  10. Exporter
    ● Monitoring Agent
    ● Expanding its metrics by HTTP and
    periodically pull these to show
    ● So-called Web server for just hitting
    API

    View full-size slide

  11. Exporter
    Exporters by their targets
    ● Server : NodeExporter
    ● MySQL : MySQL Server Exporter
    ● Nginx : NGINX Exporter
    ● Apache : Apache Exporter
    ● and more!

    View full-size slide

  12. Service Discovery
    Automatic target discovery
    ● Kubernetes
    ● AWS EC2
    ● GCP GCE
    ● OpenStack
    ● Azure

    View full-size slide

  13. PromQL
    ● Prometheus Query Language
    ● Filtering metrics
    ● Defining Alert
    ● WebGUI
    ● API
    ● Grafana

    View full-size slide

  14. 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

    View full-size slide

  15. Run Prometheus

    View full-size slide

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

    View full-size slide

  17. 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

    View full-size slide

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

    View full-size slide

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

    View full-size slide

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

    View full-size slide

  21. 3 Takeaways
    ● Automatic target discovery
    ● Plenty of Exporters
    ● Simple

    View full-size slide