|
| 1 | +{ |
| 2 | + new(this): { |
| 3 | + groups: [ |
| 4 | + { |
| 5 | + name: 'MicrosoftIISAlerts', |
| 6 | + rules: [ |
| 7 | + { |
| 8 | + alert: 'MicrosoftIISRejectedAsyncIORequests', |
| 9 | + expr: ||| |
| 10 | + increase(windows_iis_rejected_async_io_requests_total{%(filteringSelector)s}[5m]) > %(alertsWarningHighRejectedAsyncIORequests)s |
| 11 | + ||| % this.config, |
| 12 | + 'for': '5m', |
| 13 | + labels: { |
| 14 | + severity: 'warning', |
| 15 | + }, |
| 16 | + annotations: { |
| 17 | + summary: 'There are a high number of rejected async I/O requests for a site.', |
| 18 | + description: |
| 19 | + ('The number of rejected async IO requests is {{ printf "%%.0f" $value }} over the last 5m on {{ $labels.instance }} - {{ $labels.site }}, ' + |
| 20 | + 'which is above the threshold of %(alertsWarningHighRejectedAsyncIORequests)s.') % this.config, |
| 21 | + }, |
| 22 | + }, |
| 23 | + { |
| 24 | + alert: 'MicrosoftIIS5xxRequestErrors', |
| 25 | + expr: ||| |
| 26 | + sum without (pid, status_code)(increase(windows_iis_worker_request_errors_total{status_code=~"5.."%(filteringSelector)s}[5m])) > %(alertsCriticalHigh5xxRequests)s |
| 27 | + ||| % (this.config { filteringSelector: if this.config.filteringSelector != '' then ',' + this.config.filteringSelector else '' }), |
| 28 | + 'for': '5m', |
| 29 | + labels: { |
| 30 | + severity: 'critical', |
| 31 | + }, |
| 32 | + annotations: { |
| 33 | + summary: 'There are a high number of 5xx request errors for an application.', |
| 34 | + description: |
| 35 | + ('The number of 5xx request errors is {{ printf "%%.0f" $value }} over the last 5m on {{ $labels.instance }} - {{ $labels.app }}, ' + |
| 36 | + 'which is above the threshold of %(alertsCriticalHigh5xxRequests)s.') % this.config, |
| 37 | + }, |
| 38 | + }, |
| 39 | + { |
| 40 | + alert: 'MicrosoftIISSuccessRateForWebsocket', |
| 41 | + expr: ||| |
| 42 | + sum without (pid) (increase(windows_iis_worker_websocket_connection_accepted_total{%(filteringSelector)s}[5m]) / clamp_min(increase(windows_iis_worker_websocket_connection_attempts_total{%(filteringSelector)s}[5m]),1)) * 100 < %(alertsCriticalLowWebsocketConnectionSuccessRate)s |
| 43 | + ||| % this.config, |
| 44 | + 'for': '5m', |
| 45 | + labels: { |
| 46 | + severity: 'critical', |
| 47 | + }, |
| 48 | + annotations: { |
| 49 | + summary: 'There is a low success rate for websocket connections for an application.', |
| 50 | + description: |
| 51 | + ('The success rate for websocket connections is {{ printf "%%.0f" $value }} over the last 5m on {{ $labels.instance }} - {{ $labels.app }}, ' + |
| 52 | + 'which is below the threshold of %(alertsCriticalLowWebsocketConnectionSuccessRate)s.') % this.config, |
| 53 | + }, |
| 54 | + }, |
| 55 | + { |
| 56 | + alert: 'MicrosoftIISThreadpoolUtilization', |
| 57 | + expr: ||| |
| 58 | + sum without (pid, state)(windows_iis_worker_threads{%(filteringSelector)s} / windows_iis_worker_max_threads{%(filteringSelector)s}) * 100 > %(alertsCriticalHighThreadPoolUtilization)s |
| 59 | + ||| % this.config, |
| 60 | + 'for': '5m', |
| 61 | + labels: { |
| 62 | + severity: 'critical', |
| 63 | + }, |
| 64 | + annotations: { |
| 65 | + summary: 'The thread pool utilization is nearing max capacity.', |
| 66 | + description: |
| 67 | + ('The threadpool utilization is at {{ printf "%%.0f" $value }} over the last 5m on {{ $labels.instance }} - {{ $labels.app }}, ' + |
| 68 | + 'which is above the threshold of %(alertsCriticalHighThreadPoolUtilization)s.') % this.config, |
| 69 | + }, |
| 70 | + }, |
| 71 | + { |
| 72 | + alert: 'MicrosoftIISWorkerProcessFailures', |
| 73 | + expr: ||| |
| 74 | + increase(windows_iis_total_worker_process_failures{%(filteringSelector)s}[5m]) > %(alertsWarningHighWorkerProcessFailures)s |
| 75 | + ||| % this.config, |
| 76 | + 'for': '5m', |
| 77 | + labels: { |
| 78 | + severity: 'warning', |
| 79 | + }, |
| 80 | + annotations: { |
| 81 | + summary: 'There are a high number of worker process failures for an application.', |
| 82 | + description: |
| 83 | + ('The number of worker process failures is at {{ printf "%%.0f" $value }} over the last 5m on {{ $labels.instance }} - {{ $labels.app }}, ' + |
| 84 | + 'which is above the threshold of %(alertsWarningHighWorkerProcessFailures)s.') % this.config, |
| 85 | + }, |
| 86 | + }, |
| 87 | + ], |
| 88 | + }, |
| 89 | + ], |
| 90 | + }, |
| 91 | +} |
0 commit comments