Add monitors to components using the UI

Overview

SUSE® Observability includes out-of-the-box monitors to detect common issues in your Kubernetes cluster. Using the SUSE® Observability monitor editor, you can also create custom monitors to evaluate metrics collected by the Agent or ingested from Prometheus.

Steps to add a monitor

Follow the below steps to add a new monitor to a component in SUSE® Observability:

  1. In the SUSE® Observability dashboard, navigate to 'Monitors' and click 'ADD NEW MONITOR'.

    add new monitor

  2. From the list of monitor types, choose the type that fits your use-case.

    choose monitor type
  3. Fill in the parameters for each monitor type, such as metrics, monitoring conditions, component mappings, and the like, as per your monitoring requirements.

  4. Click 'SAVE CHANGES' to add the monitor to the component.

Example: Adding a Metric Threshold Monitor

In this example, we add a metric threshold monitor to a component in SUSE® Observability to trigger a health state when a given threshold is exceeded for a specified metric query.

  1. From the list of monitor types, choose 'Metric Threshold Monitor'.

  2. Fill in the following parameters for the metric threshold monitor

    General monitor information
    • Name: Give your monitor a clear, descriptive name.

    • Type: Specify the type of monitor you are creating.

    • Description: Briefly explain the purpose of this monitor so your team understands why it exists and what it tracks.

    • Status: Indicate whether the monitor is enabled or disabled.

      A disabled monitor is not visible on the components it is mapped on, does not impact their health state and does not trigger any alerts.

    • Tags: Optionally, add tags to categorize and filter monitors. For example, pods.

    Metric
    • PromQL: Specify the PromQL query to define the metric you want to monitor. For more information, see PromQL queries.

      sum by (pod, namespace) (container_memory_working_set_bytes\{container!="", pod=~"frontend-.*"})
      /
      sum by (pod, namespace) (kube_pod_container_resource_limits\{resource="memory", pod=~"frontend-.*"})
      * 100
    • Time series alias: Provide an alias to distinguish betwen different time series withotu depending on labels. For example, Frontend Memory: \{{namespace}} / \{{pod}}.

    • Unit of measurement: Specify the unit of measurement to automatically convert the Y-axis values to the right units in all the charts. For example, Percent, Decibel, and so on.

    Monitor conditions
    • Rule(s): Define the conditions under which the monitor will trigger alerts. For example, you might set a rule to trigger an alert when CPU usage exceeds 80% for more than 5 minutes.

    • Interval: Specify how frequently the monitor should evaluate the conditions.

    Components mapping
    • Scope: Define how the monitor maps its alerts to the Topology graph. Depending on your selection, the correct Component Identifier (URN) is generated:

      • Single component: Use this when your PromQL query tracks only one specific resource (for example, a single master node). You can search and select the exact component from your topology, automatically filling in its static URN.

      • Multiple components: Use this when your PromQL query tracks a group of resources (for example, grouping by pod or namespace). You can build a dynamic URN template using the labels from your query (for example, urn:kubernetes:/…​/pod/\{{pod}}). This allows one monitor to dynamically map alerts to many different components based on the metric data.

    • Component identifier: Specify the unique identifier of the component to which this monitor will be mapped. This ensures that the monitor is correctly associated with the intended component within your Kubernetes environment. For more information, see Identifiers.

    Remediation

    For information on writing a remediation guide, see Write a remediation guide.

    add metric threshold
  3. Click 'SAVE CHANGES' to add the metric threshold monitor to the component.

Verification

  • Verify that the monitor has been added successfully by checking the list of monitors. From the list, you can further edit the monitor, change the state, or delete as needed.