From f56d0564c74285836958c492266a1bde97ef4506 Mon Sep 17 00:00:00 2001 From: Andreas Thaler Date: Thu, 16 Jan 2025 17:15:02 +0100 Subject: [PATCH] Add archive notes to the repo --- README.md | 5 ++++ prometheus/README-old.md | 26 +++++++++++++++++++ prometheus/README.md | 24 +++-------------- prometheus/monitoring-alert-rules/README.md | 3 +++ .../monitoring-custom-metrics/README.md | 3 +++ .../monitoring-grafana-dashboard/README.md | 3 +++ 6 files changed, 43 insertions(+), 21 deletions(-) create mode 100644 prometheus/README-old.md diff --git a/README.md b/README.md index d912e1cd..c0ec7432 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,11 @@ # Examples +## :warning: **Archived** + +This repository has been deprecated and archived. Replacements can be found in the individual [module pages](https://kyma-project.io/#/06-modules/README). Telemetry related guides moved to the new [telemetry integration guides](https://kyma-project.io/#/telemetry-manager/user/README?id=integration-guides). + + ## Overview The examples project provides a central repository to showcase and illustrate features and concepts on Kyma. diff --git a/prometheus/README-old.md b/prometheus/README-old.md new file mode 100644 index 00000000..35ecb1ab --- /dev/null +++ b/prometheus/README-old.md @@ -0,0 +1,26 @@ +# Monitoring in Kyma using a custom kube-prometheus-stack + +> [!WARNING] +> This guide got reworked and has been moved. Find the updated instructions in [Integrate With Prometheus](https://kyma-project.io/#/telemetry-manager/user/integration/prometheus/README). + +## Overview + +The Kyma Telemetry module provides collection and integration into observability backends based on OpenTelemetry. OpenTelemetry is the new vendor-neutral player in the cloud-native observability domain and has a growing adoption. However, it still lacks many features and sometimes the typical `kube-prometheus-stack` based on Prometheus, Grafana, and the surrounding helper tools is more appropriate. + +The following instructions describe the complete monitoring flow for your service running in Kyma. You get the gist of monitoring applications, such as Prometheus, Grafana, and Alertmanager. You learn how and where you can observe and visualize your service metrics to monitor them for any alerting values. + +All the tutorials use the [`monitoring-custom-metrics`](./monitoring-custom-metrics/README.md) example and one of its services called `sample-metrics`. This service exposes the `cpu_temperature_celsius` custom metric on the `/metrics` endpoint. This custom metric is the central element of the whole tutorial set. The metric value simulates the current processor temperature and changes randomly from 60 to 90 degrees Celsius. The alerting threshold in these tutorials is 75 degrees Celsius. If the temperature exceeds this value, the Grafana dashboard, PrometheusRule, and Alertmanager notifications you create inform you about this. + +## Sequence of tasks + +The instructions cover the following tasks: + + ![Monitoring tutorials](./assets/monitoring-tutorials.svg) + +1. [**Deploy a custom Prometheus stack**](./prometheus.md), in which you deploy the [kube-prometheus-stack](https://github.com/prometheus-operator/kube-prometheus) from the upstream Helm chart. + +2. [**Observe application metrics**](./monitoring-custom-metrics/README.md), in which you redirect the `cpu_temperature_celsius` metric to the localhost and the Prometheus UI. You later observe how the metric value changes in the predefined 10-second interval in which Prometheus scrapes the metric values from the service's `/metrics` endpoint. + +3. [**Create a Grafana dashboard**](./monitoring-grafana-dashboard/README.md), in which you create a Grafana dashboard of a Gauge type for the `cpu_temperature_celsius` metric. This dashboard shows explicitly when the CPU temperature is equal to or higher than the predefined threshold of 75 degrees Celsius, at which point the dashboard turns red. + +4. [**Define alerting rules**](./monitoring-alert-rules/README.md), in which you define the `CPUTempHigh` alerting rule by creating a PrometheusRule resource. Prometheus accesses the `/metrics` endpoint every 10 seconds and validates the current value of the `cpu_temperature_celsius` metric. If the value is equal to or higher than 75 degrees Celsius, Prometheus waits for 10 seconds to recheck it. If the value still exceeds the threshold, Prometheus triggers the rule. You can observe both the rule and the alert it generates on the Prometheus dashboard. diff --git a/prometheus/README.md b/prometheus/README.md index c4a746b0..6b8d5f5e 100644 --- a/prometheus/README.md +++ b/prometheus/README.md @@ -1,23 +1,5 @@ # Monitoring in Kyma using a custom kube-prometheus-stack -## Overview - -The Kyma Telemetry module provides collection and integration into observability backends based on OpenTelemetry. OpenTelemetry is the new vendor-neutral player in the cloud-native observability domain and has a growing adoption. However, it still lacks many features and sometimes the typical `kube-prometheus-stack` based on Prometheus, Grafana, and the surrounding helper tools is more appropriate. - -The following instructions describe the complete monitoring flow for your service running in Kyma. You get the gist of monitoring applications, such as Prometheus, Grafana, and Alertmanager. You learn how and where you can observe and visualize your service metrics to monitor them for any alerting values. - -All the tutorials use the [`monitoring-custom-metrics`](./monitoring-custom-metrics/README.md) example and one of its services called `sample-metrics`. This service exposes the `cpu_temperature_celsius` custom metric on the `/metrics` endpoint. This custom metric is the central element of the whole tutorial set. The metric value simulates the current processor temperature and changes randomly from 60 to 90 degrees Celsius. The alerting threshold in these tutorials is 75 degrees Celsius. If the temperature exceeds this value, the Grafana dashboard, PrometheusRule, and Alertmanager notifications you create inform you about this. - -## Sequence of tasks - -The instructions cover the following tasks: - - ![Monitoring tutorials](./assets/monitoring-tutorials.svg) - -1. [**Deploy a custom Prometheus stack**](./prometheus.md), in which you deploy the [kube-prometheus-stack](https://github.com/prometheus-operator/kube-prometheus) from the upstream Helm chart. - -2. [**Observe application metrics**](./monitoring-custom-metrics/README.md), in which you redirect the `cpu_temperature_celsius` metric to the localhost and the Prometheus UI. You later observe how the metric value changes in the predefined 10-second interval in which Prometheus scrapes the metric values from the service's `/metrics` endpoint. - -3. [**Create a Grafana dashboard**](./monitoring-grafana-dashboard/README.md), in which you create a Grafana dashboard of a Gauge type for the `cpu_temperature_celsius` metric. This dashboard shows explicitly when the CPU temperature is equal to or higher than the predefined threshold of 75 degrees Celsius, at which point the dashboard turns red. - -4. [**Define alerting rules**](./monitoring-alert-rules/README.md), in which you define the `CPUTempHigh` alerting rule by creating a PrometheusRule resource. Prometheus accesses the `/metrics` endpoint every 10 seconds and validates the current value of the `cpu_temperature_celsius` metric. If the value is equal to or higher than 75 degrees Celsius, Prometheus waits for 10 seconds to recheck it. If the value still exceeds the threshold, Prometheus triggers the rule. You can observe both the rule and the alert it generates on the Prometheus dashboard. +> [!WARNING] +> This guide got reworked and has been moved. Find the updated instructions in [Integrate With Prometheus](https://kyma-project.io/#/telemetry-manager/user/integration/prometheus/README). +> The archived version is still available [here](./README-old.md) diff --git a/prometheus/monitoring-alert-rules/README.md b/prometheus/monitoring-alert-rules/README.md index 437d7345..197e821f 100644 --- a/prometheus/monitoring-alert-rules/README.md +++ b/prometheus/monitoring-alert-rules/README.md @@ -1,5 +1,8 @@ # Alert Rules Example +> [!WARNING] +> This guide got reworked and has been moved. Find the updated instructions in [Integrate With Prometheus](https://kyma-project.io/#/telemetry-manager/user/integration/prometheus/README). + ## Overview This example shows how to deploy and view alerting rules in Kyma. diff --git a/prometheus/monitoring-custom-metrics/README.md b/prometheus/monitoring-custom-metrics/README.md index 05dbdde1..9e208dd0 100644 --- a/prometheus/monitoring-custom-metrics/README.md +++ b/prometheus/monitoring-custom-metrics/README.md @@ -1,5 +1,8 @@ # Expose Custom Metrics in Kyma +> [!WARNING] +> This guide got reworked and has been moved. Find the updated instructions in [Integrate With Prometheus](https://kyma-project.io/#/telemetry-manager/user/integration/prometheus/README). + ## Overview This example shows how to expose custom metrics to Prometheus with a Golang service in Kyma. To do so, follow these steps: diff --git a/prometheus/monitoring-grafana-dashboard/README.md b/prometheus/monitoring-grafana-dashboard/README.md index 1eb9d582..1912eabc 100644 --- a/prometheus/monitoring-grafana-dashboard/README.md +++ b/prometheus/monitoring-grafana-dashboard/README.md @@ -1,5 +1,8 @@ # Create a Grafana dashboard +> [!WARNING] +> This guide got reworked and has been moved. Find the updated instructions in [Integrate With Prometheus](https://kyma-project.io/#/telemetry-manager/user/integration/prometheus/README). + Follow these sections to create the Gauge dashboard type for the `cpu_temperature_celsius` metric. ## Prerequisites