-
Book Overview & Buying
-
Table Of Contents
Rancher Deep Dive
By :
The Prometheus operator defines alert rules via the CRD PrometheusRule. At its core, all an alert is is an expression with a trigger. Let's look at the following example alert. This alert is from Longhorn, which we'll cover in the next chapter. As you can see, the expression is denoted by the expr field, which has a formula to take the actual size of the volume, divided by the capacity, and convert it to a percentage. Then, if that value is greater than 90%, the expression is true, which will trigger an alert. The description section is mainly for the end user. Still, it's important to note that you can have variables inside the description because the alert will contain the same explanation as the summary, typically used for the subject line. For example, when sending an email alert, the email's subject will be set to the subject of the alert, with the body of the email being the description.
Here is an example of an alert...