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 \ go-demo
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:
... main: ... deploy: ... labels: ... - 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", le="0.1"...