https://hackmd.io/@ponsfrilus/prometheus
Toutes les photos viennent du site https://unsplash.com (libre de droits)
Prometheus is a metrics collection and alerting tool developed and released to open source by SoundCloud. Prometheus is similar in design to Google's Borgmon monitoring system. Properly tuned and deployed, a Prometheus cluster can collect millions of metrics every second. Source: https://www.redhat.com/sysadmin/introduction-prometheus-metrics-and-performance-monitoring
Prometheus fundamentally stores all data as time series: streams of timestamped values belonging to the same metric and the same set of labeled dimensions. Source: https://prometheus.io/docs/concepts/data_model/
Every time series is uniquely identified by its metric name and optional key-value pairs called labels. Source: https://prometheus.io/docs/concepts/data_model/
A counter is a cumulative metric that represents a single monotonically increasing counter whose value can only increase or be reset to zero on restart.
A gauge is a metric that represents a single numerical value that can arbitrarily go up and down.
A histogram samples observations and counts them in configurable buckets. It also provides a sum of all observed values.
Similar to a histogram, a summary samples observations.
Labels enable Prometheus's dimensional data model: any given combination of labels for the same metric name identifies a particular dimensional instantiation of that metric.
See also the best practices for naming metrics and labels.
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"}
The query language allows filtering and aggregation based on these dimensions.
Changing any label value, including adding or removing a label, will create a new time series.
Federation allows a Prometheus server to scrape selected time series from another Prometheus server.
Source: https://prometheus.io/docs/prometheus/latest/federation/
The Pushgateway is an intermediary service which allows you to push metrics from jobs which cannot be scraped. https://prometheus.io/docs/practices/pushing/#when-to-use-the-pushgateway
→ détails
https://github.com/prometheus-operator/prometheus-operator
The Prometheus Operator uses Kubernetes custom resources to simplify the deployment and configuration of Prometheus, Alertmanager, and related monitoring components.
https://github.com/prometheus-operator/kube-prometheus
kube-prometheus provides example configurations for a complete cluster monitoring stack based on Prometheus and the Prometheus Operator.
https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack
The prometheus-community/kube-prometheus-stack helm chart provides a similar feature set to kube-prometheus. This chart is maintained by the Prometheus community.
Un petit projet ayant pour but de déployer prometheus, grafana et un node-exporter avec docker. Fait pour hacker et comprendre. Parfait sur un laptop.
Encore une question ? Un point à disctuer ? Nicolas Borboën <nicolas.borboen@epfl.ch>