Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions microsoft-iis-mixin/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ The Microsoft IIS mixin contains the following dashboards:

and the following alerts:

- MicrosoftIISHighNumberOfRejectedAsyncIORequests
- MicrosoftIISHighNumberOf5xxRequestErrors
- MicrosoftIISLowSuccessRateForWebsocketConnections
- MicrosoftIISThreadpoolUtilizationNearingMax
- MicrosoftIISHighNumberOfWorkerProcessFailures
- MicrosoftIISRejectedAsyncIORequests
- MicrosoftIIS5xxRequestErrors
- MicrosoftIISSuccessRateForWebsocket
- MicrosoftIISThreadpoolUtilization
- MicrosoftIISWorkerProcessFailures

Default thresholds can be configured in `config,libsonnet`

Expand Down Expand Up @@ -57,11 +57,11 @@ The Microsoft IIS applications dashboard provides details on worker requests, we
![Screenshot3 of the applications dashboard](https://storage.googleapis.com/grafanalabs-integration-assets/iis/screenshots/application-3.png)
## Alerts overview

MicrosoftIISHighNumberOfRejectedAsyncIORequests: There are a high number of rejected async I/O requests for a site.
MicrosoftIISHighNumberOf5xxRequestErrors: There are a high number of 5xx request errors for an application.
MicrosoftIISLowSuccessRateForWebsocketConnections: There is a low success rate for websocket connections for an application.
MicrosoftIISThreadpoolUtilizationNearingMax: The thread pool utilization is nearing max capacity.
MicrosoftIISHighNumberOfWorkerProcessFailures: There are a high number of worker process failures for an application.
- `MicrosoftIISRejectedAsyncIORequests`: There are a high number of rejected async I/O requests for a site.
- `MicrosoftIIS5xxRequestErrors`: There are a high number of 5xx request errors for an application.
- `MicrosoftIISSuccessRateForWebsocket`: There is a low success rate for websocket connections for an application.
- `MicrosoftIISThreadpoolUtilization`: The thread pool utilization is nearing max capacity.
- `MicrosoftIISWorkerProcessFailures`: There are a high number of worker process failures for an application.

## Install Tools

Expand Down
91 changes: 91 additions & 0 deletions microsoft-iis-mixin/alerts.libsonnet
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do all or some of the alerts need to use the {%(filteringSelector)s}? It's not present in any of them.

Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
{
new(this): {
groups: [
{
name: 'MicrosoftIISAlerts',
rules: [
{
alert: 'MicrosoftIISRejectedAsyncIORequests',
expr: |||
increase(windows_iis_rejected_async_io_requests_total{%(filteringSelector)s}[5m]) > %(alertsWarningHighRejectedAsyncIORequests)s
||| % this.config,
'for': '5m',
labels: {
severity: 'warning',
},
annotations: {
summary: 'There are a high number of rejected async I/O requests for a site.',
description:
('The number of rejected async IO requests is {{ printf "%%.0f" $value }} over the last 5m on {{ $labels.instance }} - {{ $labels.site }}, ' +
'which is above the threshold of %(alertsWarningHighRejectedAsyncIORequests)s.') % this.config,
},
},
{
alert: 'MicrosoftIIS5xxRequestErrors',
expr: |||
sum without (pid, status_code)(increase(windows_iis_worker_request_errors_total{status_code=~"5.."%(filteringSelector)s}[5m])) > %(alertsCriticalHigh5xxRequests)s
||| % (this.config { filteringSelector: if this.config.filteringSelector != '' then ',' + this.config.filteringSelector else '' }),
'for': '5m',
labels: {
severity: 'critical',
},
annotations: {
summary: 'There are a high number of 5xx request errors for an application.',
description:
('The number of 5xx request errors is {{ printf "%%.0f" $value }} over the last 5m on {{ $labels.instance }} - {{ $labels.app }}, ' +
'which is above the threshold of %(alertsCriticalHigh5xxRequests)s.') % this.config,
},
},
{
alert: 'MicrosoftIISSuccessRateForWebsocket',
expr: |||
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
||| % this.config,
'for': '5m',
labels: {
severity: 'critical',
},
annotations: {
summary: 'There is a low success rate for websocket connections for an application.',
description:
('The success rate for websocket connections is {{ printf "%%.0f" $value }} over the last 5m on {{ $labels.instance }} - {{ $labels.app }}, ' +
'which is below the threshold of %(alertsCriticalLowWebsocketConnectionSuccessRate)s.') % this.config,
},
},
{
alert: 'MicrosoftIISThreadpoolUtilization',
expr: |||
sum without (pid, state)(windows_iis_worker_threads{%(filteringSelector)s} / windows_iis_worker_max_threads{%(filteringSelector)s}) * 100 > %(alertsCriticalHighThreadPoolUtilization)s
||| % this.config,
'for': '5m',
labels: {
severity: 'critical',
},
annotations: {
summary: 'The thread pool utilization is nearing max capacity.',
description:
('The threadpool utilization is at {{ printf "%%.0f" $value }} over the last 5m on {{ $labels.instance }} - {{ $labels.app }}, ' +
'which is above the threshold of %(alertsCriticalHighThreadPoolUtilization)s.') % this.config,
},
},
{
alert: 'MicrosoftIISWorkerProcessFailures',
expr: |||
increase(windows_iis_total_worker_process_failures{%(filteringSelector)s}[5m]) > %(alertsWarningHighWorkerProcessFailures)s
||| % this.config,
'for': '5m',
labels: {
severity: 'warning',
},
annotations: {
summary: 'There are a high number of worker process failures for an application.',
description:
('The number of worker process failures is at {{ printf "%%.0f" $value }} over the last 5m on {{ $labels.instance }} - {{ $labels.app }}, ' +
'which is above the threshold of %(alertsWarningHighWorkerProcessFailures)s.') % this.config,
},
},
],
},
],
},
}
91 changes: 0 additions & 91 deletions microsoft-iis-mixin/alerts/alerts.libsonnet

This file was deleted.

45 changes: 33 additions & 12 deletions microsoft-iis-mixin/config.libsonnet
Original file line number Diff line number Diff line change
@@ -1,17 +1,38 @@
{
_config+:: {
dashboardTags: ['microsoft-iis-mixin'],
dashboardPeriod: 'now-1h',
dashboardTimezone: 'default',
dashboardRefresh: '1m',
local this = self,
filteringSelector: '', // set to apply static filters to all queries and alerts, i.e. job="bar"
groupLabels: ['job'],
instanceLabels: ['instance'],
logLabels: ['job', 'instance'],

// alerts thresholds
alertsWarningHighRejectedAsyncIORequests: 20,
alertsCriticalHigh5xxRequests: 5,
alertsCriticalLowWebsocketConnectionSuccessRate: 80,
alertsCriticalHighThreadPoolUtilization: 90,
alertsWarningHighWorkerProcessFailures: 10,

enableLokiLogs: true,
// Dashboard settings
dashboardTags: [this.uid + '-mixin'],
uid: 'microsoft-iis',
dashboardNamePrefix: 'Microsoft IIS',
dashboardPeriod: 'now-30m',
dashboardTimezone: 'default',
dashboardRefresh: '1m',

// Logs configuration
enableLokiLogs: true,
extraLogLabels: ['level'], // Required by logs-lib
logsVolumeGroupBy: 'level',
showLogsVolume: true,

// Alert thresholds
alertsWarningHighRejectedAsyncIORequests: 20, // count
alertsCriticalHigh5xxRequests: 5, // %
alertsCriticalLowWebsocketConnectionSuccessRate: 80, // %
alertsCriticalHighThreadPoolUtilization: 90, // %
alertsWarningHighWorkerProcessFailures: 10, // count

// Metrics source
metricsSource: ['prometheus'],

// Signal definitions grouped by dashboard
signals+: {
overview: (import './signals/overview.libsonnet')(this),
applications: (import './signals/applications.libsonnet')(this),
},
}
Loading
Loading