Cloud Services

Container Cluster Management

Prometheus and Alerts
Published On Jun 05, 2024 - 1:53 PM

Prometheus and Alerts

Alert manager is an open-source alerting system with the Prometheus Monitoring system.

Alert manager

The Alert Manager manages duplicating, grouping, and routing alerts to the correct receiver integration, such as email and PagerDuty and manages silencing and inhibition of alerts. Alertmanager must be installed on Cluster with service exposed on
port
and
targetPort 9093
.
If Alert manager is installed on the cluster, add a default receiver to Alertmanager configMap in the receiver section.

Prometheus

Prometheus is an open-source monitoring framework. It provides out-of-the-box monitoring capabilities for the Kubernetes container orchestration platform. It scrapes metrics from instrumented jobs and stores all scraped samples locally. It then manages this data and generates alerts.
Prometheus must be installed on a Cluster with service exposed on
port
and
targetPort 9090
. If Prometheus is installed on a cluster, Alertmanager requires data in a specific format to display relevant alert information about the UI. Hence, in the created config map to externalize Prometheus (config-map.yaml), the pod-level queries must include the namespace, pod name, and description of the alert under the configuration of alerts.
In the previous example, the pod-level query is defined by
expr
, which creates an alert if the pod is using more CPU. The output of
expr
should contain the namespace and the pod name. To add these values in Alert manager, produce the output using
$labels
under
labels section
.
Along with Prometheus,
node-exporter
must also be installed for node-level metrics like memory usage, CPU usage, etc.

Prometheus cloud providers

Prometheus needs to be configured to each cloud service provider to pull data for its monitoring framework; visit each provider listed below for more details regarding configuration:
Do you have two minutes for a quick survey?
Take Survey