Firing alerts based on instrumented metrics

Now that we have a solid understanding of some of the expressions based on instrumented metrics, we can proceed and apply that knowledge to create a few alerts.

Let us deploy updated version of the go-demo stack.

docker stack deploy \  
    -c stacks/go-demo-instrument-alert.yml \   

We'll take a couple of moments to discuss the changes to the updated stack while waiting for the services to become operational. The stack definition, limited to relevant parts, is as follows:

        - com.df.alertName.1=mem_limit 
        - com.df.alertIf.1=@service_mem_limit:0.8 
        - com.df.alertFor.1=5m 
        - com.df.alertName.2=resp_time 
        - com.df.alertIf.2=sum(rate(http_server_resp_time_bucket{\ job="go-demo_main", ...

Get The DevOps 2.2 Toolkit now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.