07 November 2020

#Prometheus

#Prometheus
What is Prometheus? Features? Architecture? Components?
What is an Alert?
What is Prometheus server
What is Push Gateway
What is Alert Manager
What is data model.
What is counters and gauges.
What is an Instance? What is a Job?
What core metrics types Prometheus supports?
What is an exporter? What is it used for?
What is Traffic?
What is Error rate?
What is Latency?
How to get total requests in a given period of time?
How do you join two metrics? Histograms? Summaries?
How to write a query that returns the value of a label?
How do you convert cpu_user_seconds to cpu usage in percentage?
Can you compare Prometheus to other solutions like InfluxDB for example?
Prometheus
  • Prometheus is an Open-source monitoring and alerting toolkit for capturing metrics.
  • It includes a Time-series DB
  • It is implemented in Go
  • Prometheus was inspired by Google's Borgmon and built at SoundCloud
  • Specify a random list of labels for multi-dimensionality.
  • Store data as metrics that can be queried.
  • Easily build queries using time-series functions found in its native PromQL.
  • Generate and deliver threshold-based alerts through its Alertmanager.
  • Several dashboards and graphing modes support
  • Representation of time series assemblage from any pull model on HTTP
  • Multidimensional data model presenting time series data, i.e., recognized with the name of the metric or with KVP (Key-value pairs)
  • Capability to apply PromQL for supporting the multidimensionality feature of a data model
  • Zero reliance over distributed storage and autonomous individual server nodes
  • Target discovery from service discovery or static configuration
  • Capability to manage time series from any intermediary gateway
Components
  • Time-series DB to store metric data
  • Data retrieval worker to pull metric data
  • HTTP Server to accept PromQL queries
  • Alertmanager
  • Prometheus Web UI, Grafana, or other visualization tools
Functions
  • Scrapes data
  • Stores data
  • Allows querying, graphing, and alerting
  • Provides endpoints to other API consumers like Grafana
Prometheus metric types
  • Counter - how many times something happened
  • Gauge - current value of a metric
  • Histogram - how long or how large
Features
  • Federation
  • Tags
  • PromQL
  • Exemplars
  • Pull-based data collection
  • White-box and black-box monitoring
  • Has a LOT of exporters
  • Works well with k8s
  • Works well with k6
PromQL
  • It enables users to aggregate and select data. Specifically, PromQL is adjusted for working in assemblage with the Time-Series database.
  • Prometheus contains four types of metrics which are listed below:
    • Gauge
    • Counter
    • Summary
    • Histogram
  • Apply gauges for times-series metrics, i.e., straightforward.
  • Apply counters for many things we know for increasing monotonically. For example, if we are counting time numbers something happens.
  • Apply histogram for measurements of latency using general buckets. For example, a single bucket for "over SLO" and another for "under SLO".

No comments:

Post a Comment

Most views on this month