Prometheus 101

Prometheus 101

On this talk I gave a basic introduction to Prometheus and how can we use it to monitor our services.

I presented this talk both on TDC 2019 and on Tchê Linux 2019.

6f3efd5477238ca18957c723854ec795?s=128

Sebastian Webber

December 14, 2019
Tweet

Transcript

  1. Prometheus 101 Sebastian Webber

  2. $ whoami • Consultant @timbira • Senior DB Engineer @caremessage

    • Student @bujinkan
  3. http://bit.ly/cfp-dod-poa

  4. Prometheus https://prometheus.io/

  5. Service discovery • Azure VMs • Consul • DNS •

    AWS EC2 Instances • OpenStack Nova instances • Files • GCP GCE Instances • Kuberentes nodes, services, pods, endpoints, and ingresses • Marathon • Nerve • … and others What is Prometheus? Database It’s a time series database. API All integrations are done by the REST API WEB UI It contains an ugly, but useful interface to check the configuration and debug PROMQL queries. Scraper service Prometheus uses jobs to connect on the services that exports relevant data. All of this inside only one executable file…
  6. Prometheus points to lots of exporters to get the data

  7. None
  8. how do the exporters work? http://host:port/metrics https://prometheus.io/docs/instrumenting/clientlibs/

  9. and the metrics? Given a metric name and a set

    of labels, time series are frequently identified using this notation: <metric name>{<label name>=<label value>, ...} For example, a time series with the metric name api_http_requests_total and the labels method="POST" and handler="/messages" could be written like this: api_http_requests_total{method="POST", handler="/messages"} This is the same notation that OpenTSDB uses. https://prometheus.io/docs/concepts/data_model/
  10. Data types Summary Histogram Gauge Counter https://prometheus.io/docs/concepts/metric_types

  11. demo https://github.com/sebastianwebber/lab-prom-101

  12. wait.. there is more!

  13. None
  14. about grafana

  15. None
  16. None