Selfnotes-prometheus

What is Time Series database?

time series database stores data as pairs of time(s) and value(s). By storing data in this way, it makes it easy to analyze time series, or a sequence of points recorded in order over time.

How prometheus is good for time series metrix?

No extensive set up needed. Allows fast outage discovery. Outages can be very quickly discovered when the system fails to get requests from known monitoring sources. Provides a functional query language, PromQL, that allows us to select and aggregate time-series data in real-time.

What are components of prometheus?

1.Exporters : Exporters enable you to collect data from services and components that you cannot add direct instrumentation to because you do not have code access—for example, databases, OS kernels, routers, or cloud resources

2.Service discovery : Prometheus enables us to both statically configure metrics targets and to locate targets dynamically through service-discovery mechanisms.

3.Scraping : In Prometheus, scraping is the actual process of collecting metrics from endpoints. This is accomplished when Prometheus’ data retrieval worker sends a scrape request via HTTP.

4.Storage : Prometheus includes persistent storage on a local, on-disk time-series database. You can also integrate it with remote storage via remote read/write APIs.

How prometheus works?

It stores all scraped samples locally and runs rules over this data to either aggregate and record new time series from existing data or generate alerts.