From e6ed60548397627bf10f561f9438201dbba0a36e Mon Sep 17 00:00:00 2001 From: Azat Bahawi Date: Sun, 21 Apr 2024 02:15:42 +0300 Subject: 2024-04-21 --- modules/nixos/monitoring/rules/nginx.yaml | 60 ------------------------------- 1 file changed, 60 deletions(-) delete mode 100644 modules/nixos/monitoring/rules/nginx.yaml (limited to 'modules/nixos/monitoring/rules/nginx.yaml') diff --git a/modules/nixos/monitoring/rules/nginx.yaml b/modules/nixos/monitoring/rules/nginx.yaml deleted file mode 100644 index f00d372..0000000 --- a/modules/nixos/monitoring/rules/nginx.yaml +++ /dev/null @@ -1,60 +0,0 @@ ---- -groups: - - name: Nginx - - rules: - - alert: NginxHighHttp4xxErrorRate - expr: >- - sum(rate(nginx_http_requests_total{status=~"^4.."}[1m])) - / - sum(rate(nginx_http_requests_total[1m])) * 100 - > 5 - for: 1m - labels: - severity: critical - annotations: - summary: NGINX high HTTP 4xx error rate at {{ $labels.instance }}. - description: |- - Too many HTTP requests with a 4xx status code. - - VALUE = {{ $value }} - LABELS = {{ $labels }} - - - alert: NginxHighHttp5xxErrorRate - expr: >- - sum(rate(nginx_http_requests_total{status=~"^5.."}[1m])) - / - sum(rate(nginx_http_requests_total[1m])) * 100 - > 5 - for: 1m - labels: - severity: critical - annotations: - summary: NGINX high HTTP 5xx error rate at {{ $labels.instance }}. - description: |- - Too many HTTP requests with a 5xx status code. - - VALUE = {{ $value }} - LABELS = {{ $labels }} - - - alert: NginxLatencyHigh - expr: >- - histogram_quantile( - 0.99, - sum( - rate( - nginx_http_request_duration_seconds_bucket[2m] - ) - ) by (host, node) - ) - > 3 - for: 2m - labels: - severity: warning - annotations: - summary: NGINX high latency at {{ $labels.instance }}. - description: |- - NGINX 99% of latency spikes is higher than 3 seconds. - - VALUE = {{ $value }} - LABELS = {{ $labels }} -- cgit 1.4.1