Skip to content

Commit

Permalink
Add APIcast workers monitoring alert
Browse files Browse the repository at this point in the history
  • Loading branch information
miguelsorianod committed Oct 2, 2020
1 parent 842bb38 commit eb45ed6
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions pkg/3scale/amp/component/apicast_monitoring.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,18 @@ func ApicastPrometheusRules(ns string) *monitoringv1.PrometheusRule {
"severity": "warning",
},
},
{
Alert: "ThreescaleApicastWorkerRestart",
Annotations: map[string]string{
"summary": "A new worker process in Nginx has been started",
"description": "A new thread has been started. This could indicate that a worker process has died due to the memory limits being exceeded. Please investigate the memory pressure on pod (instance {{ $labels.instance }})",
},
Expr: intstr.FromString(fmt.Sprintf(`changes(worker_process{namespace='%s', pod=~'apicast-production.*'}[5m]) > 0`, ns)),
For: "5m",
Labels: map[string]string{
"severity": "warning",
},
},
},
},
},
Expand Down

0 comments on commit eb45ed6

Please sign in to comment.