Introduction to Prometheus
In Chapter 11, we mentioned a popular open source alerting and monitoring tool called Prometheus that can collect service metrics and set up automated alerts based on the metric data. In this section, we will demonstrate how to use Prometheus to set up alerts for our microservices.
Let’s summarize our learning about Prometheus from Chapter 11:
- Prometheus allows us to collect and store service metrics in the form of a time series.
- There are three types of metrics – counters, histograms, and gauges.
- To query metrics data, Prometheus offers a query language called PromQL.
- Service alerts can be configured using a tool called Alertmanager.
Metrics can be imported from service instances into Prometheus in two different ways:
- Scraping: Prometheus reads metrics from service instances.
- Pushing: The service instance sends metrics to Prometheus using a dedicated service, the Prometheus Pushgateway.
Scraping...