How to Integrate OpenShift Namespace Monitoring and Slack

OpenShift ships with a pre-installed monitoring stack for monitoring platform components out of the box. The monitoring stack is based on the Prometheus open source project and includes multiple components such as Grafana for analyzing and visualizing metrics. Developers and other users often need to monitor services and pods in their projects and namespaces. These users may be interested in observing application level metrics exposed by their services or other platform metrics such as CPU usage, memory usage, requests rate and timeouts within specific namespaces. Such requirements can be fulfilled when monitoring for user-defined projects is enabled by a cluster administrator.

We can further create alerting rules, trigger alerts when a metric reaches a set threshold and manage alerts within the Alerting UI in OpenShift. For example, we might want to trigger an alert when requests to a service times out after a specified number of consecutive requests within a time-period. This can be achieved with alerting rules. Alerting rules are defined in a YAML file and contains a PromQL expression of the alert condition.

Alert rules and their states can be viewed within the OpenShift Alerting UI, however application and platform teams might also have requirements to receive notifications on external systems when an alert is in firing state. OpenShift currently supports routing alert notifications to four external receiver types: Email, Slack, PagerDuty and Webhook. With OpenShift 4.10, there is one supported way of routing alerts to external systems: A cluster administrator configures the receiver from within Alertmanager UI or applies a YAML configuration. In the next sections, we will:

  • Describe the steps for enabling user-defined project monitoring so we can monitor services within a specific namespace.
  • Deploy a sample service within a specific namespace and create an Alerting rule.
  • Configure Slack to post OpenShift alerts to a channel within a Slack workspace.
  • Describe how to configure an alert receiver using both openhift UI and YAML configuration.

Learn more:





Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

18 Precious Wedding Photo Ideas with Your Dogs

From Nurse to Software Developer

Introduction and a little about myself!

Hackathons 101

My take on Process Simulation

Top 10 Global DevOps Consulting and Service Providers

The lil Mushroom Calculator that quotes

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
cloudstrata GmbH

cloudstrata GmbH


More from Medium

Setting up Gravitee API Management behind Istio Service Mesh

StreamNative Pulsar Operator Tutorial Part 2

Kafka on Kubernetes: Using Strimzi — Part 3(Configuration Options)

Using NFS to Simulate Metropolitan Disaster Recovery in an OpenShift Environment