Skip to content
40 changes: 40 additions & 0 deletions observability/tools/Prometheus.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Prometheus

## Overview

Originally built at SoundCloud, [Prometheus](https://prometheus.io/docs/introduction/overview/) is an open-source monitoring and alerting toolkit based on time series metrics data. It has become a de facto standard metrics solution in the Cloud Native world and widely used with Kubernetes.

The core of Prometheus is a server that scrapes and stores metrics. There are other numerous optional features and components like an Alert-manager and [client libraries](https://prometheus.io/docs/instrumenting/clientlibs/) for programming languages to extend the functionalities of Prometheus beyond the basics.
The client libraries offer four [metric types](https://prometheus.io/docs/concepts/metric_types/): `Counter`, `Gauge`, `Histogram`, and `Summary`.

## Why Prometheus?

- Prometheus is a time series database and allow for events or measurements to be tracked, monitored, and aggregated over time.
- Prometheus is a pull-based tool. One of the biggest advantages of Prometheus over other monitoring tools is that Prometheus actively scrapes targets in order to retrieve metrics from them. Prometheus also supports the push model for pushing metrics.
- Prometheus allows for control over who to scrape, and how often to scrape them. Through the Prometheus server, there can be multiple scrape configurations, allowing for multiple rates for different targets.
- Similar to [Grafana](https://prometheus.io/docs/visualization/grafana/), visualization for the time series can be directly done through the Prometheus Web UI. The Web UI provides the ability to easily filter and have an overview of what is taking place with your different targets.
- Prometheus provides a powerful functional query language called PromQL (Prometheus Query Language) that lets the user aggregate time series data in real time.

## Integration with Other Tools
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: The tools specified here are all analysis tools. There are tools that utilize the Prometheus data natively to automate aspects of operating environments and/or k8s clusters. An example is using Flagger w/ Istio to automate blue/green deployments based on live telemetry from Prometheus.

I've made this a nit, since it can be done in another PR.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I included this link which has an extensive list of tools and services Prometheus integrates with. Is that enough?


The Prometheus client libraries allow you to add instrumentation to your code and expose internal metrics via an HTTP endpoint. The official [Prometheus client libraries](https://prometheus.io/docs/instrumenting/clientlibs/) currently are `Go`, `Java or Scala`, `Python` and `Ruby`. Unofficial third-party libraries include: `.NET/C#`, `Node.js`, and `C++`.

Prometheus metrics format is supported by a wide array of tools and services including:

- [Azure Monitor](https://docs.microsoft.com/en-us/azure/azure-monitor/containers/container-insights-prometheus-integration)
- [Stackdriver](https://cloud.google.com/stackdriver/docs/solutions/gke/prometheus)
- [Datadog](https://docs.datadoghq.com/integrations/prometheus/)
- [CloudWatch](https://aws.amazon.com/blogs/containers/using-prometheus-metrics-in-amazon-cloudwatch/)
- [New Relic](https://docs.newrelic.com/docs/integrations/prometheus-integrations/get-started/send-prometheus-metric-data-new-relic/)
- [Flagger](https://docs.flagger.app/tutorials/prometheus-operator)
- [Grafana](https://grafana.com/docs/grafana/latest/getting-started/getting-started-prometheus/)
- [GitLab](https://docs.gitlab.com/ee/user/project/integrations/prometheus.html)
- [etc...](https://prometheus.io/docs/operating/integrations/)

There are numerous [exporters](https://prometheus.io/docs/instrumenting/exporters/) which are used in exporting existing metrics from third-party databases, hardware, CI/CD tools, messaging systems, APIs and other monitoring systems. In addition to client libraries and exporters, there is a significant number of [integration points](https://prometheus.io/docs/operating/integrations/) for service discovery, remote storage, alerts and management.

## References

- [Prometheus Docs](https://prometheus.io/docs)
- [Prometheus Best Practices](https://prometheus.io/docs/practices)
- [Grafana with Prometheus](https://prometheus.io/docs/visualization/grafana/)
1 change: 1 addition & 0 deletions observability/tools/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ There are a number of modern tools to make systems observable. While identifying
- [Loki](./loki.md)
- [OpenTelemetry](./OpenTelemetry.md)
- [Kubernetes Dashboards](./KubernetesDashboards.md)
- [Prometheus](./Prometheus.md)

## Service Mesh

Expand Down