What is Prometheus?
Prometheus is an open-source system monitoring and alerting toolkit originally built at SoundCloud. This tool’s primary function is to collect and store metrics as time series data. For example, suppose you have a running web application that is too slow. You can use Prometheus to determine the response time of a web server or the number of active connections/queries in a database.
Multi-dimensional data model with time series data identified by metric name and key/value pairs
Time series are collected using a pull model over HTTP.
PromQL (Prometheus Query Language) lets the user select and aggregate time series data in real-time.
Targets are discovered through service discovery or static configuration.
Supports multiple modes of graphing and dashboarding.
Pushing time series is supported via an intermediary gateway.
Most Prometheus components are written in Go, making them simple to build and deploy as static binaries.
How It Works
If you take a look at the diagram above, the Prometheus ecosystem consists of multiple components:
Prometheus server – scrapes and stores time series data.
Client libraries – to instrument application code.
Pushgateway – to support short-lived jobs.
Exporters – export existing metrics from third-party systems as Prometheus metrics.
Alertmanager – for handling alerts.
Prometheus is a fantastic tool for recording purely numeric time series and is appropriate for monitoring both machine-centric and highly dynamic service-oriented architectures. It also supports multi-dimensional data collection since querying is a particular strength in the microservices world.
What is Amazon Managed Service for Prometheus?
AWS has a fully managed service called Amazon Managed Service for Prometheus. It functions similarly to the open-source monitoring and alerting tool Prometheus, but the server is managed by AWS. Since this is a serverless monitoring service, you only need to focus on monitoring and creating alerts on your environments.
Here are some of its features:
No upfront fees or commitments.
Highly secure, scalable, and available.
Ingest and collect metrics from OpenTelemetry and Prometheus servers.
Supports Prometheus alerting and recording rules.
To learn more about this service, you should look at this Tutorials Dojo Prometheus cheat sheet. It is a concise summary of the AWS documentation’s features, concepts, and pricing.
Keep in mind that Prometheus is an open-source metrics-based monitoring and alerting tool. It is intended to be the system you turn to during an outage to diagnose problems quickly. Also, each Prometheus server is self-contained and not reliant on network storage or other remote services.
To visualize the metrics from your servers, you’ll need to use Grafana. And if you have workloads running in Kubernetes clusters or container-based applications, both these tools will make it easier to analyze the performance of your applications and infrastructure.