Prometheus is a time-series database and a monitoring system. It can be compared with Azure Monitor in some aspects. Prometheus, by itself, doesn't expose any metrics. It collects the metrics and provides a platform for review (Grafana) and react (Alert Manager) through further tooling.
The metrics come from nodes, platform (kubelet), and applications. Node exposes CPU, memory, disk, and other metrics. Kubelet exposes pod and configuration related metrics. Applications, such as an Ingress Controller, expose metrics for requests rate, success/error rate, processing times, and other.
Azure Monitor, with the default configuration, collects both node and kube metrics. For the applications, you can configure custom metrics and feed those to Azure Monitor, however, Prometheus already has a broader eco-system of metric exporters that do not require any application modification. For example, you can enable Prometheus based metric export in NGINX Ingress controller by setting controller.metrics.enabled
to true
when deploying the helm chart.
Since Azure Monitor can also scrape Prometheus metrics, you don't have to install Prometheus server in the cluster, just set up metric exporters. However, there are several added benefits to having that server installed albeit to store information for the short term (6h or more). It's more simpler and efficient to work with. Some applications, for example Istio, bundle Prometheus server with their installers.