O'Reilly logo

The DevOps 2.2 Toolkit by Viktor Farcic

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Defining additional alert information through labels and annotations

We might want to specify supplementary information to our alerts. We can accomplish that through the usage of alert labels and annotations.

Alert labels clause allows specifying a set of additional labels to be attached to the alert. The annotations clause specifies another set of labels that are not identifying for an alert instance. They are used to store longer additional information such as alert descriptions or runbook links.

We can, for example, update our go-demo stack by adding service labels that follow:

... 
services: 
 
  main: 
    ... 
    deploy: 
      ... 
      labels: 
 
       ... 
        - com.df.alertLabels=severity=high,receiver=system 
        - com.df.alertAnnotations=summary=Service memory is \ high,description=Do ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required