diff --git a/microsoft-iis-mixin/README.md b/microsoft-iis-mixin/README.md index c8bb4ed17..748772e74 100644 --- a/microsoft-iis-mixin/README.md +++ b/microsoft-iis-mixin/README.md @@ -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` @@ -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 diff --git a/microsoft-iis-mixin/alerts/alerts.libsonnet b/microsoft-iis-mixin/alerts.libsonnet similarity index 53% rename from microsoft-iis-mixin/alerts/alerts.libsonnet rename to microsoft-iis-mixin/alerts.libsonnet index cb45b2619..c44b45e94 100644 --- a/microsoft-iis-mixin/alerts/alerts.libsonnet +++ b/microsoft-iis-mixin/alerts.libsonnet @@ -1,87 +1,87 @@ { - prometheusAlerts+:: { - groups+: [ + new(this): { + groups: [ { - name: 'microsoft-iis', + name: 'MicrosoftIISAlerts', rules: [ { - alert: 'MicrosoftIISHighNumberOfRejectedAsyncIORequests', + alert: 'MicrosoftIISRejectedAsyncIORequests', expr: ||| increase(windows_iis_rejected_async_io_requests_total[5m]) > %(alertsWarningHighRejectedAsyncIORequests)s - ||| % $._config, + ||| % 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. - ||| % $._config, + 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: 'MicrosoftIISHighNumberOf5xxRequestErrors', + alert: 'MicrosoftIIS5xxRequestErrors', expr: ||| - sum without (pid, status_code)(increase(windows_iis_worker_request_errors_total{status_code=~"5.*"}[5m])) > %(alertsCriticalHigh5xxRequests)s - ||| % $._config, + sum without (pid, status_code)(increase(windows_iis_worker_request_errors_total{status_code=~"5.."}[5m])) > %(alertsCriticalHigh5xxRequests)s + ||| % this.config, '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. - ||| % $._config, + 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: 'MicrosoftIISLowSuccessRateForWebsocketConnections', + alert: 'MicrosoftIISSuccessRateForWebsocket', expr: ||| sum without (pid) (increase(windows_iis_worker_websocket_connection_accepted_total[5m]) / clamp_min(increase(windows_iis_worker_websocket_connection_attempts_total[5m]),1)) * 100 > %(alertsCriticalLowWebsocketConnectionSuccessRate)s - ||| % $._config, + ||| % 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 above the threshold of %(alertsCriticalLowWebsocketConnectionSuccessRate)s. - ||| % $._config, + description: + ('The success rate for websocket connections is {{ printf "%%.0f" $value }} over the last 5m on {{ $labels.instance }} - {{ $labels.app }}, ' + + 'which is above the threshold of %(alertsCriticalLowWebsocketConnectionSuccessRate)s.') % this.config, }, }, { - alert: 'MicrosoftIISThreadpoolUtilizationNearingMax', + alert: 'MicrosoftIISThreadpoolUtilization', expr: ||| sum without (pid, state)(windows_iis_worker_threads / windows_iis_worker_max_threads) * 100 > %(alertsCriticalHighThreadPoolUtilization)s - ||| % $._config, + ||| % 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. - ||| % $._config, + 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: 'MicrosoftIISHighNumberOfWorkerProcessFailures', + alert: 'MicrosoftIISWorkerProcessFailures', expr: ||| increase(windows_iis_total_worker_process_failures[5m]) > %(alertsWarningHighWorkerProcessFailures)s - ||| % $._config, + ||| % 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. - ||| % $._config, + 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, }, }, ], diff --git a/microsoft-iis-mixin/config.libsonnet b/microsoft-iis-mixin/config.libsonnet index 9fada9167..340fc4e64 100644 --- a/microsoft-iis-mixin/config.libsonnet +++ b/microsoft-iis-mixin/config.libsonnet @@ -1,17 +1,39 @@ { - _config+:: { - dashboardTags: ['microsoft-iis-mixin'], - dashboardPeriod: 'now-1h', - dashboardTimezone: 'default', - dashboardRefresh: '1m', + local this = self, - // alerts thresholds - alertsWarningHighRejectedAsyncIORequests: 20, - alertsCriticalHigh5xxRequests: 5, - alertsCriticalLowWebsocketConnectionSuccessRate: 80, - alertsCriticalHighThreadPoolUtilization: 90, - alertsWarningHighWorkerProcessFailures: 10, + filteringSelector: 'job="integrations/iis"', + groupLabels: ['job'], + instanceLabels: ['instance'], + logLabels: ['job', 'instance'], - 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), }, } diff --git a/microsoft-iis-mixin/dashboards.libsonnet b/microsoft-iis-mixin/dashboards.libsonnet new file mode 100644 index 000000000..6104aaa07 --- /dev/null +++ b/microsoft-iis-mixin/dashboards.libsonnet @@ -0,0 +1,132 @@ +local g = import './g.libsonnet'; +local logslib = import 'logs-lib/logs/main.libsonnet'; + +{ + local root = self, + new(this):: + local prefix = this.config.dashboardNamePrefix; + local links = this.grafana.links; + local tags = this.config.dashboardTags; + local uid = g.util.string.slugify(this.config.uid); + local vars = this.grafana.variables; + local annotations = this.grafana.annotations; + local refresh = this.config.dashboardRefresh; + local period = this.config.dashboardPeriod; + local timezone = this.config.dashboardTimezone; + + { + // Microsoft IIS overview dashboard + 'microsoft-iis-overview.json': + g.dashboard.new(prefix + ' overview') + + g.dashboard.withDescription('Dashboard providing an overview of Microsoft IIS performance.') + + g.dashboard.withPanels( + g.util.panel.resolveCollapsedFlagOnRows( + g.util.grid.wrapPanels( + [ + this.grafana.rows.overviewRequests, + this.grafana.rows.overviewAsyncIO, + this.grafana.rows.overviewTraffic, + this.grafana.rows.overviewConnections, + ] + ) + ) + ) + + root.applyCommon( + vars.multiInstance + [ + g.dashboard.variable.query.new('site') + + g.dashboard.variable.query.withDatasourceFromVariable(vars.datasources.prometheus) + + g.dashboard.variable.query.queryTypes.withLabelValues('site', 'windows_iis_requests_total{job=~"$job", instance=~"$instance"}') + + g.dashboard.variable.query.generalOptions.withLabel('Site') + + g.dashboard.variable.query.selectionOptions.withMulti(true) + + g.dashboard.variable.query.selectionOptions.withIncludeAll(true, '.+') + + g.dashboard.variable.query.refresh.onTime(), + ], + uid + '_overview', + tags, + links { microsoftIISOverview+:: {} }, + annotations, + timezone, + refresh, + period + ), + + // Microsoft IIS applications dashboard + 'microsoft-iis-applications.json': + g.dashboard.new(prefix + ' applications') + + g.dashboard.withDescription('Dashboard providing detailed application performance metrics for Microsoft IIS.') + + g.dashboard.withPanels( + g.util.panel.resolveCollapsedFlagOnRows( + g.util.grid.wrapPanels( + [ + this.grafana.rows.applicationsRequests, + this.grafana.rows.applicationsWebsocket, + this.grafana.rows.applicationsWorkerProcesses, + this.grafana.rows.applicationsCache, + ] + ) + ) + ) + + root.applyCommon( + vars.multiInstance + [ + g.dashboard.variable.query.new('application') + + g.dashboard.variable.query.withDatasourceFromVariable(vars.datasources.prometheus) + + g.dashboard.variable.query.queryTypes.withLabelValues('app', 'windows_iis_current_application_pool_state{job=~"$job", instance=~"$instance"}') + + g.dashboard.variable.query.generalOptions.withLabel('Application') + + g.dashboard.variable.query.selectionOptions.withMulti(true) + + g.dashboard.variable.query.selectionOptions.withIncludeAll(true, '.+') + + g.dashboard.variable.query.refresh.onLoad() + + g.dashboard.variable.query.refresh.onTime(), + ], + uid + '_applications', + tags, + links { microsoftIISApplications+:: {} }, + annotations, + timezone, + refresh, + period + ), + } + + + if this.config.enableLokiLogs then + { + 'microsoft-iis-logs.json': + logslib.new( + prefix + ' logs', + datasourceName=this.grafana.variables.datasources.loki.name, + datasourceRegex=this.grafana.variables.datasources.loki.regex, + filterSelector=this.config.filteringSelector, + labels=this.config.groupLabels + this.config.extraLogLabels, + formatParser=null, + showLogsVolume=this.config.showLogsVolume, + ) + { + dashboards+: + { + logs+: + root.applyCommon(super.logs.templating.list, uid=uid + '-logs', tags=tags, links=links { microsoftIISLogs+:: {} }, annotations=annotations, timezone=timezone, refresh=refresh, period=period), + }, + panels+: + { + logs+: + g.panel.logs.options.withEnableLogDetails(true) + + g.panel.logs.options.withShowTime(false) + + g.panel.logs.options.withWrapLogMessage(false), + }, + variables+: { + toArray+: [ + this.grafana.variables.datasources.prometheus { hide: 2 }, + ], + }, + }.dashboards.logs, + } else {}, + + applyCommon(vars, uid, tags, links, annotations, timezone, refresh, period): + g.dashboard.withTags(tags) + + g.dashboard.withUid(uid) + + g.dashboard.withLinks(std.objectValues(links)) + + g.dashboard.withTimezone(timezone) + + g.dashboard.withRefresh(refresh) + + g.dashboard.time.withFrom(period) + + g.dashboard.withVariables(vars) + + g.dashboard.withAnnotations(std.objectValues(annotations)), +} diff --git a/microsoft-iis-mixin/dashboards/dashboards.libsonnet b/microsoft-iis-mixin/dashboards/dashboards.libsonnet deleted file mode 100644 index c63609b23..000000000 --- a/microsoft-iis-mixin/dashboards/dashboards.libsonnet +++ /dev/null @@ -1,2 +0,0 @@ -(import 'microsoft-iis-overview.libsonnet') + -(import 'microsoft-iis-applications.libsonnet') diff --git a/microsoft-iis-mixin/dashboards/microsoft-iis-applications.libsonnet b/microsoft-iis-mixin/dashboards/microsoft-iis-applications.libsonnet deleted file mode 100644 index c53ab4cec..000000000 --- a/microsoft-iis-mixin/dashboards/microsoft-iis-applications.libsonnet +++ /dev/null @@ -1,1306 +0,0 @@ -local grafana = (import 'grafonnet/grafana.libsonnet'); -local dashboard = grafana.dashboard; -local template = grafana.template; -local prometheus = grafana.prometheus; - -local dashboardUid = 'microsoft-iis-applications'; - -local promDatasourceName = 'prometheus_datasource'; - -local promDatasource = { - uid: '${%s}' % promDatasourceName, -}; - -local requestsPanel = { - datasource: promDatasource, - targets: [ - prometheus.target( - 'sum by(app, job, instance) (rate(windows_iis_worker_requests_total{job=~"$job", instance=~"$instance", app=~"$application"}[$__rate_interval]))', - datasource=promDatasource, - legendFormat='{{instance}} - {{app}}', - ), - ], - type: 'timeseries', - title: 'Requests', - description: 'The HTTP request rate for an IIS application.', - fieldConfig: { - defaults: { - color: { - mode: 'palette-classic', - }, - custom: { - axisCenteredZero: false, - axisColorMode: 'text', - axisLabel: '', - axisPlacement: 'auto', - barAlignment: 0, - drawStyle: 'line', - fillOpacity: 0, - gradientMode: 'none', - hideFrom: { - legend: false, - tooltip: false, - viz: false, - }, - lineInterpolation: 'linear', - lineWidth: 1, - pointSize: 5, - scaleDistribution: { - type: 'linear', - }, - showPoints: 'auto', - spanNulls: false, - stacking: { - group: 'A', - mode: 'none', - }, - thresholdsStyle: { - mode: 'off', - }, - }, - mappings: [], - thresholds: { - mode: 'absolute', - steps: [ - { - color: 'green', - value: null, - }, - { - color: 'red', - value: 80, - }, - ], - }, - unit: 'reqps', - }, - overrides: [], - }, - options: { - legend: { - calcs: [], - displayMode: 'list', - placement: 'bottom', - showLegend: true, - }, - tooltip: { - mode: 'single', - sort: 'none', - }, - }, -}; - -local requestErrorsPanel = { - datasource: promDatasource, - targets: [ - prometheus.target( - 'sum by(app, instance, job, status_code) (rate(windows_iis_worker_request_errors_total{job=~"$job", instance=~"$instance", app=~"$application"}[$__rate_interval]))', - datasource=promDatasource, - legendFormat='{{instance}} - {{app}} - {{status_code}}', - ), - ], - type: 'timeseries', - title: 'Request errors', - description: 'Requests that have resulted in errors for an IIS application.', - fieldConfig: { - defaults: { - color: { - mode: 'palette-classic', - }, - custom: { - axisCenteredZero: false, - axisColorMode: 'text', - axisLabel: '', - axisPlacement: 'auto', - barAlignment: 0, - drawStyle: 'line', - fillOpacity: 0, - gradientMode: 'none', - hideFrom: { - legend: false, - tooltip: false, - viz: false, - }, - lineInterpolation: 'linear', - lineWidth: 1, - pointSize: 5, - scaleDistribution: { - type: 'linear', - }, - showPoints: 'auto', - spanNulls: false, - stacking: { - group: 'A', - mode: 'normal', - }, - thresholdsStyle: { - mode: 'off', - }, - }, - mappings: [], - thresholds: { - mode: 'absolute', - steps: [ - { - color: 'green', - value: null, - }, - { - color: 'red', - value: 80, - }, - ], - }, - unit: 'reqps', - }, - overrides: [], - }, - options: { - legend: { - calcs: [], - displayMode: 'list', - placement: 'right', - showLegend: true, - }, - tooltip: { - mode: 'single', - sort: 'none', - }, - }, -}; - -local websocketConnectionAttemptsPanel = { - datasource: promDatasource, - targets: [ - prometheus.target( - 'sum by(app, instance, job) (increase(windows_iis_worker_websocket_connection_attempts_total{job=~"$job", instance=~"$instance", app=~"$application"}[$__interval:]))', - datasource=promDatasource, - legendFormat='{{instance}} - {{app}}', - interval='1m', - ), - ], - type: 'timeseries', - title: 'Websocket connection attempts', - description: 'The number of attempted websocket connections for an IIS application.', - fieldConfig: { - defaults: { - color: { - mode: 'palette-classic', - }, - custom: { - axisCenteredZero: false, - axisColorMode: 'text', - axisLabel: '', - axisPlacement: 'auto', - barAlignment: 0, - drawStyle: 'line', - fillOpacity: 0, - gradientMode: 'none', - hideFrom: { - legend: false, - tooltip: false, - viz: false, - }, - lineInterpolation: 'linear', - lineWidth: 1, - pointSize: 5, - scaleDistribution: { - type: 'linear', - }, - showPoints: 'auto', - spanNulls: false, - stacking: { - group: 'A', - mode: 'none', - }, - thresholdsStyle: { - mode: 'off', - }, - }, - mappings: [], - thresholds: { - mode: 'absolute', - steps: [ - { - color: 'green', - value: null, - }, - { - color: 'red', - value: 80, - }, - ], - }, - }, - overrides: [], - }, - options: { - legend: { - calcs: [], - displayMode: 'list', - placement: 'bottom', - showLegend: true, - }, - tooltip: { - mode: 'single', - sort: 'none', - }, - }, -}; - -local websocketConnectionSuccessRatePanel = { - datasource: promDatasource, - targets: [ - prometheus.target( - 'sum by(app, job, instance) (increase(windows_iis_worker_websocket_connection_accepted_total{job=~"$job", instance=~"$instance", app=~"$application"}[$__interval:]) / clamp_min(increase(windows_iis_worker_websocket_connection_attempts_total{job=~"$job", instance=~"$instance", app=~"$application"}[$__interval:]),1)) * 100', - datasource=promDatasource, - legendFormat='{{instance}} - {{app}}', - interval='1m', - ), - ], - type: 'timeseries', - title: 'Websocket connection success rate', - description: 'The success rate of websocket connection attempts for an IIS application.', - fieldConfig: { - defaults: { - color: { - mode: 'palette-classic', - }, - custom: { - axisCenteredZero: false, - axisColorMode: 'text', - axisLabel: '', - axisPlacement: 'auto', - barAlignment: 0, - drawStyle: 'line', - fillOpacity: 0, - gradientMode: 'none', - hideFrom: { - legend: false, - tooltip: false, - viz: false, - }, - lineInterpolation: 'linear', - lineWidth: 1, - pointSize: 5, - scaleDistribution: { - type: 'linear', - }, - showPoints: 'auto', - spanNulls: false, - stacking: { - group: 'A', - mode: 'none', - }, - thresholdsStyle: { - mode: 'off', - }, - }, - mappings: [], - thresholds: { - mode: 'absolute', - steps: [ - { - color: 'green', - value: null, - }, - { - color: 'red', - value: 80, - }, - ], - }, - unit: 'percent', - }, - overrides: [], - }, - options: { - legend: { - calcs: [], - displayMode: 'list', - placement: 'bottom', - showLegend: true, - }, - tooltip: { - mode: 'single', - sort: 'none', - }, - }, -}; - -local currentWorkerThreadsPanel = { - datasource: promDatasource, - targets: [ - prometheus.target( - 'sum by(app, instance, job, state) (windows_iis_worker_threads{job=~"$job", instance=~"$instance", app=~"$application"})', - datasource=promDatasource, - legendFormat='{{instance}} - {{app}} - {{state}}', - ), - ], - type: 'timeseries', - title: 'Current worker threads', - description: 'The current number of worker threads processing requests for an IIS application.', - fieldConfig: { - defaults: { - color: { - mode: 'palette-classic', - }, - custom: { - axisCenteredZero: false, - axisColorMode: 'text', - axisLabel: '', - axisPlacement: 'auto', - barAlignment: 0, - drawStyle: 'line', - fillOpacity: 0, - gradientMode: 'none', - hideFrom: { - legend: false, - tooltip: false, - viz: false, - }, - lineInterpolation: 'linear', - lineWidth: 1, - pointSize: 5, - scaleDistribution: { - type: 'linear', - }, - showPoints: 'auto', - spanNulls: false, - stacking: { - group: 'A', - mode: 'none', - }, - thresholdsStyle: { - mode: 'off', - }, - }, - mappings: [], - thresholds: { - mode: 'absolute', - steps: [ - { - color: 'green', - value: null, - }, - { - color: 'red', - value: 80, - }, - ], - }, - }, - overrides: [], - }, - options: { - legend: { - calcs: [], - displayMode: 'list', - placement: 'bottom', - showLegend: true, - }, - tooltip: { - mode: 'single', - sort: 'none', - }, - }, -}; - -local threadPoolUtilizationPanel = { - datasource: promDatasource, - targets: [ - prometheus.target( - 'sum by (job, instance, app) (windows_iis_worker_threads{job=~"$job", instance=~"$instance", app=~"$application"})/ clamp_min(sum by (job, instance, app) (windows_iis_worker_max_threads{job=~"$job", instance=~"$instance", app=~"$application"}),1) * 100', - datasource=promDatasource, - legendFormat='{{instance}} - {{app}}', - ), - ], - type: 'timeseries', - title: 'Thread pool utilization', - description: 'The current application thread pool utilization for an IIS application.', - fieldConfig: { - defaults: { - color: { - mode: 'palette-classic', - }, - custom: { - axisCenteredZero: false, - axisColorMode: 'text', - axisLabel: '', - axisPlacement: 'auto', - barAlignment: 0, - drawStyle: 'line', - fillOpacity: 0, - gradientMode: 'none', - hideFrom: { - legend: false, - tooltip: false, - viz: false, - }, - lineInterpolation: 'linear', - lineWidth: 1, - pointSize: 5, - scaleDistribution: { - type: 'linear', - }, - showPoints: 'auto', - spanNulls: false, - stacking: { - group: 'A', - mode: 'none', - }, - thresholdsStyle: { - mode: 'off', - }, - }, - mappings: [], - thresholds: { - mode: 'absolute', - steps: [ - { - color: 'green', - value: null, - }, - { - color: 'red', - value: 80, - }, - ], - }, - unit: 'percent', - }, - overrides: [], - }, - options: { - legend: { - calcs: [], - displayMode: 'list', - placement: 'bottom', - showLegend: true, - }, - tooltip: { - mode: 'single', - sort: 'none', - }, - }, -}; - -local workerProcessesRow = { - datasource: promDatasource, - targets: [], - type: 'row', - title: 'Worker processes', - collapsed: false, -}; - -local currentWorkerProcessesPanel = { - datasource: promDatasource, - targets: [ - prometheus.target( - 'sum by(app, job, instance) (windows_iis_current_worker_processes{job=~"$job", instance=~"$instance", app=~"$application"})', - datasource=promDatasource, - legendFormat='{{instance}} - {{app}}', - ), - ], - type: 'timeseries', - title: 'Current worker processes', - description: 'The current number of worker processes processing requests for an IIS application.', - fieldConfig: { - defaults: { - color: { - mode: 'palette-classic', - }, - custom: { - axisCenteredZero: false, - axisColorMode: 'text', - axisLabel: '', - axisPlacement: 'auto', - barAlignment: 0, - drawStyle: 'line', - fillOpacity: 0, - gradientMode: 'none', - hideFrom: { - legend: false, - tooltip: false, - viz: false, - }, - lineInterpolation: 'linear', - lineWidth: 1, - pointSize: 5, - scaleDistribution: { - type: 'linear', - }, - showPoints: 'auto', - spanNulls: false, - stacking: { - group: 'A', - mode: 'none', - }, - thresholdsStyle: { - mode: 'off', - }, - }, - mappings: [], - thresholds: { - mode: 'absolute', - steps: [ - { - color: 'green', - value: null, - }, - { - color: 'red', - value: 80, - }, - ], - }, - }, - overrides: [], - }, - options: { - legend: { - calcs: [], - displayMode: 'list', - placement: 'bottom', - showLegend: true, - }, - tooltip: { - mode: 'single', - sort: 'none', - }, - }, -}; - -local workerProcessFailuresPanel = { - datasource: promDatasource, - targets: [ - prometheus.target( - 'increase(windows_iis_total_worker_process_failures{job=~"$job", instance=~"$instance", app=~"$application"}[$__interval:])', - datasource=promDatasource, - legendFormat='{{instance}} - {{app}}', - interval='1m', - ), - ], - type: 'timeseries', - title: 'Worker process failures', - description: 'The number of worker process failures for an IIS application.', - fieldConfig: { - defaults: { - color: { - mode: 'palette-classic', - }, - custom: { - axisCenteredZero: false, - axisColorMode: 'text', - axisLabel: '', - axisPlacement: 'auto', - barAlignment: 0, - drawStyle: 'line', - fillOpacity: 0, - gradientMode: 'none', - hideFrom: { - legend: false, - tooltip: false, - viz: false, - }, - lineInterpolation: 'linear', - lineWidth: 1, - pointSize: 5, - scaleDistribution: { - type: 'linear', - }, - showPoints: 'auto', - spanNulls: false, - stacking: { - group: 'A', - mode: 'none', - }, - thresholdsStyle: { - mode: 'off', - }, - }, - mappings: [], - thresholds: { - mode: 'absolute', - steps: [ - { - color: 'green', - value: null, - }, - { - color: 'red', - value: 80, - }, - ], - }, - }, - overrides: [], - }, - options: { - legend: { - calcs: [], - displayMode: 'list', - placement: 'bottom', - showLegend: true, - }, - tooltip: { - mode: 'single', - sort: 'none', - }, - }, -}; - -local workerProcessStartupFailuresPanel = { - datasource: promDatasource, - targets: [ - prometheus.target( - 'increase(windows_iis_total_worker_process_startup_failures{job=~"$job", instance=~"$instance", app=~"$application"}[$__interval:])', - datasource=promDatasource, - legendFormat='{{instance}} - {{app}}', - interval='1m', - ), - ], - type: 'timeseries', - title: 'Worker process startup failures', - description: 'The number of worker process startup failures for an IIS application.', - fieldConfig: { - defaults: { - color: { - mode: 'palette-classic', - }, - custom: { - axisCenteredZero: false, - axisColorMode: 'text', - axisLabel: '', - axisPlacement: 'auto', - barAlignment: 0, - drawStyle: 'line', - fillOpacity: 0, - gradientMode: 'none', - hideFrom: { - legend: false, - tooltip: false, - viz: false, - }, - lineInterpolation: 'linear', - lineWidth: 1, - pointSize: 5, - scaleDistribution: { - type: 'linear', - }, - showPoints: 'auto', - spanNulls: false, - stacking: { - group: 'A', - mode: 'none', - }, - thresholdsStyle: { - mode: 'off', - }, - }, - mappings: [], - min: 0, - thresholds: { - mode: 'absolute', - steps: [ - { - color: 'green', - value: null, - }, - { - color: 'red', - value: 80, - }, - ], - }, - }, - overrides: [], - }, - options: { - legend: { - calcs: [], - displayMode: 'list', - placement: 'bottom', - showLegend: true, - }, - tooltip: { - mode: 'single', - sort: 'none', - }, - }, -}; - -local workerProcessShutdownFailuresPanel = { - datasource: promDatasource, - targets: [ - prometheus.target( - 'increase(windows_iis_total_worker_process_shutdown_failures{job=~"$job", instance=~"$instance", app=~"$application"}[$__interval:])', - datasource=promDatasource, - legendFormat='{{instance}} - {{app}}', - interval='1m', - ), - ], - type: 'timeseries', - title: 'Worker process shutdown failures', - description: 'The number of worker process shutdown failures for an IIS application.', - fieldConfig: { - defaults: { - color: { - mode: 'palette-classic', - }, - custom: { - axisCenteredZero: false, - axisColorMode: 'text', - axisLabel: '', - axisPlacement: 'auto', - barAlignment: 0, - drawStyle: 'line', - fillOpacity: 0, - gradientMode: 'none', - hideFrom: { - legend: false, - tooltip: false, - viz: false, - }, - lineInterpolation: 'linear', - lineWidth: 1, - pointSize: 5, - scaleDistribution: { - type: 'linear', - }, - showPoints: 'auto', - spanNulls: false, - stacking: { - group: 'A', - mode: 'none', - }, - thresholdsStyle: { - mode: 'off', - }, - }, - mappings: [], - thresholds: { - mode: 'absolute', - steps: [ - { - color: 'green', - value: null, - }, - { - color: 'red', - value: 80, - }, - ], - }, - }, - overrides: [], - }, - options: { - legend: { - calcs: [], - displayMode: 'list', - placement: 'bottom', - showLegend: true, - }, - tooltip: { - mode: 'single', - sort: 'none', - }, - }, -}; - -local workerProcessPingFailuresPanel = { - datasource: promDatasource, - targets: [ - prometheus.target( - 'increase(windows_iis_total_worker_process_ping_failures{job=~"$job", instance=~"$instance", app=~"$application"}[$__interval:])', - datasource=promDatasource, - legendFormat='{{instance}} - {{app}}', - interval='1m', - ), - ], - type: 'timeseries', - title: 'Worker process ping failures', - description: 'The number of worker process ping failures for an IIS application.', - fieldConfig: { - defaults: { - color: { - mode: 'palette-classic', - }, - custom: { - axisCenteredZero: false, - axisColorMode: 'text', - axisLabel: '', - axisPlacement: 'auto', - barAlignment: 0, - drawStyle: 'line', - fillOpacity: 0, - gradientMode: 'none', - hideFrom: { - legend: false, - tooltip: false, - viz: false, - }, - lineInterpolation: 'linear', - lineWidth: 1, - pointSize: 5, - scaleDistribution: { - type: 'linear', - }, - showPoints: 'auto', - spanNulls: false, - stacking: { - group: 'A', - mode: 'none', - }, - thresholdsStyle: { - mode: 'off', - }, - }, - mappings: [], - thresholds: { - mode: 'absolute', - steps: [ - { - color: 'green', - value: null, - }, - { - color: 'red', - value: 80, - }, - ], - }, - }, - overrides: [], - }, - options: { - legend: { - calcs: [], - displayMode: 'list', - placement: 'bottom', - showLegend: true, - }, - tooltip: { - mode: 'single', - sort: 'none', - }, - }, -}; - -local cacheRow = { - datasource: promDatasource, - targets: [], - type: 'row', - title: 'Cache', - collapsed: false, -}; - -local fileCacheHitRatioPanel = { - datasource: promDatasource, - targets: [ - prometheus.target( - 'sum by(job, instance, app) (increase(windows_iis_worker_file_cache_hits_total{job=~"$job", instance=~"$instance", app=~"$application"}[$__interval:]) / clamp_min(increase(windows_iis_worker_file_cache_queries_total{job=~"$job", instance=~"$instance", app=~"$application"}[$__interval:]),1)) * 100', - datasource=promDatasource, - legendFormat='{{instance}} - {{app}}', - interval='1m', - ), - ], - type: 'timeseries', - title: 'File cache hit ratio', - description: 'The current file cache hit ratio for an IIS application.', - fieldConfig: { - defaults: { - color: { - mode: 'palette-classic', - }, - custom: { - axisCenteredZero: false, - axisColorMode: 'text', - axisLabel: '', - axisPlacement: 'auto', - barAlignment: 0, - drawStyle: 'line', - fillOpacity: 0, - gradientMode: 'none', - hideFrom: { - legend: false, - tooltip: false, - viz: false, - }, - lineInterpolation: 'linear', - lineWidth: 1, - pointSize: 5, - scaleDistribution: { - type: 'linear', - }, - showPoints: 'auto', - spanNulls: false, - stacking: { - group: 'A', - mode: 'none', - }, - thresholdsStyle: { - mode: 'off', - }, - }, - mappings: [], - min: 0, - thresholds: { - mode: 'absolute', - steps: [ - { - color: 'green', - value: null, - }, - { - color: 'red', - value: 80, - }, - ], - }, - unit: 'percent', - }, - overrides: [], - }, - options: { - legend: { - calcs: [], - displayMode: 'list', - placement: 'bottom', - showLegend: true, - }, - tooltip: { - mode: 'single', - sort: 'none', - }, - }, -}; - -local uriCacheHitRatioPanel = { - datasource: promDatasource, - targets: [ - prometheus.target( - 'sum by(instance, job, app) (increase(windows_iis_worker_uri_cache_hits_total{job=~"$job", instance=~"$instance", app=~"$application"}[$__interval:]) / clamp_min(increase(windows_iis_worker_uri_cache_queries_total{job=~"$job", instance=~"$instance", app=~"$application"}[$__interval:]),1)) * 100', - datasource=promDatasource, - legendFormat='{{instance}} - {{app}}', - interval='1m', - ), - ], - type: 'timeseries', - title: 'URI cache hit ratio', - description: 'The current URI cache hit ratio for an IIS application.', - fieldConfig: { - defaults: { - color: { - mode: 'palette-classic', - }, - custom: { - axisCenteredZero: false, - axisColorMode: 'text', - axisLabel: '', - axisPlacement: 'auto', - barAlignment: 0, - drawStyle: 'line', - fillOpacity: 0, - gradientMode: 'none', - hideFrom: { - legend: false, - tooltip: false, - viz: false, - }, - lineInterpolation: 'linear', - lineWidth: 1, - pointSize: 5, - scaleDistribution: { - type: 'linear', - }, - showPoints: 'auto', - spanNulls: false, - stacking: { - group: 'A', - mode: 'none', - }, - thresholdsStyle: { - mode: 'off', - }, - }, - mappings: [], - thresholds: { - mode: 'absolute', - steps: [ - { - color: 'green', - value: null, - }, - { - color: 'red', - value: 80, - }, - ], - }, - unit: 'percent', - }, - overrides: [], - }, - options: { - legend: { - calcs: [], - displayMode: 'list', - placement: 'bottom', - showLegend: true, - }, - tooltip: { - mode: 'single', - sort: 'none', - }, - }, -}; - -local metadataCacheHitRatioPanel = { - datasource: promDatasource, - targets: [ - prometheus.target( - 'sum by(job, instance, app)(increase(windows_iis_worker_metadata_cache_hits_total{job=~"$job", instance=~"$instance", app=~"$application"}[$__interval:]) / clamp_min(increase(windows_iis_worker_metadata_cache_queries_total{job=~"$job", instance=~"$instance", app=~"$application"}[$__interval:]),1)) * 100', - datasource=promDatasource, - legendFormat='{{instance}} - {{app}}', - interval='1m', - ), - ], - type: 'timeseries', - title: 'Metadata cache hit ratio', - description: 'The current metadata cache hit ratio for an IIS site.', - fieldConfig: { - defaults: { - color: { - mode: 'palette-classic', - }, - custom: { - axisCenteredZero: false, - axisColorMode: 'text', - axisLabel: '', - axisPlacement: 'auto', - barAlignment: 0, - drawStyle: 'line', - fillOpacity: 0, - gradientMode: 'none', - hideFrom: { - legend: false, - tooltip: false, - viz: false, - }, - lineInterpolation: 'linear', - lineWidth: 1, - pointSize: 5, - scaleDistribution: { - type: 'linear', - }, - showPoints: 'auto', - spanNulls: false, - stacking: { - group: 'A', - mode: 'none', - }, - thresholdsStyle: { - mode: 'off', - }, - }, - mappings: [], - thresholds: { - mode: 'absolute', - steps: [ - { - color: 'green', - value: null, - }, - { - color: 'red', - value: 80, - }, - ], - }, - unit: 'percent', - }, - overrides: [], - }, - options: { - legend: { - calcs: [], - displayMode: 'list', - placement: 'bottom', - showLegend: true, - }, - tooltip: { - mode: 'single', - sort: 'none', - }, - }, -}; - -local outputCacheHitRatioPanel = { - datasource: promDatasource, - targets: [ - prometheus.target( - 'sum by(job, instance, app) (increase(windows_iis_worker_output_cache_hits_total{job=~"$job", instance=~"$instance", app=~"$application"}[$__interval:]) / clamp_min(increase(windows_iis_worker_output_queries_total{job=~"$job", instance=~"$instance", app=~"$application"}[$__interval:]),1))', - datasource=promDatasource, - legendFormat='{{instance}} - {{app}}', - interval='1m', - ), - ], - type: 'timeseries', - title: 'Output cache hit ratio', - description: 'The current output cache hit ratio for an IIS application.', - fieldConfig: { - defaults: { - color: { - mode: 'palette-classic', - }, - custom: { - axisCenteredZero: false, - axisColorMode: 'text', - axisLabel: '', - axisPlacement: 'auto', - barAlignment: 0, - drawStyle: 'line', - fillOpacity: 0, - gradientMode: 'none', - hideFrom: { - legend: false, - tooltip: false, - viz: false, - }, - lineInterpolation: 'linear', - lineWidth: 1, - pointSize: 5, - scaleDistribution: { - type: 'linear', - }, - showPoints: 'auto', - spanNulls: false, - stacking: { - group: 'A', - mode: 'none', - }, - thresholdsStyle: { - mode: 'off', - }, - }, - mappings: [], - thresholds: { - mode: 'absolute', - steps: [ - { - color: 'green', - value: null, - }, - { - color: 'red', - value: 80, - }, - ], - }, - unit: 'percent', - }, - overrides: [], - }, - options: { - legend: { - calcs: [], - displayMode: 'list', - placement: 'bottom', - showLegend: true, - }, - tooltip: { - mode: 'single', - sort: 'none', - }, - }, -}; - -{ - grafanaDashboards+:: { - 'microsoft-iis-applications.json': - dashboard.new( - 'Microsoft IIS applications', - time_from='%s' % $._config.dashboardPeriod, - tags=($._config.dashboardTags), - timezone='%s' % $._config.dashboardTimezone, - refresh='%s' % $._config.dashboardRefresh, - description='', - uid=dashboardUid, - ) - .addLink(grafana.link.dashboards( - asDropdown=false, - title='Other Microsoft IIS dashboards', - includeVars=true, - keepTime=true, - tags=($._config.dashboardTags), - )) - .addTemplates( - [ - template.datasource( - promDatasourceName, - 'prometheus', - null, - label='Data Source', - refresh='load' - ), - template.new( - 'job', - promDatasource, - 'label_values(windows_iis_requests_total{},job)', - label='Job', - refresh=2, - includeAll=true, - multi=true, - allValues='.+', - sort=0 - ), - template.new( - 'instance', - promDatasource, - 'label_values(windows_iis_requests_total{job=~"$job"},instance)', - label='Instance', - refresh=1, - includeAll=true, - multi=true, - allValues='', - sort=0 - ), - template.new( - 'application', - promDatasource, - 'label_values(windows_iis_current_application_pool_state{job=~"$job", instance=~"$instance"},app)', - label='Application', - refresh=1, - includeAll=true, - multi=true, - allValues='.+', - sort=0 - ), - ] - ) - .addPanels( - [ - requestsPanel { gridPos: { h: 8, w: 12, x: 0, y: 0 } }, - requestErrorsPanel { gridPos: { h: 8, w: 12, x: 12, y: 0 } }, - websocketConnectionAttemptsPanel { gridPos: { h: 8, w: 12, x: 0, y: 8 } }, - websocketConnectionSuccessRatePanel { gridPos: { h: 8, w: 12, x: 12, y: 8 } }, - currentWorkerThreadsPanel { gridPos: { h: 8, w: 12, x: 0, y: 16 } }, - threadPoolUtilizationPanel { gridPos: { h: 8, w: 12, x: 12, y: 16 } }, - workerProcessesRow { gridPos: { h: 1, w: 24, x: 0, y: 24 } }, - currentWorkerProcessesPanel { gridPos: { h: 8, w: 12, x: 0, y: 25 } }, - workerProcessFailuresPanel { gridPos: { h: 8, w: 12, x: 12, y: 25 } }, - workerProcessStartupFailuresPanel { gridPos: { h: 8, w: 8, x: 0, y: 33 } }, - workerProcessShutdownFailuresPanel { gridPos: { h: 8, w: 8, x: 8, y: 33 } }, - workerProcessPingFailuresPanel { gridPos: { h: 8, w: 8, x: 16, y: 33 } }, - cacheRow { gridPos: { h: 1, w: 24, x: 0, y: 41 } }, - fileCacheHitRatioPanel { gridPos: { h: 8, w: 12, x: 0, y: 42 } }, - uriCacheHitRatioPanel { gridPos: { h: 8, w: 12, x: 12, y: 42 } }, - metadataCacheHitRatioPanel { gridPos: { h: 8, w: 12, x: 0, y: 50 } }, - outputCacheHitRatioPanel { gridPos: { h: 8, w: 12, x: 12, y: 50 } }, - ] - ), - - }, -} diff --git a/microsoft-iis-mixin/dashboards/microsoft-iis-overview.libsonnet b/microsoft-iis-mixin/dashboards/microsoft-iis-overview.libsonnet deleted file mode 100644 index 4ba02588b..000000000 --- a/microsoft-iis-mixin/dashboards/microsoft-iis-overview.libsonnet +++ /dev/null @@ -1,1280 +0,0 @@ -local grafana = (import 'grafonnet/grafana.libsonnet'); -local dashboard = grafana.dashboard; -local template = grafana.template; -local prometheus = grafana.prometheus; - -local dashboardUid = 'microsoft-iis-overview'; - -local promDatasourceName = 'prometheus_datasource'; -local lokiDatasourceName = 'loki_datasource'; - -local promDatasource = { - uid: '${%s}' % promDatasourceName, -}; - -local lokiDatasource = { - uid: '${%s}' % lokiDatasourceName, -}; - -local requestsPanel = { - datasource: promDatasource, - targets: [ - prometheus.target( - 'rate(windows_iis_requests_total{job=~"$job", instance=~"$instance", site=~"$site"}[$__rate_interval])', - datasource=promDatasource, - legendFormat='{{site}} - {{method}}', - ), - ], - type: 'timeseries', - title: 'Requests', - description: 'The request rate split by HTTP Method for an IIS site', - fieldConfig: { - defaults: { - color: { - mode: 'palette-classic', - }, - custom: { - axisCenteredZero: false, - axisColorMode: 'text', - axisLabel: '', - axisPlacement: 'auto', - barAlignment: 0, - drawStyle: 'line', - fillOpacity: 0, - gradientMode: 'none', - hideFrom: { - legend: false, - tooltip: false, - viz: false, - }, - lineInterpolation: 'linear', - lineWidth: 1, - pointSize: 5, - scaleDistribution: { - type: 'linear', - }, - showPoints: 'auto', - spanNulls: false, - stacking: { - group: 'A', - mode: 'normal', - }, - thresholdsStyle: { - mode: 'off', - }, - }, - mappings: [], - thresholds: { - mode: 'absolute', - steps: [ - { - color: 'green', - value: null, - }, - { - color: 'red', - value: 80, - }, - ], - }, - unit: 'reqps', - }, - overrides: [], - }, - options: { - legend: { - calcs: [], - displayMode: 'list', - placement: 'right', - showLegend: true, - }, - tooltip: { - mode: 'single', - sort: 'none', - }, - }, -}; - -local requestErrorsPanel = { - datasource: promDatasource, - targets: [ - prometheus.target( - 'rate(windows_iis_locked_errors_total{job=~"$job", instance=~"$instance", site=~"$site"}[$__rate_interval])', - datasource=promDatasource, - legendFormat='{{site}} - locked', - ), - prometheus.target( - 'rate(windows_iis_not_found_errors_total{job=~"$job", instance=~"$instance", site=~"$site"}[$__rate_interval])', - datasource=promDatasource, - legendFormat='{{site}} - not found', - ), - ], - type: 'timeseries', - title: 'Request errors', - description: 'Requests that have resulted in errors for an IIS site.', - fieldConfig: { - defaults: { - color: { - mode: 'palette-classic', - }, - custom: { - axisCenteredZero: false, - axisColorMode: 'text', - axisLabel: '', - axisPlacement: 'auto', - barAlignment: 0, - drawStyle: 'line', - fillOpacity: 0, - gradientMode: 'none', - hideFrom: { - legend: false, - tooltip: false, - viz: false, - }, - lineInterpolation: 'linear', - lineWidth: 1, - pointSize: 5, - scaleDistribution: { - type: 'linear', - }, - showPoints: 'auto', - spanNulls: false, - stacking: { - group: 'A', - mode: 'none', - }, - thresholdsStyle: { - mode: 'off', - }, - }, - mappings: [], - thresholds: { - mode: 'absolute', - steps: [ - { - color: 'green', - value: null, - }, - { - color: 'red', - value: 80, - }, - ], - }, - unit: 'errors/sec', - }, - overrides: [], - }, - options: { - legend: { - calcs: [], - displayMode: 'list', - placement: 'bottom', - showLegend: true, - }, - tooltip: { - mode: 'single', - sort: 'none', - }, - }, -}; - -local blockedAsyncIORequestsPanel = { - datasource: promDatasource, - targets: [ - prometheus.target( - 'increase(windows_iis_blocked_async_io_requests_total{job=~"$job", instance=~"$instance", site=~"$site"}[$__interval:])', - datasource=promDatasource, - legendFormat='{{instance}} - {{site}}', - interval='1m', - ), - ], - type: 'timeseries', - title: 'Blocked async I/O requests', - description: 'Number of async I/O requests that are currently queued for an IIS site.', - fieldConfig: { - defaults: { - color: { - mode: 'palette-classic', - }, - custom: { - axisCenteredZero: false, - axisColorMode: 'text', - axisLabel: '', - axisPlacement: 'auto', - barAlignment: 0, - drawStyle: 'line', - fillOpacity: 0, - gradientMode: 'none', - hideFrom: { - legend: false, - tooltip: false, - viz: false, - }, - lineInterpolation: 'linear', - lineWidth: 1, - pointSize: 5, - scaleDistribution: { - type: 'linear', - }, - showPoints: 'auto', - spanNulls: false, - stacking: { - group: 'A', - mode: 'none', - }, - thresholdsStyle: { - mode: 'off', - }, - }, - mappings: [], - min: 0, - thresholds: { - mode: 'absolute', - steps: [ - { - color: 'green', - value: null, - }, - { - color: 'red', - value: 80, - }, - ], - }, - unit: 'requests', - }, - overrides: [], - }, - options: { - legend: { - calcs: [], - displayMode: 'list', - placement: 'bottom', - showLegend: true, - }, - tooltip: { - mode: 'none', - sort: 'none', - }, - }, -}; - -local rejectedAsyncIORequestsPanel = { - datasource: promDatasource, - targets: [ - prometheus.target( - 'increase(windows_iis_rejected_async_io_requests_total{job=~"$job", instance=~"$instance", site=~"$site"}[$__interval:])', - datasource=promDatasource, - legendFormat='{{instance}} - {{site}}', - interval='1m', - ), - ], - type: 'timeseries', - title: 'Rejected async I/O requests', - description: 'Number of async I/O requests that have been rejected for an IIS site.', - fieldConfig: { - defaults: { - color: { - mode: 'palette-classic', - }, - custom: { - axisCenteredZero: false, - axisColorMode: 'text', - axisLabel: '', - axisPlacement: 'auto', - barAlignment: 0, - drawStyle: 'line', - fillOpacity: 0, - gradientMode: 'none', - hideFrom: { - legend: false, - tooltip: false, - viz: false, - }, - lineInterpolation: 'linear', - lineWidth: 1, - pointSize: 5, - scaleDistribution: { - type: 'linear', - }, - showPoints: 'auto', - spanNulls: false, - stacking: { - group: 'A', - mode: 'none', - }, - thresholdsStyle: { - mode: 'off', - }, - }, - mappings: [], - min: 0, - thresholds: { - mode: 'absolute', - steps: [ - { - color: 'green', - value: null, - }, - { - color: 'red', - value: 80, - }, - ], - }, - unit: 'requests', - }, - overrides: [], - }, - options: { - legend: { - calcs: [], - displayMode: 'list', - placement: 'bottom', - showLegend: true, - }, - tooltip: { - mode: 'single', - sort: 'none', - }, - }, -}; - -local trafficSentPanel = { - datasource: promDatasource, - targets: [ - prometheus.target( - 'rate(windows_iis_sent_bytes_total{job=~"$job", instance=~"$instance", site=~"$site"}[$__rate_interval])', - datasource=promDatasource, - legendFormat='{{instance}} - {{site}}', - ), - ], - type: 'timeseries', - title: 'Traffic sent', - description: 'The traffic sent by an IIS site.', - fieldConfig: { - defaults: { - color: { - mode: 'palette-classic', - }, - custom: { - axisCenteredZero: false, - axisColorMode: 'text', - axisLabel: '', - axisPlacement: 'auto', - barAlignment: 0, - drawStyle: 'line', - fillOpacity: 0, - gradientMode: 'none', - hideFrom: { - legend: false, - tooltip: false, - viz: false, - }, - lineInterpolation: 'linear', - lineWidth: 1, - pointSize: 5, - scaleDistribution: { - type: 'linear', - }, - showPoints: 'auto', - spanNulls: false, - stacking: { - group: 'A', - mode: 'none', - }, - thresholdsStyle: { - mode: 'off', - }, - }, - mappings: [], - thresholds: { - mode: 'absolute', - steps: [ - { - color: 'green', - value: null, - }, - { - color: 'red', - value: 80, - }, - ], - }, - unit: 'Bps', - }, - overrides: [], - }, - options: { - legend: { - calcs: [], - displayMode: 'list', - placement: 'bottom', - showLegend: true, - }, - tooltip: { - mode: 'single', - sort: 'none', - }, - }, -}; - -local trafficReceivedPanel = { - datasource: promDatasource, - targets: [ - prometheus.target( - 'rate(windows_iis_received_bytes_total{job=~"$job", instance=~"$instance", site=~"$site"}[$__rate_interval])', - datasource=promDatasource, - legendFormat='{{instance}} - {{site}}', - ), - ], - type: 'timeseries', - title: 'Traffic received', - description: 'The traffic received by an IIS site.', - fieldConfig: { - defaults: { - color: { - mode: 'palette-classic', - }, - custom: { - axisCenteredZero: false, - axisColorMode: 'text', - axisLabel: '', - axisPlacement: 'auto', - barAlignment: 0, - drawStyle: 'line', - fillOpacity: 0, - gradientMode: 'none', - hideFrom: { - legend: false, - tooltip: false, - viz: false, - }, - lineInterpolation: 'linear', - lineWidth: 1, - pointSize: 5, - scaleDistribution: { - type: 'linear', - }, - showPoints: 'auto', - spanNulls: false, - stacking: { - group: 'A', - mode: 'none', - }, - thresholdsStyle: { - mode: 'off', - }, - }, - mappings: [], - min: 0, - thresholds: { - mode: 'absolute', - steps: [ - { - color: 'green', - value: null, - }, - { - color: 'red', - value: 80, - }, - ], - }, - unit: 'Bps', - }, - overrides: [], - }, - options: { - legend: { - calcs: [], - displayMode: 'list', - placement: 'bottom', - showLegend: true, - }, - tooltip: { - mode: 'single', - sort: 'none', - }, - }, -}; - -local filesSentPanel = { - datasource: promDatasource, - targets: [ - prometheus.target( - 'rate(windows_iis_files_sent_total{job=~"$job", instance=~"$instance", site=~"$site"}[$__rate_interval])', - datasource=promDatasource, - legendFormat='{{instance}} - {{site}}', - ), - ], - type: 'timeseries', - title: 'Files sent', - description: 'The files sent by an IIS site.', - fieldConfig: { - defaults: { - color: { - mode: 'palette-classic', - }, - custom: { - axisCenteredZero: false, - axisColorMode: 'text', - axisLabel: '', - axisPlacement: 'auto', - barAlignment: 0, - drawStyle: 'line', - fillOpacity: 0, - gradientMode: 'none', - hideFrom: { - legend: false, - tooltip: false, - viz: false, - }, - lineInterpolation: 'linear', - lineWidth: 1, - pointSize: 5, - scaleDistribution: { - type: 'linear', - }, - showPoints: 'auto', - spanNulls: false, - stacking: { - group: 'A', - mode: 'none', - }, - thresholdsStyle: { - mode: 'off', - }, - }, - mappings: [], - min: 0, - thresholds: { - mode: 'absolute', - steps: [ - { - color: 'green', - value: null, - }, - { - color: 'red', - value: 80, - }, - ], - }, - unit: 'files/s', - }, - overrides: [], - }, - options: { - legend: { - calcs: [], - displayMode: 'list', - placement: 'bottom', - showLegend: true, - }, - tooltip: { - mode: 'single', - sort: 'none', - }, - }, -}; - -local filesReceivedPanel = { - datasource: promDatasource, - targets: [ - prometheus.target( - 'rate(windows_iis_files_received_total{job=~"$job", instance=~"$instance", site=~"$site"}[$__rate_interval])', - datasource=promDatasource, - legendFormat='{{instance}} - {{site}}', - ), - ], - type: 'timeseries', - title: 'Files received', - description: 'The files received by an IIS site.', - fieldConfig: { - defaults: { - color: { - mode: 'palette-classic', - }, - custom: { - axisCenteredZero: false, - axisColorMode: 'text', - axisLabel: '', - axisPlacement: 'auto', - barAlignment: 0, - drawStyle: 'line', - fillOpacity: 0, - gradientMode: 'none', - hideFrom: { - legend: false, - tooltip: false, - viz: false, - }, - lineInterpolation: 'linear', - lineWidth: 1, - pointSize: 5, - scaleDistribution: { - type: 'linear', - }, - showPoints: 'auto', - spanNulls: false, - stacking: { - group: 'A', - mode: 'none', - }, - thresholdsStyle: { - mode: 'off', - }, - }, - mappings: [], - thresholds: { - mode: 'absolute', - steps: [ - { - color: 'green', - value: null, - }, - { - color: 'red', - value: 80, - }, - ], - }, - unit: 'files/s', - }, - overrides: [], - }, - options: { - legend: { - calcs: [], - displayMode: 'list', - placement: 'bottom', - showLegend: true, - }, - tooltip: { - mode: 'single', - sort: 'none', - }, - }, -}; - -local currentConnectionsPanel = { - datasource: promDatasource, - targets: [ - prometheus.target( - 'windows_iis_current_connections{job=~"$job", instance=~"$instance", site=~"$site"}', - datasource=promDatasource, - legendFormat='{{instance}} - {{site}}', - ), - ], - type: 'timeseries', - title: 'Current connections', - description: 'The number of current connections to an IIS site.', - fieldConfig: { - defaults: { - color: { - mode: 'palette-classic', - }, - custom: { - axisCenteredZero: false, - axisColorMode: 'text', - axisLabel: '', - axisPlacement: 'auto', - barAlignment: 0, - drawStyle: 'line', - fillOpacity: 0, - gradientMode: 'none', - hideFrom: { - legend: false, - tooltip: false, - viz: false, - }, - lineInterpolation: 'linear', - lineWidth: 1, - pointSize: 5, - scaleDistribution: { - type: 'linear', - }, - showPoints: 'auto', - spanNulls: false, - stacking: { - group: 'A', - mode: 'none', - }, - thresholdsStyle: { - mode: 'off', - }, - }, - mappings: [], - thresholds: { - mode: 'absolute', - steps: [ - { - color: 'green', - value: null, - }, - { - color: 'red', - value: 80, - }, - ], - }, - }, - overrides: [], - }, - options: { - legend: { - calcs: [], - displayMode: 'list', - placement: 'bottom', - showLegend: true, - }, - tooltip: { - mode: 'single', - sort: 'none', - }, - }, -}; - -local attemptedConnectionsPanel = { - datasource: promDatasource, - targets: [ - prometheus.target( - 'increase(windows_iis_connection_attempts_all_instances_total{job=~"$job", instance=~"$instance", site=~"$site"}[$__interval:])', - datasource=promDatasource, - legendFormat='{{instance}} - {{site}}', - interval='1m', - ), - ], - type: 'timeseries', - title: 'Attempted connections', - description: 'The number of attempted connections to an IIS site.', - fieldConfig: { - defaults: { - color: { - mode: 'palette-classic', - }, - custom: { - axisCenteredZero: false, - axisColorMode: 'text', - axisLabel: '', - axisPlacement: 'auto', - barAlignment: 0, - drawStyle: 'line', - fillOpacity: 0, - gradientMode: 'none', - hideFrom: { - legend: false, - tooltip: false, - viz: false, - }, - lineInterpolation: 'linear', - lineWidth: 1, - pointSize: 5, - scaleDistribution: { - type: 'linear', - }, - showPoints: 'auto', - spanNulls: false, - stacking: { - group: 'A', - mode: 'none', - }, - thresholdsStyle: { - mode: 'off', - }, - }, - mappings: [], - thresholds: { - mode: 'absolute', - steps: [ - { - color: 'green', - value: null, - }, - { - color: 'red', - value: 80, - }, - ], - }, - }, - overrides: [], - }, - options: { - legend: { - calcs: [], - displayMode: 'list', - placement: 'bottom', - showLegend: true, - }, - tooltip: { - mode: 'single', - sort: 'none', - }, - }, -}; - -local accessLogsPanel = { - datasource: lokiDatasource, - targets: [ - { - datasource: lokiDatasource, - editorMode: 'code', - expr: '{job=~"$job", site=~"$site"} |= ``', - queryType: 'range', - refId: 'A', - }, - ], - type: 'logs', - title: 'Access logs', - description: 'Recent access logs from access logs file for an IIS site.', - options: { - dedupStrategy: 'none', - enableLogDetails: true, - prettifyLogMessage: false, - showCommonLabels: false, - showLabels: false, - showTime: false, - sortOrder: 'Descending', - wrapLogMessage: false, - }, -}; - -local cacheRow = { - datasource: promDatasource, - targets: [], - type: 'row', - title: 'Cache', - collapsed: false, -}; - -local fileCacheHitRatioPanel = { - datasource: promDatasource, - targets: [ - prometheus.target( - 'increase(windows_iis_server_file_cache_hits_total{job=~"$job", instance=~"$instance"}[$__interval:]) / clamp_min(increase(windows_iis_server_file_cache_queries_total{job=~"$job", instance=~"$instance"}[$__interval:]),1) * 100', - datasource=promDatasource, - legendFormat='{{job}} - {{instance}}', - interval='1m', - ), - ], - type: 'timeseries', - title: 'File cache hit ratio', - description: 'The current file cache hit ratio for an IIS server.', - fieldConfig: { - defaults: { - color: { - mode: 'palette-classic', - }, - custom: { - axisCenteredZero: false, - axisColorMode: 'text', - axisLabel: '', - axisPlacement: 'auto', - barAlignment: 0, - drawStyle: 'line', - fillOpacity: 0, - gradientMode: 'none', - hideFrom: { - legend: false, - tooltip: false, - viz: false, - }, - lineInterpolation: 'linear', - lineWidth: 1, - pointSize: 5, - scaleDistribution: { - type: 'linear', - }, - showPoints: 'auto', - spanNulls: false, - stacking: { - group: 'A', - mode: 'none', - }, - thresholdsStyle: { - mode: 'off', - }, - }, - mappings: [], - thresholds: { - mode: 'absolute', - steps: [ - { - color: 'green', - value: null, - }, - { - color: 'red', - value: 80, - }, - ], - }, - unit: 'percent', - }, - overrides: [], - }, - options: { - legend: { - calcs: [], - displayMode: 'list', - placement: 'bottom', - showLegend: true, - }, - tooltip: { - mode: 'single', - sort: 'none', - }, - }, - pluginVersion: '9.5.0-cloud.2.f143d34', -}; - -local uriCacheHitRatioPanel = { - datasource: promDatasource, - targets: [ - prometheus.target( - 'sum by(instance, job) (increase(windows_iis_server_uri_cache_hits_total{job=~"$job", instance=~"$instance"}[$__interval:]) / clamp_min(increase(windows_iis_server_uri_cache_queries_total{job=~"$job", instance=~"$instance"}[$__interval:]),1)) * 100', - datasource=promDatasource, - legendFormat='{{job}} - {{instance}}', - interval='1m', - ), - ], - type: 'timeseries', - title: 'URI cache hit ratio', - description: 'The current URI cache hit ratio for an IIS server.', - fieldConfig: { - defaults: { - color: { - mode: 'palette-classic', - }, - custom: { - axisCenteredZero: false, - axisColorMode: 'text', - axisLabel: '', - axisPlacement: 'auto', - barAlignment: 0, - drawStyle: 'line', - fillOpacity: 0, - gradientMode: 'none', - hideFrom: { - legend: false, - tooltip: false, - viz: false, - }, - lineInterpolation: 'linear', - lineWidth: 1, - pointSize: 5, - scaleDistribution: { - type: 'linear', - }, - showPoints: 'auto', - spanNulls: false, - stacking: { - group: 'A', - mode: 'none', - }, - thresholdsStyle: { - mode: 'off', - }, - }, - mappings: [], - min: 0, - thresholds: { - mode: 'absolute', - steps: [ - { - color: 'green', - value: null, - }, - { - color: 'red', - value: 80, - }, - ], - }, - unit: 'percent', - }, - overrides: [], - }, - options: { - legend: { - calcs: [], - displayMode: 'list', - placement: 'bottom', - showLegend: true, - }, - tooltip: { - mode: 'single', - sort: 'none', - }, - }, -}; - -local metadataCacheHitRatioPanel = { - datasource: promDatasource, - targets: [ - prometheus.target( - 'increase(windows_iis_server_metadata_cache_hits_total{job=~"$job", instance=~"$instance"}[$__interval:]) / clamp_min(increase(windows_iis_server_metadata_cache_queries_total{job=~"$job", instance=~"$instance"}[$__interval:]),1) * 100', - datasource=promDatasource, - legendFormat='{{job}} - {{instance}}', - interval='1m', - ), - ], - type: 'timeseries', - title: 'Metadata cache hit ratio', - description: 'The current metadata cache hit ratio for an IIS server.', - fieldConfig: { - defaults: { - color: { - mode: 'palette-classic', - }, - custom: { - axisCenteredZero: false, - axisColorMode: 'text', - axisLabel: '', - axisPlacement: 'auto', - barAlignment: 0, - drawStyle: 'line', - fillOpacity: 0, - gradientMode: 'none', - hideFrom: { - legend: false, - tooltip: false, - viz: false, - }, - lineInterpolation: 'linear', - lineWidth: 1, - pointSize: 5, - scaleDistribution: { - type: 'linear', - }, - showPoints: 'auto', - spanNulls: false, - stacking: { - group: 'A', - mode: 'none', - }, - thresholdsStyle: { - mode: 'off', - }, - }, - mappings: [], - min: 0, - thresholds: { - mode: 'absolute', - steps: [ - { - color: 'green', - value: null, - }, - { - color: 'red', - value: 80, - }, - ], - }, - unit: 'percent', - }, - overrides: [], - }, - options: { - legend: { - calcs: [], - displayMode: 'list', - placement: 'bottom', - showLegend: true, - }, - tooltip: { - mode: 'single', - sort: 'none', - }, - }, -}; - -local outputCacheHitRatioPanel = { - datasource: promDatasource, - targets: [ - prometheus.target( - 'increase(windows_iis_server_output_cache_hits_total{job=~"$job", instance=~"$instance"}[$__interval:]) / clamp_min(increase(windows_iis_server_output_cache_queries_total{job=~"$job", instance=~"$instance"}[$__interval:]), 1) * 100', - datasource=promDatasource, - legendFormat='{{job}} - {{instance}}', - interval='1m', - ), - ], - type: 'timeseries', - title: 'Output cache hit ratio', - description: 'The current output cache hit ratio for an IIS site.', - fieldConfig: { - defaults: { - color: { - mode: 'palette-classic', - }, - custom: { - axisCenteredZero: false, - axisColorMode: 'text', - axisLabel: '', - axisPlacement: 'auto', - barAlignment: 0, - drawStyle: 'line', - fillOpacity: 0, - gradientMode: 'none', - hideFrom: { - legend: false, - tooltip: false, - viz: false, - }, - lineInterpolation: 'linear', - lineWidth: 1, - pointSize: 5, - scaleDistribution: { - type: 'linear', - }, - showPoints: 'auto', - spanNulls: false, - stacking: { - group: 'A', - mode: 'none', - }, - thresholdsStyle: { - mode: 'off', - }, - }, - mappings: [], - thresholds: { - mode: 'absolute', - steps: [ - { - color: 'green', - value: null, - }, - { - color: 'red', - value: 80, - }, - ], - }, - unit: 'percent', - }, - overrides: [], - }, - options: { - legend: { - calcs: [], - displayMode: 'list', - placement: 'bottom', - showLegend: true, - }, - tooltip: { - mode: 'single', - sort: 'none', - }, - }, -}; - -{ - grafanaDashboards+:: { - 'microsoft-iis-overview.json': - dashboard.new( - 'Microsoft IIS overview', - time_from='%s' % $._config.dashboardPeriod, - tags=($._config.dashboardTags), - timezone='%s' % $._config.dashboardTimezone, - refresh='%s' % $._config.dashboardRefresh, - description='', - uid=dashboardUid, - ) - .addLink(grafana.link.dashboards( - asDropdown=false, - title='Other Microsoft IIS dashboards', - includeVars=true, - keepTime=true, - tags=($._config.dashboardTags), - )) - .addTemplates( - std.flattenArrays([ - [ - template.datasource( - promDatasourceName, - 'prometheus', - null, - label='Data Source', - refresh='load' - ), - ], - if $._config.enableLokiLogs then [ - template.datasource( - lokiDatasourceName, - 'loki', - null, - label='Loki Datasource', - refresh='load' - ), - ] else [], - [ - template.new( - 'job', - promDatasource, - 'label_values(windows_iis_requests_total{}, job)', - label='Job', - refresh=2, - includeAll=true, - multi=true, - allValues='.+', - sort=0 - ), - template.new( - 'instance', - promDatasource, - 'label_values(windows_iis_requests_total{job=~"$job"}, instance)', - label='Instance', - refresh=2, - includeAll=true, - multi=true, - allValues='.+', - sort=0 - ), - template.new( - 'site', - promDatasource, - 'label_values(windows_iis_requests_total{job=~"$job",instance=~"$instance"}, site)', - label='Site', - refresh=2, - includeAll=true, - multi=true, - allValues='.+', - sort=0 - ), - ], - ]) - ) - .addPanels( - std.flattenArrays([ - [ - requestsPanel { gridPos: { h: 8, w: 12, x: 0, y: 0 } }, - requestErrorsPanel { gridPos: { h: 8, w: 12, x: 12, y: 0 } }, - blockedAsyncIORequestsPanel { gridPos: { h: 8, w: 12, x: 0, y: 8 } }, - rejectedAsyncIORequestsPanel { gridPos: { h: 8, w: 12, x: 12, y: 8 } }, - trafficSentPanel { gridPos: { h: 8, w: 12, x: 0, y: 16 } }, - trafficReceivedPanel { gridPos: { h: 8, w: 12, x: 12, y: 16 } }, - filesSentPanel { gridPos: { h: 8, w: 12, x: 0, y: 24 } }, - filesReceivedPanel { gridPos: { h: 8, w: 12, x: 12, y: 24 } }, - currentConnectionsPanel { gridPos: { h: 8, w: 12, x: 0, y: 32 } }, - attemptedConnectionsPanel { gridPos: { h: 8, w: 12, x: 12, y: 32 } }, - ], - if $._config.enableLokiLogs then [ - accessLogsPanel { gridPos: { h: 10, w: 24, x: 0, y: 40 } }, - ] else [], - [ - cacheRow { gridPos: { h: 1, w: 24, x: 0, y: 50 } }, - fileCacheHitRatioPanel { gridPos: { h: 8, w: 12, x: 0, y: 51 } }, - uriCacheHitRatioPanel { gridPos: { h: 8, w: 12, x: 12, y: 51 } }, - metadataCacheHitRatioPanel { gridPos: { h: 8, w: 12, x: 0, y: 59 } }, - outputCacheHitRatioPanel { gridPos: { h: 8, w: 12, x: 12, y: 59 } }, - ], - ]) - ), - - }, -} diff --git a/microsoft-iis-mixin/dashboards_out/microsoft-iis-applications.json b/microsoft-iis-mixin/dashboards_out/microsoft-iis-applications.json index 6840def40..0f9033824 100644 --- a/microsoft-iis-mixin/dashboards_out/microsoft-iis-applications.json +++ b/microsoft-iis-mixin/dashboards_out/microsoft-iis-applications.json @@ -1,117 +1,103 @@ { - "__inputs": [ ], - "__requires": [ ], "annotations": { "list": [ ] }, - "description": "", - "editable": false, - "gnetId": null, - "graphTooltip": 0, - "hideControls": false, - "id": null, + "description": "Dashboard providing detailed application performance metrics for Microsoft IIS.", "links": [ { - "asDropdown": false, - "icon": "external link", + "keepTime": true, + "title": "Microsoft IIS Logs", + "type": "link", + "url": "/d/microsoftiis-logs" + }, + { + "asDropdown": true, "includeVars": true, "keepTime": true, "tags": [ "microsoft-iis-mixin" ], - "targetBlank": false, - "title": "Other Microsoft IIS dashboards", - "type": "dashboards", - "url": "" + "title": "All dashboards", + "type": "dashboards" + }, + { + "keepTime": true, + "title": "Microsoft IIS overview", + "type": "link", + "url": "/d/microsoftiis_overview" } ], "panels": [ + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 0, + "x": 0, + "y": 0 + }, + "id": 1, + "panels": [ ], + "title": "Requests", + "type": "row" + }, { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, "description": "The HTTP request rate for an IIS application.", "fieldConfig": { "defaults": { "color": { - "mode": "palette-classic" + "fixedColor": "light-purple", + "mode": "fixed" }, "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, + "drawStyle": "bars", + "fillOpacity": 100, + "gradientMode": "opacity", + "lineInterpolation": "smooth", + "lineWidth": 2, + "showPoints": "never", "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" + "mode": "normal" } }, - "mappings": [ ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, "unit": "reqps" - }, - "overrides": [ ] + } }, "gridPos": { "h": 8, "w": 12, "x": 0, - "y": 0 + "y": 1 }, "id": 2, + "maxDataPoints": 100, "options": { "legend": { "calcs": [ ], "displayMode": "list", - "placement": "bottom", - "showLegend": true + "placement": "bottom" }, "tooltip": { - "mode": "single", - "sort": "none" + "mode": "multi", + "sort": "desc" } }, + "pluginVersion": "v11.0.0", "targets": [ { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, - "expr": "sum by(app, job, instance) (rate(windows_iis_worker_requests_total{job=~\"$job\", instance=~\"$instance\", app=~\"$application\"}[$__rate_interval]))", + "expr": "sum by(app, job, instance) (\n rate(windows_iis_worker_requests_total{job=\"integrations/iis\",job=~\"$job\",instance=~\"$instance\", app=~\"$application\"}[$__rate_interval])\n)", "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{instance}} - {{app}}" + "instant": false, + "legendFormat": "{{instance}} - {{app}}", + "refId": "Worker requests per second" } ], "title": "Requests", @@ -119,181 +105,131 @@ }, { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, "description": "Requests that have resulted in errors for an IIS application.", "fieldConfig": { "defaults": { "color": { - "mode": "palette-classic" + "fixedColor": "light-red", + "mode": "fixed" }, "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, + "drawStyle": "bars", + "fillOpacity": 100, + "gradientMode": "opacity", + "lineInterpolation": "smooth", + "lineWidth": 2, + "showPoints": "never", "stacking": { - "group": "A", "mode": "normal" - }, - "thresholdsStyle": { - "mode": "off" } }, - "mappings": [ ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, + "noValue": "No errors", "unit": "reqps" - }, - "overrides": [ ] + } }, "gridPos": { "h": 8, "w": 12, "x": 12, - "y": 0 + "y": 1 }, "id": 3, + "maxDataPoints": 100, "options": { "legend": { "calcs": [ ], "displayMode": "list", - "placement": "right", - "showLegend": true + "placement": "right" }, "tooltip": { - "mode": "single", - "sort": "none" + "mode": "multi", + "sort": "desc" } }, + "pluginVersion": "v11.0.0", "targets": [ { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, - "expr": "sum by(app, instance, job, status_code) (rate(windows_iis_worker_request_errors_total{job=~\"$job\", instance=~\"$instance\", app=~\"$application\"}[$__rate_interval]))", + "expr": "sum by(app, instance, job, status_code) (\n rate(windows_iis_worker_request_errors_total{job=\"integrations/iis\",job=~\"$job\",instance=~\"$instance\", app=~\"$application\"}[$__rate_interval])\n)", "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{instance}} - {{app}} - {{status_code}}" + "instant": false, + "legendFormat": "{{instance}} - {{app}} - {{status_code}}", + "refId": "Worker request errors per second" } ], "title": "Request errors", "type": "timeseries" }, + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 0, + "x": 0, + "y": 9 + }, + "id": 4, + "panels": [ ], + "title": "Websocket", + "type": "row" + }, { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, "description": "The number of attempted websocket connections for an IIS application.", "fieldConfig": { "defaults": { - "color": { - "mode": "palette-classic" - }, "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [ ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [ ] + "fillOpacity": 30, + "gradientMode": "opacity", + "lineInterpolation": "smooth", + "lineWidth": 2, + "showPoints": "never" + }, + "decimals": 1, + "noValue": "No packets", + "unit": "pps" + } }, "gridPos": { "h": 8, "w": 12, "x": 0, - "y": 8 + "y": 10 }, - "id": 4, + "id": 5, "options": { "legend": { "calcs": [ ], "displayMode": "list", - "placement": "bottom", - "showLegend": true + "placement": "bottom" }, "tooltip": { - "mode": "single", - "sort": "none" + "mode": "multi", + "sort": "desc" } }, + "pluginVersion": "v11.0.0", "targets": [ { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, - "expr": "sum by(app, instance, job) (increase(windows_iis_worker_websocket_connection_attempts_total{job=~\"$job\", instance=~\"$instance\", app=~\"$application\"}[$__interval:]))", + "expr": "sum by(app, instance, job) (\n rate(windows_iis_worker_websocket_connection_attempts_total{job=\"integrations/iis\",job=~\"$job\",instance=~\"$instance\", app=~\"$application\"}[$__rate_interval])\n)", "format": "time_series", - "interval": "1m", - "intervalFactor": 2, - "legendFormat": "{{instance}} - {{app}}" + "instant": false, + "interval": "2m", + "legendFormat": "{{instance}} - {{app}}", + "refId": "Websocket connection attempts" } ], "title": "Websocket connection attempts", @@ -301,91 +237,53 @@ }, { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, "description": "The success rate of websocket connection attempts for an IIS application.", "fieldConfig": { "defaults": { - "color": { - "mode": "palette-classic" - }, "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [ ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] + "fillOpacity": 30, + "gradientMode": "opacity", + "lineInterpolation": "smooth", + "lineWidth": 2, + "showPoints": "never" }, "unit": "percent" - }, - "overrides": [ ] + } }, "gridPos": { "h": 8, "w": 12, "x": 12, - "y": 8 + "y": 10 }, - "id": 5, + "id": 6, "options": { "legend": { "calcs": [ ], "displayMode": "list", - "placement": "bottom", - "showLegend": true + "placement": "bottom" }, "tooltip": { - "mode": "single", - "sort": "none" + "mode": "multi", + "sort": "desc" } }, + "pluginVersion": "v11.0.0", "targets": [ { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, - "expr": "sum by(app, job, instance) (increase(windows_iis_worker_websocket_connection_accepted_total{job=~\"$job\", instance=~\"$instance\", app=~\"$application\"}[$__interval:]) / clamp_min(increase(windows_iis_worker_websocket_connection_attempts_total{job=~\"$job\", instance=~\"$instance\", app=~\"$application\"}[$__interval:]),1)) * 100", + "expr": "sum by(app, job, instance) (increase(windows_iis_worker_websocket_connection_accepted_total{job=\"integrations/iis\",job=~\"$job\",instance=~\"$instance\", app=~\"$application\"}[$__interval:]) / clamp_min(increase(windows_iis_worker_websocket_connection_attempts_total{job=\"integrations/iis\",job=~\"$job\",instance=~\"$instance\", app=~\"$application\"}[$__interval:]),1)) * 100", "format": "time_series", - "interval": "1m", - "intervalFactor": 2, - "legendFormat": "{{instance}} - {{app}}" + "instant": false, + "interval": "2m", + "legendFormat": "{{instance}} - {{app}}", + "refId": "Websocket connection success rate" } ], "title": "Websocket connection success rate", @@ -393,89 +291,50 @@ }, { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, "description": "The current number of worker threads processing requests for an IIS application.", "fieldConfig": { "defaults": { - "color": { - "mode": "palette-classic" - }, "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [ ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] + "fillOpacity": 30, + "gradientMode": "opacity", + "lineInterpolation": "smooth", + "lineWidth": 2, + "showPoints": "never" } - }, - "overrides": [ ] + } }, "gridPos": { "h": 8, "w": 12, "x": 0, - "y": 16 + "y": 18 }, - "id": 6, + "id": 7, "options": { "legend": { "calcs": [ ], - "displayMode": "list", - "placement": "bottom", - "showLegend": true + "displayMode": "list" }, "tooltip": { - "mode": "single", - "sort": "none" + "mode": "multi", + "sort": "desc" } }, + "pluginVersion": "v11.0.0", "targets": [ { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, - "expr": "sum by(app, instance, job, state) (windows_iis_worker_threads{job=~\"$job\", instance=~\"$instance\", app=~\"$application\"})", + "expr": "windows_iis_worker_threads{job=\"integrations/iis\",job=~\"$job\",instance=~\"$instance\", app=~\"$application\"}", "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{instance}} - {{app}} - {{state}}" + "instant": false, + "legendFormat": "{{instance}} - {{app}} - {{state}}", + "refId": "Current worker threads" } ], "title": "Current worker threads", @@ -483,90 +342,52 @@ }, { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, "description": "The current application thread pool utilization for an IIS application.", "fieldConfig": { "defaults": { - "color": { - "mode": "palette-classic" - }, "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [ ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] + "fillOpacity": 30, + "gradientMode": "opacity", + "lineInterpolation": "smooth", + "lineWidth": 2, + "showPoints": "never" }, "unit": "percent" - }, - "overrides": [ ] + } }, "gridPos": { "h": 8, "w": 12, "x": 12, - "y": 16 + "y": 18 }, - "id": 7, + "id": 8, "options": { "legend": { "calcs": [ ], "displayMode": "list", - "placement": "bottom", - "showLegend": true + "placement": "bottom" }, "tooltip": { - "mode": "single", - "sort": "none" + "mode": "multi", + "sort": "desc" } }, + "pluginVersion": "v11.0.0", "targets": [ { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, - "expr": "sum by (job, instance, app) (windows_iis_worker_threads{job=~\"$job\", instance=~\"$instance\", app=~\"$application\"})/ clamp_min(sum by (job, instance, app) (windows_iis_worker_max_threads{job=~\"$job\", instance=~\"$instance\", app=~\"$application\"}),1) * 100", + "expr": "sum by (job, instance, app) (windows_iis_worker_threads{job=\"integrations/iis\",job=~\"$job\",instance=~\"$instance\", app=~\"$application\"})/ clamp_min(sum by (job, instance, app) (windows_iis_worker_max_threads{job=\"integrations/iis\",job=~\"$job\",instance=~\"$instance\", app=~\"$application\"}),1) * 100", "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{instance}} - {{app}}" + "instant": false, + "legendFormat": "{{instance}} - {{app}}", + "refId": "Thread pool utilization" } ], "title": "Thread pool utilization", @@ -574,105 +395,64 @@ }, { "collapsed": false, - "datasource": { - "uid": "${prometheus_datasource}" - }, "gridPos": { "h": 1, - "w": 24, + "w": 0, "x": 0, - "y": 24 + "y": 26 }, - "id": 8, - "targets": [ ], + "id": 9, + "panels": [ ], "title": "Worker processes", "type": "row" }, { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, "description": "The current number of worker processes processing requests for an IIS application.", "fieldConfig": { "defaults": { - "color": { - "mode": "palette-classic" - }, "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [ ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] + "fillOpacity": 30, + "gradientMode": "opacity", + "lineInterpolation": "smooth", + "lineWidth": 2, + "showPoints": "never" } - }, - "overrides": [ ] + } }, "gridPos": { "h": 8, "w": 12, "x": 0, - "y": 25 + "y": 27 }, - "id": 9, + "id": 10, "options": { "legend": { "calcs": [ ], "displayMode": "list", - "placement": "bottom", - "showLegend": true + "placement": "bottom" }, "tooltip": { - "mode": "single", - "sort": "none" + "mode": "multi", + "sort": "desc" } }, + "pluginVersion": "v11.0.0", "targets": [ { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, - "expr": "sum by(app, job, instance) (windows_iis_current_worker_processes{job=~\"$job\", instance=~\"$instance\", app=~\"$application\"})", + "expr": "sum by(app, instance, job) (\n windows_iis_current_worker_processes{job=\"integrations/iis\",job=~\"$job\",instance=~\"$instance\", app=~\"$application\"}\n)", "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{instance}} - {{app}}" + "instant": false, + "legendFormat": "{{instance}} - {{app}}", + "refId": "Current worker processes" } ], "title": "Current worker processes", @@ -680,90 +460,52 @@ }, { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, "description": "The number of worker process failures for an IIS application.", "fieldConfig": { "defaults": { - "color": { - "mode": "palette-classic" - }, "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [ ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] + "fillOpacity": 30, + "gradientMode": "opacity", + "lineInterpolation": "smooth", + "lineWidth": 2, + "showPoints": "never" } - }, - "overrides": [ ] + } }, "gridPos": { "h": 8, "w": 12, "x": 12, - "y": 25 + "y": 27 }, - "id": 10, + "id": 11, "options": { "legend": { "calcs": [ ], "displayMode": "list", - "placement": "bottom", - "showLegend": true + "placement": "bottom" }, "tooltip": { - "mode": "single", - "sort": "none" + "mode": "multi", + "sort": "desc" } }, + "pluginVersion": "v11.0.0", "targets": [ { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, - "expr": "increase(windows_iis_total_worker_process_failures{job=~\"$job\", instance=~\"$instance\", app=~\"$application\"}[$__interval:])", + "expr": "increase(windows_iis_total_worker_process_failures{job=\"integrations/iis\",job=~\"$job\",instance=~\"$instance\", app=~\"$application\"}[$__interval:] offset -$__interval)", "format": "time_series", - "interval": "1m", - "intervalFactor": 2, - "legendFormat": "{{instance}} - {{app}}" + "instant": false, + "interval": "2m", + "legendFormat": "{{instance}} - {{app}}", + "refId": "Total worker process failures" } ], "title": "Worker process failures", @@ -771,91 +513,52 @@ }, { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, "description": "The number of worker process startup failures for an IIS application.", "fieldConfig": { "defaults": { - "color": { - "mode": "palette-classic" - }, "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [ ], - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] + "fillOpacity": 30, + "gradientMode": "opacity", + "lineInterpolation": "smooth", + "lineWidth": 2, + "showPoints": "never" } - }, - "overrides": [ ] + } }, "gridPos": { "h": 8, "w": 8, "x": 0, - "y": 33 + "y": 35 }, - "id": 11, + "id": 12, "options": { "legend": { "calcs": [ ], "displayMode": "list", - "placement": "bottom", - "showLegend": true + "placement": "bottom" }, "tooltip": { - "mode": "single", - "sort": "none" + "mode": "multi", + "sort": "desc" } }, + "pluginVersion": "v11.0.0", "targets": [ { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, - "expr": "increase(windows_iis_total_worker_process_startup_failures{job=~\"$job\", instance=~\"$instance\", app=~\"$application\"}[$__interval:])", + "expr": "increase(windows_iis_total_worker_process_startup_failures{job=\"integrations/iis\",job=~\"$job\",instance=~\"$instance\", app=~\"$application\"}[$__interval:] offset -$__interval)", "format": "time_series", - "interval": "1m", - "intervalFactor": 2, - "legendFormat": "{{instance}} - {{app}}" + "instant": false, + "interval": "2m", + "legendFormat": "{{instance}} - {{app}}", + "refId": "Worker process startup failures" } ], "title": "Worker process startup failures", @@ -863,90 +566,52 @@ }, { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, "description": "The number of worker process shutdown failures for an IIS application.", "fieldConfig": { "defaults": { - "color": { - "mode": "palette-classic" - }, "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [ ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] + "fillOpacity": 30, + "gradientMode": "opacity", + "lineInterpolation": "smooth", + "lineWidth": 2, + "showPoints": "never" } - }, - "overrides": [ ] + } }, "gridPos": { "h": 8, "w": 8, "x": 8, - "y": 33 + "y": 35 }, - "id": 12, + "id": 13, "options": { "legend": { "calcs": [ ], "displayMode": "list", - "placement": "bottom", - "showLegend": true + "placement": "bottom" }, "tooltip": { - "mode": "single", - "sort": "none" + "mode": "multi", + "sort": "desc" } }, + "pluginVersion": "v11.0.0", "targets": [ { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, - "expr": "increase(windows_iis_total_worker_process_shutdown_failures{job=~\"$job\", instance=~\"$instance\", app=~\"$application\"}[$__interval:])", + "expr": "increase(windows_iis_total_worker_process_shutdown_failures{job=\"integrations/iis\",job=~\"$job\",instance=~\"$instance\", app=~\"$application\"}[$__interval:] offset -$__interval)", "format": "time_series", - "interval": "1m", - "intervalFactor": 2, - "legendFormat": "{{instance}} - {{app}}" + "instant": false, + "interval": "2m", + "legendFormat": "{{instance}} - {{app}}", + "refId": "Worker process shutdown failures" } ], "title": "Worker process shutdown failures", @@ -954,90 +619,52 @@ }, { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, "description": "The number of worker process ping failures for an IIS application.", "fieldConfig": { "defaults": { - "color": { - "mode": "palette-classic" - }, "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [ ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] + "fillOpacity": 30, + "gradientMode": "opacity", + "lineInterpolation": "smooth", + "lineWidth": 2, + "showPoints": "never" } - }, - "overrides": [ ] + } }, "gridPos": { "h": 8, "w": 8, "x": 16, - "y": 33 + "y": 35 }, - "id": 13, + "id": 14, "options": { "legend": { "calcs": [ ], "displayMode": "list", - "placement": "bottom", - "showLegend": true + "placement": "bottom" }, "tooltip": { - "mode": "single", - "sort": "none" + "mode": "multi", + "sort": "desc" } }, + "pluginVersion": "v11.0.0", "targets": [ { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, - "expr": "increase(windows_iis_total_worker_process_ping_failures{job=~\"$job\", instance=~\"$instance\", app=~\"$application\"}[$__interval:])", + "expr": "increase(windows_iis_total_worker_process_ping_failures{job=\"integrations/iis\",job=~\"$job\",instance=~\"$instance\", app=~\"$application\"}[$__interval:] offset -$__interval)", "format": "time_series", - "interval": "1m", - "intervalFactor": 2, - "legendFormat": "{{instance}} - {{app}}" + "instant": false, + "interval": "2m", + "legendFormat": "{{instance}} - {{app}}", + "refId": "Worker process ping failures" } ], "title": "Worker process ping failures", @@ -1045,509 +672,307 @@ }, { "collapsed": false, - "datasource": { - "uid": "${prometheus_datasource}" - }, "gridPos": { "h": 1, - "w": 24, + "w": 0, "x": 0, - "y": 41 + "y": 43 }, - "id": 14, - "targets": [ ], + "id": 15, + "panels": [ ], "title": "Cache", "type": "row" }, { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, "description": "The current file cache hit ratio for an IIS application.", "fieldConfig": { "defaults": { - "color": { - "mode": "palette-classic" - }, "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [ ], - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] + "fillOpacity": 30, + "gradientMode": "opacity", + "lineInterpolation": "smooth", + "lineWidth": 2, + "showPoints": "never" }, "unit": "percent" - }, - "overrides": [ ] + } }, "gridPos": { "h": 8, "w": 12, "x": 0, - "y": 42 + "y": 44 }, - "id": 15, + "id": 16, "options": { "legend": { "calcs": [ ], "displayMode": "list", - "placement": "bottom", - "showLegend": true + "placement": "bottom" }, "tooltip": { - "mode": "single", - "sort": "none" + "mode": "multi", + "sort": "desc" } }, + "pluginVersion": "v11.0.0", "targets": [ { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, - "expr": "sum by(job, instance, app) (increase(windows_iis_worker_file_cache_hits_total{job=~\"$job\", instance=~\"$instance\", app=~\"$application\"}[$__interval:]) / clamp_min(increase(windows_iis_worker_file_cache_queries_total{job=~\"$job\", instance=~\"$instance\", app=~\"$application\"}[$__interval:]),1)) * 100", + "expr": "sum by(job, instance, app) (increase(windows_iis_worker_file_cache_hits_total{job=\"integrations/iis\",job=~\"$job\",instance=~\"$instance\", app=~\"$application\"}[$__interval:]) / clamp_min(increase(windows_iis_worker_file_cache_queries_total{job=\"integrations/iis\",job=~\"$job\",instance=~\"$instance\", app=~\"$application\"}[$__interval:]),1)) * 100", "format": "time_series", - "interval": "1m", - "intervalFactor": 2, - "legendFormat": "{{instance}} - {{app}}" + "instant": false, + "interval": "2m", + "legendFormat": "{{instance}} - {{app}}", + "refId": "Worker file cache hit ratio" } ], - "title": "File cache hit ratio", + "title": "Worker file cache hit ratio", "type": "timeseries" }, { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, "description": "The current URI cache hit ratio for an IIS application.", "fieldConfig": { "defaults": { - "color": { - "mode": "palette-classic" - }, "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [ ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] + "fillOpacity": 30, + "gradientMode": "opacity", + "lineInterpolation": "smooth", + "lineWidth": 2, + "showPoints": "never" }, "unit": "percent" - }, - "overrides": [ ] + } }, "gridPos": { "h": 8, "w": 12, "x": 12, - "y": 42 + "y": 44 }, - "id": 16, + "id": 17, "options": { "legend": { "calcs": [ ], "displayMode": "list", - "placement": "bottom", - "showLegend": true + "placement": "bottom" }, "tooltip": { - "mode": "single", - "sort": "none" + "mode": "multi", + "sort": "desc" } }, + "pluginVersion": "v11.0.0", "targets": [ { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, - "expr": "sum by(instance, job, app) (increase(windows_iis_worker_uri_cache_hits_total{job=~\"$job\", instance=~\"$instance\", app=~\"$application\"}[$__interval:]) / clamp_min(increase(windows_iis_worker_uri_cache_queries_total{job=~\"$job\", instance=~\"$instance\", app=~\"$application\"}[$__interval:]),1)) * 100", + "expr": "sum by(instance, job, app) (increase(windows_iis_worker_uri_cache_hits_total{job=\"integrations/iis\",job=~\"$job\",instance=~\"$instance\", app=~\"$application\"}[$__interval:]) / clamp_min(increase(windows_iis_worker_uri_cache_queries_total{job=\"integrations/iis\",job=~\"$job\",instance=~\"$instance\", app=~\"$application\"}[$__interval:]),1)) * 100", "format": "time_series", - "interval": "1m", - "intervalFactor": 2, - "legendFormat": "{{instance}} - {{app}}" + "instant": false, + "interval": "2m", + "legendFormat": "{{instance}} - {{app}}", + "refId": "Worker URI cache hit ratio" } ], - "title": "URI cache hit ratio", + "title": "Worker URI cache hit ratio", "type": "timeseries" }, { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, "description": "The current metadata cache hit ratio for an IIS site.", "fieldConfig": { "defaults": { - "color": { - "mode": "palette-classic" - }, "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [ ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] + "fillOpacity": 30, + "gradientMode": "opacity", + "lineInterpolation": "smooth", + "lineWidth": 2, + "showPoints": "never" }, "unit": "percent" - }, - "overrides": [ ] + } }, "gridPos": { "h": 8, "w": 12, "x": 0, - "y": 50 + "y": 52 }, - "id": 17, + "id": 18, "options": { "legend": { "calcs": [ ], "displayMode": "list", - "placement": "bottom", - "showLegend": true + "placement": "bottom" }, "tooltip": { - "mode": "single", - "sort": "none" + "mode": "multi", + "sort": "desc" } }, + "pluginVersion": "v11.0.0", "targets": [ { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, - "expr": "sum by(job, instance, app)(increase(windows_iis_worker_metadata_cache_hits_total{job=~\"$job\", instance=~\"$instance\", app=~\"$application\"}[$__interval:]) / clamp_min(increase(windows_iis_worker_metadata_cache_queries_total{job=~\"$job\", instance=~\"$instance\", app=~\"$application\"}[$__interval:]),1)) * 100", + "expr": "sum by(job, instance, app)(increase(windows_iis_worker_metadata_cache_hits_total{job=\"integrations/iis\",job=~\"$job\",instance=~\"$instance\", app=~\"$application\"}[$__interval:]) / clamp_min(increase(windows_iis_worker_metadata_cache_queries_total{job=\"integrations/iis\",job=~\"$job\",instance=~\"$instance\", app=~\"$application\"}[$__interval:]),1)) * 100", "format": "time_series", - "interval": "1m", - "intervalFactor": 2, - "legendFormat": "{{instance}} - {{app}}" + "instant": false, + "interval": "2m", + "legendFormat": "{{instance}} - {{app}}", + "refId": "Worker metadata cache hit ratio" } ], - "title": "Metadata cache hit ratio", + "title": "Worker metadata cache hit ratio", "type": "timeseries" }, { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, "description": "The current output cache hit ratio for an IIS application.", "fieldConfig": { "defaults": { - "color": { - "mode": "palette-classic" - }, "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [ ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] + "fillOpacity": 30, + "gradientMode": "opacity", + "lineInterpolation": "smooth", + "lineWidth": 2, + "showPoints": "never" }, "unit": "percent" - }, - "overrides": [ ] + } }, "gridPos": { "h": 8, "w": 12, "x": 12, - "y": 50 + "y": 52 }, - "id": 18, + "id": 19, "options": { "legend": { "calcs": [ ], "displayMode": "list", - "placement": "bottom", - "showLegend": true + "placement": "bottom" }, "tooltip": { - "mode": "single", - "sort": "none" + "mode": "multi", + "sort": "desc" } }, + "pluginVersion": "v11.0.0", "targets": [ { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, - "expr": "sum by(job, instance, app) (increase(windows_iis_worker_output_cache_hits_total{job=~\"$job\", instance=~\"$instance\", app=~\"$application\"}[$__interval:]) / clamp_min(increase(windows_iis_worker_output_queries_total{job=~\"$job\", instance=~\"$instance\", app=~\"$application\"}[$__interval:]),1))", + "expr": "sum by(job, instance, app) (increase(windows_iis_worker_output_cache_hits_total{job=\"integrations/iis\",job=~\"$job\",instance=~\"$instance\", app=~\"$application\"}[$__interval:]) / clamp_min(increase(windows_iis_worker_output_queries_total{job=\"integrations/iis\",job=~\"$job\",instance=~\"$instance\", app=~\"$application\"}[$__interval:]),1))", "format": "time_series", - "interval": "1m", - "intervalFactor": 2, - "legendFormat": "{{instance}} - {{app}}" + "instant": false, + "interval": "2m", + "legendFormat": "{{instance}} - {{app}}", + "refId": "Worker output cache hit ratio" } ], - "title": "Output cache hit ratio", + "title": "Worker output cache hit ratio", "type": "timeseries" } ], "refresh": "1m", - "rows": [ ], - "schemaVersion": 14, - "style": "dark", + "schemaVersion": 39, "tags": [ "microsoft-iis-mixin" ], "templating": { "list": [ { - "current": { }, - "hide": 0, - "label": "Data Source", + "label": "Prometheus data source", "name": "prometheus_datasource", - "options": [ ], "query": "prometheus", - "refresh": 1, "regex": "", "type": "datasource" }, { "allValue": ".+", - "current": { }, "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, - "hide": 0, "includeAll": true, "label": "Job", "multi": true, "name": "job", - "options": [ ], - "query": "label_values(windows_iis_requests_total{},job)", + "query": "label_values(windows_iis_requests_total{job=\"integrations/iis\"}, job)", "refresh": 2, - "regex": "", - "sort": 0, - "tagValuesQuery": "", - "tags": [ ], - "tagsQuery": "", - "type": "query", - "useTags": false + "sort": 1, + "type": "query" }, { - "allValue": "", - "current": { }, + "allValue": ".+", "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, - "hide": 0, "includeAll": true, "label": "Instance", "multi": true, "name": "instance", - "options": [ ], - "query": "label_values(windows_iis_requests_total{job=~\"$job\"},instance)", - "refresh": 1, + "query": "label_values(windows_iis_requests_total{job=\"integrations/iis\",job=~\"$job\"}, instance)", + "refresh": 2, + "sort": 1, + "type": "query" + }, + { + "hide": 2, + "label": "Loki data source", + "name": "loki_datasource", + "query": "loki", "regex": "", - "sort": 0, - "tagValuesQuery": "", - "tags": [ ], - "tagsQuery": "", - "type": "query", - "useTags": false + "type": "datasource" }, { "allValue": ".+", - "current": { }, "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, - "hide": 0, "includeAll": true, "label": "Application", "multi": true, "name": "application", - "options": [ ], - "query": "label_values(windows_iis_current_application_pool_state{job=~\"$job\", instance=~\"$instance\"},app)", - "refresh": 1, - "regex": "", - "sort": 0, - "tagValuesQuery": "", - "tags": [ ], - "tagsQuery": "", - "type": "query", - "useTags": false + "query": "label_values(windows_iis_current_application_pool_state{job=~\"$job\", instance=~\"$instance\"}, app)", + "refresh": 2, + "type": "query" } ] }, "time": { - "from": "now-1h", + "from": "now-30m", "to": "now" }, - "timepicker": { - "refresh_intervals": [ - "5s", - "10s", - "30s", - "1m", - "5m", - "15m", - "30m", - "1h", - "2h", - "1d" - ], - "time_options": [ - "5m", - "15m", - "1h", - "6h", - "12h", - "24h", - "2d", - "7d", - "30d" - ] - }, "timezone": "default", "title": "Microsoft IIS applications", - "uid": "microsoft-iis-applications", - "version": 0 + "uid": "microsoftiis_applications" } \ No newline at end of file diff --git a/microsoft-iis-mixin/dashboards_out/microsoft-iis-logs.json b/microsoft-iis-mixin/dashboards_out/microsoft-iis-logs.json new file mode 100644 index 000000000..6b37844d2 --- /dev/null +++ b/microsoft-iis-mixin/dashboards_out/microsoft-iis-logs.json @@ -0,0 +1,310 @@ +{ + "annotations": { + "list": [ ] + }, + "links": [ + { + "keepTime": true, + "title": "Microsoft IIS Logs", + "type": "link", + "url": "/d/microsoftiis-logs" + }, + { + "keepTime": true, + "title": "Microsoft IIS applications", + "type": "link", + "url": "/d/microsoftiis_applications" + }, + { + "asDropdown": true, + "includeVars": true, + "keepTime": true, + "tags": [ + "microsoft-iis-mixin" + ], + "title": "All dashboards", + "type": "dashboards" + }, + { + "keepTime": true, + "title": "Microsoft IIS overview", + "type": "link", + "url": "/d/microsoftiis_overview" + } + ], + "panels": [ + { + "datasource": { + "type": "loki", + "uid": "${loki_datasource}" + }, + "description": "Logs volume grouped by \"level\" label.", + "fieldConfig": { + "defaults": { + "custom": { + "drawStyle": "bars", + "fillOpacity": 50, + "stacking": { + "mode": "normal" + } + }, + "unit": "none" + }, + "overrides": [ + { + "matcher": { + "id": "byRegexp", + "options": "(E|e)merg|(F|f)atal|(A|a)lert|(C|c)rit.*" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "purple", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byRegexp", + "options": "(E|e)(rr.*|RR.*)" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "red", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byRegexp", + "options": "(W|w)(arn.*|ARN.*|rn|RN)" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "orange", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byRegexp", + "options": "(N|n)(otice|ote)|(I|i)(nf.*|NF.*)" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "green", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byRegexp", + "options": "dbg.*|DBG.*|(D|d)(EBUG|ebug)" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "blue", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byRegexp", + "options": "(T|t)(race|RACE)" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "light-blue", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byRegexp", + "options": "logs" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "text", + "mode": "fixed" + } + } + ] + } + ] + }, + "gridPos": { + "h": 6, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 1, + "maxDataPoints": 100, + "options": { + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "pluginVersion": "v11.0.0", + "targets": [ + { + "datasource": { + "type": "loki", + "uid": "${loki_datasource}" + }, + "expr": "sum by (level) (count_over_time({job=\"integrations/iis\",job=~\"$job\",level=~\"$level\"}\n|~ \"$regex_search\"\n\n[$__auto]))\n", + "legendFormat": "{{ level }}" + } + ], + "title": "Logs volume", + "transformations": [ + { + "id": "renameByRegex", + "options": { + "regex": "Value", + "renamePattern": "logs" + } + } + ], + "type": "timeseries" + }, + { + "datasource": { + "type": "datasource", + "uid": "-- Mixed --" + }, + "gridPos": { + "h": 18, + "w": 24, + "x": 0, + "y": 18 + }, + "id": 2, + "options": { + "dedupStrategy": "exact", + "enableLogDetails": true, + "prettifyLogMessage": true, + "showTime": false, + "wrapLogMessage": false + }, + "pluginVersion": "v11.0.0", + "targets": [ + { + "datasource": { + "type": "loki", + "uid": "${loki_datasource}" + }, + "expr": "{job=\"integrations/iis\",job=~\"$job\",level=~\"$level\"} \n|~ \"$regex_search\"\n\n\n" + } + ], + "title": "Logs", + "type": "logs" + } + ], + "refresh": "1m", + "schemaVersion": 39, + "tags": [ + "microsoft-iis-mixin" + ], + "templating": { + "list": [ + { + "label": "Loki data source", + "name": "loki_datasource", + "query": "loki", + "regex": "", + "type": "datasource" + }, + { + "allValue": ".*", + "datasource": { + "type": "loki", + "uid": "${loki_datasource}" + }, + "includeAll": true, + "label": "Job", + "multi": true, + "name": "job", + "query": "label_values({job=\"integrations/iis\"}, job)", + "refresh": 2, + "sort": 1, + "type": "query" + }, + { + "allValue": ".*", + "datasource": { + "type": "loki", + "uid": "${loki_datasource}" + }, + "includeAll": true, + "label": "Level", + "multi": true, + "name": "level", + "query": "label_values({job=\"integrations/iis\",job=~\"$job\"}, level)", + "refresh": 2, + "sort": 1, + "type": "query" + }, + { + "current": { + "selected": false, + "text": "", + "value": "" + }, + "label": "Regex search", + "name": "regex_search", + "options": [ + { + "selected": true, + "text": "", + "value": "" + } + ], + "query": "", + "type": "textbox" + }, + { + "hide": 2, + "label": "Prometheus data source", + "name": "prometheus_datasource", + "query": "prometheus", + "regex": "", + "type": "datasource" + } + ] + }, + "time": { + "from": "now-30m", + "to": "now" + }, + "timezone": "default", + "title": "Microsoft IIS logs", + "uid": "microsoftiis-logs" + } \ No newline at end of file diff --git a/microsoft-iis-mixin/dashboards_out/microsoft-iis-overview.json b/microsoft-iis-mixin/dashboards_out/microsoft-iis-overview.json index 0a81807e4..85c004a1b 100644 --- a/microsoft-iis-mixin/dashboards_out/microsoft-iis-overview.json +++ b/microsoft-iis-mixin/dashboards_out/microsoft-iis-overview.json @@ -1,117 +1,95 @@ { - "__inputs": [ ], - "__requires": [ ], "annotations": { "list": [ ] }, - "description": "", - "editable": false, - "gnetId": null, - "graphTooltip": 0, - "hideControls": false, - "id": null, + "description": "Dashboard providing an overview of Microsoft IIS performance.", "links": [ { - "asDropdown": false, - "icon": "external link", + "keepTime": true, + "title": "Microsoft IIS Logs", + "type": "link", + "url": "/d/microsoftiis-logs" + }, + { + "keepTime": true, + "title": "Microsoft IIS applications", + "type": "link", + "url": "/d/microsoftiis_applications" + }, + { + "asDropdown": true, "includeVars": true, "keepTime": true, "tags": [ "microsoft-iis-mixin" ], - "targetBlank": false, - "title": "Other Microsoft IIS dashboards", - "type": "dashboards", - "url": "" + "title": "All dashboards", + "type": "dashboards" } ], "panels": [ + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 0, + "x": 0, + "y": 0 + }, + "id": 1, + "panels": [ ], + "title": "Requests and errors", + "type": "row" + }, { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, "description": "The request rate split by HTTP Method for an IIS site", "fieldConfig": { "defaults": { - "color": { - "mode": "palette-classic" - }, "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "normal" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [ ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] + "fillOpacity": 30, + "gradientMode": "opacity", + "lineInterpolation": "smooth", + "lineWidth": 2, + "showPoints": "never" }, "unit": "reqps" - }, - "overrides": [ ] + } }, "gridPos": { "h": 8, "w": 12, "x": 0, - "y": 0 + "y": 1 }, "id": 2, "options": { "legend": { + "asTable": true, "calcs": [ ], "displayMode": "list", - "placement": "right", - "showLegend": true + "placement": "right" }, "tooltip": { - "mode": "single", - "sort": "none" + "mode": "multi", + "sort": "desc" } }, + "pluginVersion": "v11.0.0", "targets": [ { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, - "expr": "rate(windows_iis_requests_total{job=~\"$job\", instance=~\"$instance\", site=~\"$site\"}[$__rate_interval])", + "expr": "rate(windows_iis_requests_total{job=\"integrations/iis\",job=~\"$job\",instance=~\"$instance\", site=~\"$site\"}[$__rate_interval])", "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{site}} - {{method}}" + "instant": false, + "legendFormat": "{{site}} - {{method}}", + "refId": "Requests per second" } ], "title": "Requests", @@ -119,192 +97,142 @@ }, { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, "description": "Requests that have resulted in errors for an IIS site.", "fieldConfig": { "defaults": { "color": { - "mode": "palette-classic" + "fixedColor": "light-red", + "mode": "fixed" }, "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, + "drawStyle": "bars", + "fillOpacity": 100, + "gradientMode": "opacity", + "lineInterpolation": "smooth", + "lineWidth": 2, + "showPoints": "never", "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" + "mode": "normal" } }, - "mappings": [ ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, + "noValue": "No errors", "unit": "errors/sec" - }, - "overrides": [ ] + } }, "gridPos": { "h": 8, "w": 12, "x": 12, - "y": 0 + "y": 1 }, "id": 3, + "maxDataPoints": 100, "options": { "legend": { + "asTable": true, "calcs": [ ], "displayMode": "list", - "placement": "bottom", - "showLegend": true + "placement": "right" }, "tooltip": { - "mode": "single", - "sort": "none" + "mode": "multi", + "sort": "desc" } }, + "pluginVersion": "v11.0.0", "targets": [ { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, - "expr": "rate(windows_iis_locked_errors_total{job=~\"$job\", instance=~\"$instance\", site=~\"$site\"}[$__rate_interval])", + "expr": "rate(windows_iis_locked_errors_total{job=\"integrations/iis\",job=~\"$job\",instance=~\"$instance\", site=~\"$site\"}[$__rate_interval])", "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{site}} - locked" + "instant": false, + "legendFormat": "{{site}} - locked", + "refId": "Locked errors per second" }, { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, - "expr": "rate(windows_iis_not_found_errors_total{job=~\"$job\", instance=~\"$instance\", site=~\"$site\"}[$__rate_interval])", + "expr": "rate(windows_iis_not_found_errors_total{job=\"integrations/iis\",job=~\"$job\",instance=~\"$instance\", site=~\"$site\"}[$__rate_interval])", "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{site}} - not found" + "instant": false, + "legendFormat": "{{site}} - not found", + "refId": "Not found errors per second" } ], "title": "Request errors", "type": "timeseries" }, + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 0, + "x": 0, + "y": 9 + }, + "id": 4, + "panels": [ ], + "title": "Async I/O", + "type": "row" + }, { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, "description": "Number of async I/O requests that are currently queued for an IIS site.", "fieldConfig": { "defaults": { - "color": { - "mode": "palette-classic" - }, "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } + "fillOpacity": 30, + "gradientMode": "opacity", + "lineInterpolation": "smooth", + "lineWidth": 2, + "showPoints": "never" }, - "mappings": [ ], "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, "unit": "requests" - }, - "overrides": [ ] + } }, "gridPos": { "h": 8, "w": 12, "x": 0, - "y": 8 + "y": 10 }, - "id": 4, + "id": 5, "options": { "legend": { "calcs": [ ], "displayMode": "list", - "placement": "bottom", - "showLegend": true + "placement": "bottom" }, "tooltip": { "mode": "none", - "sort": "none" + "sort": "desc" } }, + "pluginVersion": "v11.0.0", "targets": [ { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, - "expr": "increase(windows_iis_blocked_async_io_requests_total{job=~\"$job\", instance=~\"$instance\", site=~\"$site\"}[$__interval:])", + "expr": "rate(windows_iis_blocked_async_io_requests_total{job=\"integrations/iis\",job=~\"$job\",instance=~\"$instance\", site=~\"$site\"}[$__rate_interval])", "format": "time_series", - "interval": "1m", - "intervalFactor": 2, - "legendFormat": "{{instance}} - {{site}}" + "instant": false, + "interval": "2m", + "legendFormat": "{{instance}} - {{site}}", + "refId": "Blocked async I/O requests" } ], "title": "Blocked async I/O requests", @@ -312,183 +240,124 @@ }, { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, "description": "Number of async I/O requests that have been rejected for an IIS site.", "fieldConfig": { "defaults": { - "color": { - "mode": "palette-classic" - }, "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } + "fillOpacity": 30, + "gradientMode": "opacity", + "lineInterpolation": "smooth", + "lineWidth": 2, + "showPoints": "never" }, - "mappings": [ ], + "decimals": 1, "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, + "noValue": "No packets", "unit": "requests" - }, - "overrides": [ ] + } }, "gridPos": { "h": 8, "w": 12, "x": 12, - "y": 8 + "y": 10 }, - "id": 5, + "id": 6, "options": { "legend": { "calcs": [ ], "displayMode": "list", - "placement": "bottom", - "showLegend": true + "placement": "bottom" }, "tooltip": { - "mode": "single", - "sort": "none" + "mode": "multi", + "sort": "desc" } }, + "pluginVersion": "v11.0.0", "targets": [ { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, - "expr": "increase(windows_iis_rejected_async_io_requests_total{job=~\"$job\", instance=~\"$instance\", site=~\"$site\"}[$__interval:])", + "expr": "rate(windows_iis_rejected_async_io_requests_total{job=\"integrations/iis\",job=~\"$job\",instance=~\"$instance\", site=~\"$site\"}[$__rate_interval])", "format": "time_series", - "interval": "1m", - "intervalFactor": 2, - "legendFormat": "{{instance}} - {{site}}" + "instant": false, + "interval": "2m", + "legendFormat": "{{instance}} - {{site}}", + "refId": "Rejected async I/O requests" } ], "title": "Rejected async I/O requests", "type": "timeseries" }, + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 0, + "x": 0, + "y": 18 + }, + "id": 7, + "panels": [ ], + "title": "Traffic", + "type": "row" + }, { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, "description": "The traffic sent by an IIS site.", "fieldConfig": { "defaults": { - "color": { - "mode": "palette-classic" - }, "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [ ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, + "fillOpacity": 30, + "gradientMode": "opacity", + "lineInterpolation": "smooth", + "lineWidth": 2, + "showPoints": "never" + }, + "decimals": 1, + "noValue": "No traffic", "unit": "Bps" - }, - "overrides": [ ] + } }, "gridPos": { "h": 8, "w": 12, "x": 0, - "y": 16 + "y": 19 }, - "id": 6, + "id": 8, "options": { "legend": { "calcs": [ ], "displayMode": "list", - "placement": "bottom", - "showLegend": true + "placement": "bottom" }, "tooltip": { - "mode": "single", - "sort": "none" + "mode": "multi", + "sort": "desc" } }, + "pluginVersion": "v11.0.0", "targets": [ { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, - "expr": "rate(windows_iis_sent_bytes_total{job=~\"$job\", instance=~\"$instance\", site=~\"$site\"}[$__rate_interval])", + "expr": "rate(windows_iis_sent_bytes_total{job=\"integrations/iis\",job=~\"$job\",instance=~\"$instance\", site=~\"$site\"}[$__rate_interval])", "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{instance}} - {{site}}" + "instant": false, + "legendFormat": "{{instance}} - {{site}}", + "refId": "Bytes sent per second" } ], "title": "Traffic sent", @@ -496,91 +365,55 @@ }, { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, "description": "The traffic received by an IIS site.", "fieldConfig": { "defaults": { - "color": { - "mode": "palette-classic" - }, "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } + "fillOpacity": 30, + "gradientMode": "opacity", + "lineInterpolation": "smooth", + "lineWidth": 2, + "showPoints": "never" }, - "mappings": [ ], + "decimals": 1, "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, + "noValue": "No traffic", "unit": "Bps" - }, - "overrides": [ ] + } }, "gridPos": { "h": 8, "w": 12, "x": 12, - "y": 16 + "y": 19 }, - "id": 7, + "id": 9, "options": { "legend": { "calcs": [ ], "displayMode": "list", - "placement": "bottom", - "showLegend": true + "placement": "bottom" }, "tooltip": { - "mode": "single", - "sort": "none" + "mode": "multi", + "sort": "desc" } }, + "pluginVersion": "v11.0.0", "targets": [ { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, - "expr": "rate(windows_iis_received_bytes_total{job=~\"$job\", instance=~\"$instance\", site=~\"$site\"}[$__rate_interval])", + "expr": "rate(windows_iis_received_bytes_total{job=\"integrations/iis\",job=~\"$job\",instance=~\"$instance\", site=~\"$site\"}[$__rate_interval])", "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{instance}} - {{site}}" + "instant": false, + "legendFormat": "{{instance}} - {{site}}", + "refId": "Bytes received per second" } ], "title": "Traffic received", @@ -588,91 +421,54 @@ }, { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, "description": "The files sent by an IIS site.", "fieldConfig": { "defaults": { - "color": { - "mode": "palette-classic" - }, "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } + "fillOpacity": 30, + "gradientMode": "opacity", + "lineInterpolation": "smooth", + "lineWidth": 2, + "showPoints": "never" }, - "mappings": [ ], "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "files/s" - }, - "overrides": [ ] + "unit": "files" + } }, "gridPos": { "h": 8, "w": 12, "x": 0, - "y": 24 + "y": 27 }, - "id": 8, + "id": 10, "options": { "legend": { "calcs": [ ], "displayMode": "list", - "placement": "bottom", - "showLegend": true + "placement": "bottom" }, "tooltip": { - "mode": "single", - "sort": "none" + "mode": "multi", + "sort": "desc" } }, + "pluginVersion": "v11.0.0", "targets": [ { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, - "expr": "rate(windows_iis_files_sent_total{job=~\"$job\", instance=~\"$instance\", site=~\"$site\"}[$__rate_interval])", + "expr": "increase(windows_iis_files_sent_total{job=\"integrations/iis\",job=~\"$job\",instance=~\"$instance\", site=~\"$site\"}[$__interval:] offset -$__interval)", "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{instance}} - {{site}}" + "instant": false, + "interval": "2m", + "legendFormat": "{{instance}} - {{site}}", + "refId": "Files sent per second" } ], "title": "Files sent", @@ -680,830 +476,257 @@ }, { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, "description": "The files received by an IIS site.", "fieldConfig": { "defaults": { - "color": { - "mode": "palette-classic" - }, "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [ ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "files/s" - }, - "overrides": [ ] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 24 - }, - "id": 9, - "options": { - "legend": { - "calcs": [ ], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "datasource": { - "uid": "${prometheus_datasource}" - }, - "expr": "rate(windows_iis_files_received_total{job=~\"$job\", instance=~\"$instance\", site=~\"$site\"}[$__rate_interval])", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{instance}} - {{site}}" - } - ], - "title": "Files received", - "type": "timeseries" - }, - { - "datasource": { - "uid": "${prometheus_datasource}" - }, - "description": "The number of current connections to an IIS site.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [ ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [ ] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 32 - }, - "id": 10, - "options": { - "legend": { - "calcs": [ ], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "datasource": { - "uid": "${prometheus_datasource}" + "fillOpacity": 30, + "gradientMode": "opacity", + "lineInterpolation": "smooth", + "lineWidth": 2, + "showPoints": "never" }, - "expr": "windows_iis_current_connections{job=~\"$job\", instance=~\"$instance\", site=~\"$site\"}", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{instance}} - {{site}}" + "unit": "files" } - ], - "title": "Current connections", - "type": "timeseries" - }, - { - "datasource": { - "uid": "${prometheus_datasource}" - }, - "description": "The number of attempted connections to an IIS site.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [ ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [ ] }, "gridPos": { "h": 8, "w": 12, "x": 12, - "y": 32 + "y": 27 }, "id": 11, "options": { "legend": { "calcs": [ ], "displayMode": "list", - "placement": "bottom", - "showLegend": true + "placement": "bottom" }, "tooltip": { - "mode": "single", - "sort": "none" + "mode": "multi", + "sort": "desc" } }, + "pluginVersion": "v11.0.0", "targets": [ { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, - "expr": "increase(windows_iis_connection_attempts_all_instances_total{job=~\"$job\", instance=~\"$instance\", site=~\"$site\"}[$__interval:])", + "expr": "increase(windows_iis_files_received_total{job=\"integrations/iis\",job=~\"$job\",instance=~\"$instance\", site=~\"$site\"}[$__interval:] offset -$__interval)", "format": "time_series", - "interval": "1m", - "intervalFactor": 2, - "legendFormat": "{{instance}} - {{site}}" + "instant": false, + "interval": "2m", + "legendFormat": "{{instance}} - {{site}}", + "refId": "Files received per second" } ], - "title": "Attempted connections", + "title": "Files received", "type": "timeseries" }, - { - "datasource": { - "uid": "${loki_datasource}" - }, - "description": "Recent access logs from access logs file for an IIS site.", - "gridPos": { - "h": 10, - "w": 24, - "x": 0, - "y": 40 - }, - "id": 12, - "options": { - "dedupStrategy": "none", - "enableLogDetails": true, - "prettifyLogMessage": false, - "showCommonLabels": false, - "showLabels": false, - "showTime": false, - "sortOrder": "Descending", - "wrapLogMessage": false - }, - "targets": [ - { - "datasource": { - "uid": "${loki_datasource}" - }, - "editorMode": "code", - "expr": "{job=~\"$job\", site=~\"$site\"} |= ``", - "queryType": "range", - "refId": "A" - } - ], - "title": "Access logs", - "type": "logs" - }, { "collapsed": false, - "datasource": { - "uid": "${prometheus_datasource}" - }, "gridPos": { "h": 1, - "w": 24, + "w": 0, "x": 0, - "y": 50 + "y": 35 }, - "id": 13, - "targets": [ ], - "title": "Cache", + "id": 12, + "panels": [ ], + "title": "Connections", "type": "row" }, { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, - "description": "The current file cache hit ratio for an IIS server.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [ ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "percent" - }, - "overrides": [ ] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 51 - }, - "id": 14, - "options": { - "legend": { - "calcs": [ ], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "pluginVersion": "9.5.0-cloud.2.f143d34", - "targets": [ - { - "datasource": { - "uid": "${prometheus_datasource}" - }, - "expr": "increase(windows_iis_server_file_cache_hits_total{job=~\"$job\", instance=~\"$instance\"}[$__interval:]) / clamp_min(increase(windows_iis_server_file_cache_queries_total{job=~\"$job\", instance=~\"$instance\"}[$__interval:]),1) * 100", - "format": "time_series", - "interval": "1m", - "intervalFactor": 2, - "legendFormat": "{{job}} - {{instance}}" - } - ], - "title": "File cache hit ratio", - "type": "timeseries" - }, - { - "datasource": { - "uid": "${prometheus_datasource}" - }, - "description": "The current URI cache hit ratio for an IIS server.", + "description": "The number of current connections to an IIS site.", "fieldConfig": { "defaults": { - "color": { - "mode": "palette-classic" - }, "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [ ], - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "percent" - }, - "overrides": [ ] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 51 - }, - "id": 15, - "options": { - "legend": { - "calcs": [ ], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "datasource": { - "uid": "${prometheus_datasource}" - }, - "expr": "sum by(instance, job) (increase(windows_iis_server_uri_cache_hits_total{job=~\"$job\", instance=~\"$instance\"}[$__interval:]) / clamp_min(increase(windows_iis_server_uri_cache_queries_total{job=~\"$job\", instance=~\"$instance\"}[$__interval:]),1)) * 100", - "format": "time_series", - "interval": "1m", - "intervalFactor": 2, - "legendFormat": "{{job}} - {{instance}}" + "fillOpacity": 30, + "gradientMode": "opacity", + "lineInterpolation": "smooth", + "lineWidth": 2, + "showPoints": "never" + }, + "decimals": 1, + "noValue": "No packets", + "unit": "pps" } - ], - "title": "URI cache hit ratio", - "type": "timeseries" - }, - { - "datasource": { - "uid": "${prometheus_datasource}" - }, - "description": "The current metadata cache hit ratio for an IIS server.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [ ], - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "percent" - }, - "overrides": [ ] }, "gridPos": { "h": 8, "w": 12, "x": 0, - "y": 59 + "y": 36 }, - "id": 16, + "id": 13, "options": { "legend": { "calcs": [ ], "displayMode": "list", - "placement": "bottom", - "showLegend": true + "placement": "bottom" }, "tooltip": { - "mode": "single", - "sort": "none" + "mode": "multi", + "sort": "desc" } }, + "pluginVersion": "v11.0.0", "targets": [ { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, - "expr": "increase(windows_iis_server_metadata_cache_hits_total{job=~\"$job\", instance=~\"$instance\"}[$__interval:]) / clamp_min(increase(windows_iis_server_metadata_cache_queries_total{job=~\"$job\", instance=~\"$instance\"}[$__interval:]),1) * 100", + "expr": "windows_iis_current_connections{job=\"integrations/iis\",job=~\"$job\",instance=~\"$instance\", site=~\"$site\"}", "format": "time_series", - "interval": "1m", - "intervalFactor": 2, - "legendFormat": "{{job}} - {{instance}}" + "instant": false, + "interval": "2m", + "legendFormat": "{{instance}} - {{site}}", + "refId": "Current connections" } ], - "title": "Metadata cache hit ratio", + "title": "Current connections", "type": "timeseries" }, { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, - "description": "The current output cache hit ratio for an IIS site.", + "description": "The number of attempted connections to an IIS site.", "fieldConfig": { "defaults": { - "color": { - "mode": "palette-classic" - }, "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [ ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "percent" - }, - "overrides": [ ] + "fillOpacity": 30, + "gradientMode": "opacity", + "lineInterpolation": "smooth", + "lineWidth": 2, + "showPoints": "never" + }, + "decimals": 1, + "noValue": "No packets", + "unit": "pps" + } }, "gridPos": { "h": 8, "w": 12, "x": 12, - "y": 59 + "y": 36 }, - "id": 17, + "id": 14, "options": { "legend": { "calcs": [ ], "displayMode": "list", - "placement": "bottom", - "showLegend": true + "placement": "bottom" }, "tooltip": { - "mode": "single", - "sort": "none" + "mode": "multi", + "sort": "desc" } }, + "pluginVersion": "v11.0.0", "targets": [ { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, - "expr": "increase(windows_iis_server_output_cache_hits_total{job=~\"$job\", instance=~\"$instance\"}[$__interval:]) / clamp_min(increase(windows_iis_server_output_cache_queries_total{job=~\"$job\", instance=~\"$instance\"}[$__interval:]), 1) * 100", + "expr": "rate(windows_iis_connection_attempts_all_instances_total{job=\"integrations/iis\",job=~\"$job\",instance=~\"$instance\", site=~\"$site\"}[$__rate_interval])", "format": "time_series", - "interval": "1m", - "intervalFactor": 2, - "legendFormat": "{{job}} - {{instance}}" + "instant": false, + "interval": "2m", + "legendFormat": "{{instance}} - {{site}}", + "refId": "Connection attempts" } ], - "title": "Output cache hit ratio", + "title": "Attempted connections", "type": "timeseries" } ], "refresh": "1m", - "rows": [ ], - "schemaVersion": 14, - "style": "dark", + "schemaVersion": 39, "tags": [ "microsoft-iis-mixin" ], "templating": { "list": [ { - "current": { }, - "hide": 0, - "label": "Data Source", + "label": "Prometheus data source", "name": "prometheus_datasource", - "options": [ ], "query": "prometheus", - "refresh": 1, - "regex": "", - "type": "datasource" - }, - { - "current": { }, - "hide": 0, - "label": "Loki Datasource", - "name": "loki_datasource", - "options": [ ], - "query": "loki", - "refresh": 1, "regex": "", "type": "datasource" }, { "allValue": ".+", - "current": { }, "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, - "hide": 0, "includeAll": true, "label": "Job", "multi": true, "name": "job", - "options": [ ], - "query": "label_values(windows_iis_requests_total{}, job)", + "query": "label_values(windows_iis_requests_total{job=\"integrations/iis\"}, job)", "refresh": 2, - "regex": "", - "sort": 0, - "tagValuesQuery": "", - "tags": [ ], - "tagsQuery": "", - "type": "query", - "useTags": false + "sort": 1, + "type": "query" }, { "allValue": ".+", - "current": { }, "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, - "hide": 0, "includeAll": true, "label": "Instance", "multi": true, "name": "instance", - "options": [ ], - "query": "label_values(windows_iis_requests_total{job=~\"$job\"}, instance)", + "query": "label_values(windows_iis_requests_total{job=\"integrations/iis\",job=~\"$job\"}, instance)", "refresh": 2, + "sort": 1, + "type": "query" + }, + { + "hide": 2, + "label": "Loki data source", + "name": "loki_datasource", + "query": "loki", "regex": "", - "sort": 0, - "tagValuesQuery": "", - "tags": [ ], - "tagsQuery": "", - "type": "query", - "useTags": false + "type": "datasource" }, { - "allValue": ".+", - "current": { }, + "allValue": ".*", "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, - "hide": 0, "includeAll": true, "label": "Site", "multi": true, "name": "site", - "options": [ ], - "query": "label_values(windows_iis_requests_total{job=~\"$job\",instance=~\"$instance\"}, site)", + "query": "label_values(windows_iis_requests_total{job=~\"$job\", instance=~\"$instance\"}, site)", "refresh": 2, - "regex": "", - "sort": 0, - "tagValuesQuery": "", - "tags": [ ], - "tagsQuery": "", - "type": "query", - "useTags": false + "type": "query" } ] }, "time": { - "from": "now-1h", + "from": "now-30m", "to": "now" }, - "timepicker": { - "refresh_intervals": [ - "5s", - "10s", - "30s", - "1m", - "5m", - "15m", - "30m", - "1h", - "2h", - "1d" - ], - "time_options": [ - "5m", - "15m", - "1h", - "6h", - "12h", - "24h", - "2d", - "7d", - "30d" - ] - }, "timezone": "default", "title": "Microsoft IIS overview", - "uid": "microsoft-iis-overview", - "version": 0 + "uid": "microsoftiis_overview" } \ No newline at end of file diff --git a/microsoft-iis-mixin/g.libsonnet b/microsoft-iis-mixin/g.libsonnet new file mode 100644 index 000000000..e6a2060ee --- /dev/null +++ b/microsoft-iis-mixin/g.libsonnet @@ -0,0 +1 @@ +import 'github.com/grafana/grafonnet/gen/grafonnet-v11.4.0/main.libsonnet' diff --git a/microsoft-iis-mixin/jsonnetfile.json b/microsoft-iis-mixin/jsonnetfile.json index 93f3316ec..152235cc2 100644 --- a/microsoft-iis-mixin/jsonnetfile.json +++ b/microsoft-iis-mixin/jsonnetfile.json @@ -4,12 +4,39 @@ { "source": { "git": { - "remote": "https://github.com/grafana/grafonnet-lib.git", - "subdir": "grafonnet" + "remote": "https://github.com/grafana/jsonnet-libs.git", + "subdir": "common-lib" + } + }, + "version": "master" + }, + { + "source": { + "git": { + "remote": "https://github.com/grafana/grafonnet.git", + "subdir": "gen/grafonnet-v11.4.0" + } + }, + "version": "main" + }, + { + "source": { + "git": { + "remote": "https://github.com/grafana/jsonnet-libs.git", + "subdir": "grafana-cloud-integration-utils" + } + }, + "version": "master" + }, + { + "source": { + "git": { + "remote": "https://github.com/grafana/jsonnet-libs.git", + "subdir": "logs-lib" } }, "version": "master" } ], "legacyImports": true -} +} \ No newline at end of file diff --git a/microsoft-iis-mixin/links.libsonnet b/microsoft-iis-mixin/links.libsonnet new file mode 100644 index 000000000..c03300fe1 --- /dev/null +++ b/microsoft-iis-mixin/links.libsonnet @@ -0,0 +1,28 @@ +local g = import './g.libsonnet'; +{ + local link = g.dashboard.link, + new(this): + { + microsoftIISOverview: + link.link.new('Microsoft IIS overview', '/d/' + this.grafana.dashboards['microsoft-iis-overview.json'].uid) + + link.link.options.withKeepTime(true), + + microsoftIISApplications: + link.link.new('Microsoft IIS applications', '/d/' + this.grafana.dashboards['microsoft-iis-applications.json'].uid) + + link.link.options.withKeepTime(true), + + microsoftIISDashboards: + link.dashboards.new('All dashboards', this.config.dashboardTags) + + link.dashboards.options.withIncludeVars(true) + + link.dashboards.options.withKeepTime(true) + + link.dashboards.options.withAsDropdown(true), + } + + + if this.config.enableLokiLogs then + { + logs: + link.link.new('Microsoft IIS Logs', '/d/' + this.grafana.dashboards['microsoft-iis-logs.json'].uid) + + link.link.options.withKeepTime(true), + } + else {}, +} diff --git a/microsoft-iis-mixin/main.libsonnet b/microsoft-iis-mixin/main.libsonnet new file mode 100644 index 000000000..0a49c40e9 --- /dev/null +++ b/microsoft-iis-mixin/main.libsonnet @@ -0,0 +1,49 @@ +local alerts = import './alerts.libsonnet'; +local config = import './config.libsonnet'; +local dashboards = import './dashboards.libsonnet'; +local links = import './links.libsonnet'; +local panels = import './panels.libsonnet'; +local rows = import './rows.libsonnet'; +local commonlib = import 'common-lib/common/main.libsonnet'; + +{ + withConfigMixin(config): { + config+: config, + }, + + new(): { + + local this = self, + config: config, + + signals: + { + [sig]: commonlib.signals.unmarshallJsonMulti( + this.config.signals[sig], + type=this.config.metricsSource + ) + for sig in std.objectFields(this.config.signals) + }, + + grafana: { + variables: commonlib.variables.new( + filteringSelector=this.config.filteringSelector, + groupLabels=this.config.groupLabels, + instanceLabels=this.config.instanceLabels, + varMetric='windows_iis_requests_total', + customAllValue='.+', + enableLokiLogs=this.config.enableLokiLogs, + ), + annotations: {}, + links: links.new(this), + panels: panels.new(this), + dashboards: dashboards.new(this), + rows: rows.new(this), + }, + + prometheus: { + alerts: alerts.new(this), + recordingRules: {}, + }, + }, +} diff --git a/microsoft-iis-mixin/mixin.libsonnet b/microsoft-iis-mixin/mixin.libsonnet index 4d987cf31..517e01eb9 100644 --- a/microsoft-iis-mixin/mixin.libsonnet +++ b/microsoft-iis-mixin/mixin.libsonnet @@ -1,3 +1,33 @@ -(import 'dashboards/dashboards.libsonnet') + -(import 'alerts/alerts.libsonnet') + -(import 'config.libsonnet') +local iislib = import './main.libsonnet'; +local config = (import './config.libsonnet'); +local util = import 'grafana-cloud-integration-utils/util.libsonnet'; + +local iis = + iislib.new() + + iislib.withConfigMixin( + { + filteringSelector: config.filteringSelector, + uid: config.uid, + enableLokiLogs: config.enableLokiLogs, + } + ); + +local optional_labels = { + site+: { + label: 'Site', + allValue: '.*', + }, +}; + +{ + grafanaDashboards+:: { + [fname]: + local dashboard = iis.grafana.dashboards[fname]; + dashboard + util.patch_variables(dashboard, optional_labels) + + for fname in std.objectFields(iis.grafana.dashboards) + }, + + prometheusAlerts+:: iis.prometheus.alerts, + prometheusRules+:: iis.prometheus.recordingRules, +} diff --git a/microsoft-iis-mixin/panels.libsonnet b/microsoft-iis-mixin/panels.libsonnet new file mode 100644 index 000000000..5558b4431 --- /dev/null +++ b/microsoft-iis-mixin/panels.libsonnet @@ -0,0 +1,350 @@ +local g = import './g.libsonnet'; +local commonlib = import 'common-lib/common/main.libsonnet'; + +{ + new(this): { + local signals = this.signals, + local vars = this.grafana.variables, + + // Overview - Requests + requests: + commonlib.panels.requests.timeSeries.base.new( + 'Requests', + targets=[signals.overview.requests.asTarget()] + ) + + g.panel.timeSeries.panelOptions.withDescription('The request rate split by HTTP Method for an IIS site') + + g.panel.timeSeries.standardOptions.withUnit('reqps') + + g.panel.timeSeries.options.legend.withPlacement('right') + + g.panel.timeSeries.options.legend.withAsTable(true), + + requestErrors: + commonlib.panels.requests.timeSeries.errors.new( + 'Request errors', + targets=[ + signals.overview.lockedErrors.asTarget(), + signals.overview.notFoundErrors.asTarget(), + ] + ) + + g.panel.timeSeries.panelOptions.withDescription('Requests that have resulted in errors for an IIS site.') + + g.panel.timeSeries.standardOptions.withUnit('errors/sec') + + g.panel.timeSeries.options.legend.withPlacement('right') + + g.panel.timeSeries.options.legend.withAsTable(true), + + blockedAsyncIORequests: + commonlib.panels.generic.timeSeries.base.new( + 'Blocked async I/O requests', + targets=[ + signals.overview.blockedAsyncIORequests.asTarget() + + g.query.prometheus.withInterval('2m'), + ] + ) + + g.panel.timeSeries.panelOptions.withDescription('Number of async I/O requests that are currently queued for an IIS site.') + + g.panel.timeSeries.standardOptions.withUnit('requests') + + g.panel.timeSeries.standardOptions.withMin(0) + + g.panel.timeSeries.options.legend.withPlacement('bottom') + + g.panel.timeSeries.options.tooltip.withMode('none'), + + rejectedAsyncIORequests: + commonlib.panels.network.timeSeries.base.new( + 'Rejected async I/O requests', + targets=[ + signals.overview.rejectedAsyncIORequests.asTarget() + + g.query.prometheus.withInterval('2m'), + ] + ) + + g.panel.timeSeries.panelOptions.withDescription('Number of async I/O requests that have been rejected for an IIS site.') + + g.panel.timeSeries.standardOptions.withUnit('requests') + + g.panel.timeSeries.standardOptions.withMin(0) + + g.panel.timeSeries.options.legend.withPlacement('bottom'), + + trafficSent: + commonlib.panels.network.timeSeries.traffic.new( + 'Traffic sent', + targets=[signals.overview.bytesSent.asTarget()] + ) + + g.panel.timeSeries.panelOptions.withDescription('The traffic sent by an IIS site.') + + g.panel.timeSeries.standardOptions.withUnit('Bps') + + g.panel.timeSeries.options.legend.withPlacement('bottom'), + + trafficReceived: + commonlib.panels.network.timeSeries.traffic.new( + 'Traffic received', + targets=[signals.overview.bytesReceived.asTarget()] + ) + + g.panel.timeSeries.panelOptions.withDescription('The traffic received by an IIS site.') + + g.panel.timeSeries.standardOptions.withUnit('Bps') + + g.panel.timeSeries.standardOptions.withMin(0) + + g.panel.timeSeries.options.legend.withPlacement('bottom'), + + filesSent: + commonlib.panels.generic.timeSeries.base.new( + 'Files sent', + targets=[ + signals.overview.filesSent.asTarget() + + g.query.prometheus.withInterval('2m'), + ] + ) + + g.panel.timeSeries.panelOptions.withDescription('The files sent by an IIS site.') + + g.panel.timeSeries.standardOptions.withUnit('files') + + g.panel.timeSeries.standardOptions.withMin(0) + + g.panel.timeSeries.options.legend.withPlacement('bottom'), + + filesReceived: + commonlib.panels.generic.timeSeries.base.new( + 'Files received', + targets=[ + signals.overview.filesReceived.asTarget() + + g.query.prometheus.withInterval('2m'), + ] + ) + + g.panel.timeSeries.panelOptions.withDescription('The files received by an IIS site.') + + g.panel.timeSeries.standardOptions.withUnit('files') + + g.panel.timeSeries.options.legend.withPlacement('bottom'), + + currentConnections: + commonlib.panels.network.timeSeries.base.new( + 'Current connections', + targets=[ + signals.overview.currentConnections.asTarget() + + g.query.prometheus.withInterval('2m'), + ] + ) + + g.panel.timeSeries.panelOptions.withDescription('The number of current connections to an IIS site.') + + g.panel.timeSeries.options.legend.withPlacement('bottom'), + + attemptedConnections: + commonlib.panels.network.timeSeries.base.new( + 'Attempted connections', + targets=[ + signals.overview.connectionAttempts.asTarget() + + g.query.prometheus.withInterval('2m'), + ] + ) + + g.panel.timeSeries.panelOptions.withDescription('The number of attempted connections to an IIS site.') + + g.panel.timeSeries.options.legend.withPlacement('bottom'), + + // Server Cache Panels + fileCacheHitRatio: + commonlib.panels.generic.timeSeries.base.new( + 'File cache hit ratio', + targets=[ + signals.overview.fileCacheHitRatio.asTarget() + + g.query.prometheus.withInterval('2m'), + ] + ) + + g.panel.timeSeries.panelOptions.withDescription('The current file cache hit ratio for an IIS server.') + + g.panel.timeSeries.standardOptions.withUnit('percent') + + g.panel.timeSeries.options.legend.withPlacement('bottom'), + + uriCacheHitRatio: + commonlib.panels.generic.timeSeries.base.new( + 'URI cache hit ratio', + targets=[ + signals.overview.uriCacheHitRatio.asTarget() + + g.query.prometheus.withInterval('2m'), + ] + ) + + g.panel.timeSeries.panelOptions.withDescription('The current URI cache hit ratio for an IIS server.') + + g.panel.timeSeries.standardOptions.withUnit('percent') + + g.panel.timeSeries.standardOptions.withMin(0) + + g.panel.timeSeries.options.legend.withPlacement('bottom'), + + metadataCacheHitRatio: + commonlib.panels.generic.timeSeries.base.new( + 'Metadata cache hit ratio', + targets=[ + signals.overview.metadataCacheHitRatio.asTarget() + + g.query.prometheus.withInterval('2m'), + ] + ) + + g.panel.timeSeries.panelOptions.withDescription('The current metadata cache hit ratio for an IIS server.') + + g.panel.timeSeries.standardOptions.withUnit('percent') + + g.panel.timeSeries.standardOptions.withMin(0) + + g.panel.timeSeries.options.legend.withPlacement('bottom'), + + outputCacheHitRatio: + commonlib.panels.generic.timeSeries.base.new( + 'Output cache hit ratio', + targets=[ + signals.overview.outputCacheHitRatio.asTarget() + + g.query.prometheus.withInterval('2m'), + ] + ) + + g.panel.timeSeries.panelOptions.withDescription('The current output cache hit ratio for an IIS site.') + + g.panel.timeSeries.standardOptions.withUnit('percent') + + g.panel.timeSeries.options.legend.withPlacement('bottom'), + + // Application Panels + workerRequests: + commonlib.panels.requests.timeSeries.rate.new( + 'Requests', + targets=[ + signals.applications.workerRequests.withExprWrappersMixin(['sum by(app, job, instance) (', ')']) + .asTarget(), + ] + ) + + g.panel.timeSeries.panelOptions.withDescription('The HTTP request rate for an IIS application.') + + g.panel.timeSeries.standardOptions.withUnit('reqps') + + g.panel.timeSeries.options.legend.withPlacement('bottom'), + + workerRequestErrors: + commonlib.panels.requests.timeSeries.errors.new( + 'Request errors', + targets=[ + signals.applications.workerRequestErrors.withExprWrappersMixin(['sum by(app, instance, job, status_code) (', ')']) + .asTarget(), + ] + ) + + g.panel.timeSeries.panelOptions.withDescription('Requests that have resulted in errors for an IIS application.') + + g.panel.timeSeries.standardOptions.withUnit('reqps') + + g.panel.timeSeries.fieldConfig.defaults.custom.withStacking({ mode: 'normal' }) + + g.panel.timeSeries.options.legend.withPlacement('right'), + + websocketConnectionAttempts: + commonlib.panels.network.timeSeries.base.new( + 'Websocket connection attempts', + targets=[ + signals.applications.websocketConnectionAttempts.withExprWrappersMixin(['sum by(app, instance, job) (', ')']) + .asTarget() + + g.query.prometheus.withInterval('2m'), + ] + ) + + g.panel.timeSeries.panelOptions.withDescription('The number of attempted websocket connections for an IIS application.') + + g.panel.timeSeries.options.legend.withPlacement('bottom'), + + websocketConnectionSuccessRate: + commonlib.panels.generic.timeSeries.base.new( + 'Websocket connection success rate', + targets=[ + signals.applications.websocketConnectionSuccessRate.asTarget() + + g.query.prometheus.withInterval('2m'), + ] + ) + + g.panel.timeSeries.panelOptions.withDescription('The success rate of websocket connection attempts for an IIS application.') + + g.panel.timeSeries.standardOptions.withUnit('percent') + + g.panel.timeSeries.options.legend.withPlacement('bottom'), + + currentWorkerThreads: + commonlib.panels.generic.timeSeries.base.new( + 'Current worker threads', + targets=[ + signals.applications.currentWorkerThreads.asTarget(), + ] + ) + + g.panel.timeSeries.panelOptions.withDescription('The current number of worker threads processing requests for an IIS application.'), + + workerThreadPoolUtilization: + commonlib.panels.generic.timeSeries.base.new( + 'Thread pool utilization', + targets=[ + signals.applications.threadPoolUtilization.asTarget(), + ] + ) + + g.panel.timeSeries.panelOptions.withDescription('The current application thread pool utilization for an IIS application.') + + g.panel.timeSeries.standardOptions.withUnit('percent') + + g.panel.timeSeries.options.legend.withPlacement('bottom'), + + currentWorkerProcesses: + commonlib.panels.generic.timeSeries.base.new( + 'Current worker processes', + targets=[ + signals.applications.currentWorkerProcesses.withExprWrappersMixin(['sum by(app, instance, job) (', ')']) + .asTarget(), + ] + ) + + g.panel.timeSeries.panelOptions.withDescription('The current number of worker processes processing requests for an IIS application.') + + g.panel.timeSeries.options.legend.withPlacement('bottom'), + + workerProcessFailures: + commonlib.panels.generic.timeSeries.base.new( + 'Worker process failures', + targets=[ + signals.applications.totalWorkerProcessFailures.asTarget() + + g.query.prometheus.withInterval('2m'), + ] + ) + + g.panel.timeSeries.panelOptions.withDescription('The number of worker process failures for an IIS application.') + + g.panel.timeSeries.options.legend.withPlacement('bottom'), + + workerProcessStartupFailures: + commonlib.panels.generic.timeSeries.base.new( + 'Worker process startup failures', + targets=[ + signals.applications.workerProcessStartupFailures.asTarget() + + g.query.prometheus.withInterval('2m'), + ] + ) + + g.panel.timeSeries.panelOptions.withDescription('The number of worker process startup failures for an IIS application.') + + g.panel.timeSeries.options.legend.withPlacement('bottom'), + + workerProcessShutdownFailures: + commonlib.panels.generic.timeSeries.base.new( + 'Worker process shutdown failures', + targets=[ + signals.applications.workerProcessShutdownFailures.asTarget() + + g.query.prometheus.withInterval('2m'), + ] + ) + + g.panel.timeSeries.panelOptions.withDescription('The number of worker process shutdown failures for an IIS application.') + + g.panel.timeSeries.options.legend.withPlacement('bottom'), + + workerProcessPingFailures: + commonlib.panels.generic.timeSeries.base.new( + 'Worker process ping failures', + targets=[ + signals.applications.workerProcessPingFailures.asTarget() + + g.query.prometheus.withInterval('2m'), + ] + ) + + g.panel.timeSeries.panelOptions.withDescription('The number of worker process ping failures for an IIS application.') + + g.panel.timeSeries.options.legend.withPlacement('bottom'), + + workerFileCacheHitRatio: + commonlib.panels.generic.timeSeries.base.new( + 'Worker file cache hit ratio', + targets=[ + signals.applications.workerFileCacheHitRatio.asTarget() + + g.query.prometheus.withInterval('2m'), + ] + ) + + g.panel.timeSeries.panelOptions.withDescription('The current file cache hit ratio for an IIS application.') + + g.panel.timeSeries.standardOptions.withUnit('percent') + + g.panel.timeSeries.options.legend.withPlacement('bottom'), + + workerUriCacheHitRatio: + commonlib.panels.generic.timeSeries.base.new( + 'Worker URI cache hit ratio', + targets=[ + signals.applications.workerUriCacheHitRatio.asTarget() + + g.query.prometheus.withInterval('2m'), + ] + ) + + g.panel.timeSeries.panelOptions.withDescription('The current URI cache hit ratio for an IIS application.') + + g.panel.timeSeries.standardOptions.withUnit('percent') + + g.panel.timeSeries.options.legend.withPlacement('bottom'), + + workerMetadataCacheHitRatio: + commonlib.panels.generic.timeSeries.base.new( + 'Worker metadata cache hit ratio', + targets=[ + signals.applications.workerMetadataCacheHitRatio.asTarget() + + g.query.prometheus.withInterval('2m'), + ] + ) + + g.panel.timeSeries.panelOptions.withDescription('The current metadata cache hit ratio for an IIS site.') + + g.panel.timeSeries.standardOptions.withUnit('percent') + + g.panel.timeSeries.options.legend.withPlacement('bottom'), + + workerOutputCacheHitRatio: + commonlib.panels.generic.timeSeries.base.new( + 'Worker output cache hit ratio', + targets=[ + signals.applications.workerOutputCacheHitRatio.asTarget() + + g.query.prometheus.withInterval('2m'), + ] + ) + + g.panel.timeSeries.panelOptions.withDescription('The current output cache hit ratio for an IIS application.') + + g.panel.timeSeries.standardOptions.withUnit('percent') + + g.panel.timeSeries.options.legend.withPlacement('bottom'), + }, +} diff --git a/microsoft-iis-mixin/prometheus_rules_out/prometheus_alerts.yaml b/microsoft-iis-mixin/prometheus_rules_out/prometheus_alerts.yaml index 7554a2b30..ddb999f16 100644 --- a/microsoft-iis-mixin/prometheus_rules_out/prometheus_alerts.yaml +++ b/microsoft-iis-mixin/prometheus_rules_out/prometheus_alerts.yaml @@ -1,50 +1,45 @@ groups: - - name: microsoft-iis + - name: MicrosoftIISAlerts rules: - - alert: MicrosoftIISHighNumberOfRejectedAsyncIORequests + - alert: MicrosoftIISRejectedAsyncIORequests annotations: - 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 20. + 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 20. summary: There are a high number of rejected async I/O requests for a site. expr: | increase(windows_iis_rejected_async_io_requests_total[5m]) > 20 for: 5m labels: severity: warning - - alert: MicrosoftIISHighNumberOf5xxRequestErrors + - alert: MicrosoftIIS5xxRequestErrors annotations: - 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 5. + 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 5. summary: There are a high number of 5xx request errors for an application. expr: | - sum without (pid, status_code)(increase(windows_iis_worker_request_errors_total{status_code=~"5.*"}[5m])) > 5 + sum without (pid, status_code)(increase(windows_iis_worker_request_errors_total{status_code=~"5.."}[5m])) > 5 for: 5m labels: severity: critical - - alert: MicrosoftIISLowSuccessRateForWebsocketConnections + - alert: MicrosoftIISSuccessRateForWebsocket annotations: - description: | - The success rate for websocket connections is {{ printf "%.0f" $value }} over the last 5m on {{ $labels.instance }} - {{ $labels.app }} which is above the threshold of 80. + description: The success rate for websocket connections is {{ printf "%.0f" $value }} over the last 5m on {{ $labels.instance }} - {{ $labels.app }}, which is above the threshold of 80. summary: There is a low success rate for websocket connections for an application. expr: | sum without (pid) (increase(windows_iis_worker_websocket_connection_accepted_total[5m]) / clamp_min(increase(windows_iis_worker_websocket_connection_attempts_total[5m]),1)) * 100 > 80 for: 5m labels: severity: critical - - alert: MicrosoftIISThreadpoolUtilizationNearingMax + - alert: MicrosoftIISThreadpoolUtilization annotations: - description: | - The threadpool utilization is at {{ printf "%.0f" $value }} over the last 5m on {{ $labels.instance }} - {{ $labels.app }} which is above the threshold of 90. + description: The threadpool utilization is at {{ printf "%.0f" $value }} over the last 5m on {{ $labels.instance }} - {{ $labels.app }}, which is above the threshold of 90. summary: The thread pool utilization is nearing max capacity. expr: | sum without (pid, state)(windows_iis_worker_threads / windows_iis_worker_max_threads) * 100 > 90 for: 5m labels: severity: critical - - alert: MicrosoftIISHighNumberOfWorkerProcessFailures + - alert: MicrosoftIISWorkerProcessFailures annotations: - 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 10. + 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 10. summary: There are a high number of worker process failures for an application. expr: | increase(windows_iis_total_worker_process_failures[5m]) > 10 diff --git a/microsoft-iis-mixin/rows.libsonnet b/microsoft-iis-mixin/rows.libsonnet new file mode 100644 index 000000000..ab9a461c1 --- /dev/null +++ b/microsoft-iis-mixin/rows.libsonnet @@ -0,0 +1,92 @@ +local g = import './g.libsonnet'; + +{ + new(this): { + local panels = this.grafana.panels, + + // Overview dashboard rows + overviewRequests: + g.panel.row.new('Requests and errors') + + g.panel.row.withCollapsed(false) + + g.panel.row.withPanels([ + panels.requests { gridPos+: { w: 12 } }, + panels.requestErrors { gridPos+: { w: 12 } }, + ]), + + overviewAsyncIO: + g.panel.row.new('Async I/O') + + g.panel.row.withCollapsed(false) + + g.panel.row.withPanels([ + panels.blockedAsyncIORequests { gridPos+: { w: 12 } }, + panels.rejectedAsyncIORequests { gridPos+: { w: 12 } }, + ]), + + overviewTraffic: + g.panel.row.new('Traffic') + + g.panel.row.withCollapsed(false) + + g.panel.row.withPanels([ + panels.trafficSent { gridPos+: { w: 12 } }, + panels.trafficReceived { gridPos+: { w: 12 } }, + panels.filesSent { gridPos+: { w: 12 } }, + panels.filesReceived { gridPos+: { w: 12 } }, + ]), + + overviewConnections: + g.panel.row.new('Connections') + + g.panel.row.withCollapsed(false) + + g.panel.row.withPanels([ + panels.currentConnections { gridPos+: { w: 12 } }, + panels.attemptedConnections { gridPos+: { w: 12 } }, + ]), + + overviewCache: + g.panel.row.new('Cache') + + g.panel.row.withCollapsed(false) + + g.panel.row.withPanels([ + panels.fileCacheHitRatio { gridPos+: { w: 12 } }, + panels.uriCacheHitRatio { gridPos+: { w: 12 } }, + panels.metadataCacheHitRatio { gridPos+: { w: 12 } }, + panels.outputCacheHitRatio { gridPos+: { w: 12 } }, + ]), + + // Applications dashboard rows + applicationsRequests: + g.panel.row.new('Requests') + + g.panel.row.withCollapsed(false) + + g.panel.row.withPanels([ + panels.workerRequests { gridPos+: { w: 12 } }, + panels.workerRequestErrors { gridPos+: { w: 12 } }, + ]), + + applicationsWebsocket: + g.panel.row.new('Websocket') + + g.panel.row.withCollapsed(false) + + g.panel.row.withPanels([ + panels.websocketConnectionAttempts { gridPos+: { w: 12 } }, + panels.websocketConnectionSuccessRate { gridPos+: { w: 12 } }, + panels.currentWorkerThreads { gridPos+: { w: 12 } }, + panels.workerThreadPoolUtilization { gridPos+: { w: 12 } }, + ]), + + applicationsWorkerProcesses: + g.panel.row.new('Worker processes') + + g.panel.row.withCollapsed(false) + + g.panel.row.withPanels([ + panels.currentWorkerProcesses { gridPos+: { w: 12 } }, + panels.workerProcessFailures { gridPos+: { w: 12 } }, + panels.workerProcessStartupFailures { gridPos+: { w: 8 } }, + panels.workerProcessShutdownFailures { gridPos+: { w: 8 } }, + panels.workerProcessPingFailures { gridPos+: { w: 8 } }, + ]), + + applicationsCache: + g.panel.row.new('Cache') + + g.panel.row.withCollapsed(false) + + g.panel.row.withPanels([ + panels.workerFileCacheHitRatio { gridPos+: { w: 12 } }, + panels.workerUriCacheHitRatio { gridPos+: { w: 12 } }, + panels.workerMetadataCacheHitRatio { gridPos+: { w: 12 } }, + panels.workerOutputCacheHitRatio { gridPos+: { w: 12 } }, + ]), + }, +} diff --git a/microsoft-iis-mixin/signals/applications.libsonnet b/microsoft-iis-mixin/signals/applications.libsonnet new file mode 100644 index 000000000..38f4d9484 --- /dev/null +++ b/microsoft-iis-mixin/signals/applications.libsonnet @@ -0,0 +1,257 @@ +// Signals for the Microsoft IIS Applications dashboard +function(this) + { + filteringSelector: this.filteringSelector, + groupLabels: this.groupLabels, + instanceLabels: this.instanceLabels, + enableLokiLogs: this.enableLokiLogs, + aggLevel: 'none', + aggFunction: 'sum', + signals: { + // Worker request signals + workerRequests: { + name: 'Worker requests per second', + type: 'counter', + description: 'The HTTP request rate for an IIS application.', + unit: 'reqps', + sources: { + prometheus: { + expr: 'windows_iis_worker_requests_total{%(queriesSelector)s, app=~"$application"}', + legendCustomTemplate: '{{instance}} - {{app}}', + }, + }, + }, + + workerRequestErrors: { + name: 'Worker request errors per second', + type: 'counter', + description: 'Requests that have resulted in errors for an IIS application.', + unit: 'reqps', + sources: { + prometheus: { + expr: 'windows_iis_worker_request_errors_total{%(queriesSelector)s, app=~"$application"}', + legendCustomTemplate: '{{instance}} - {{app}} - {{status_code}}', + }, + }, + }, + + // Websocket signals + websocketConnectionAttempts: { + name: 'Websocket connection attempts', + type: 'counter', + rangeFunction: 'increase', + description: 'The number of attempted websocket connections for an IIS application.', + unit: 'none', + sources: { + prometheus: { + expr: 'windows_iis_worker_websocket_connection_attempts_total{%(queriesSelector)s, app=~"$application"}', + legendCustomTemplate: '{{instance}} - {{app}}', + }, + }, + }, + + websocketConnectionAccepted: { + name: 'Websocket connections accepted', + type: 'counter', + rangeFunction: 'increase', + description: 'The number of accepted websocket connections for an IIS application.', + unit: 'none', + sources: { + prometheus: { + expr: 'windows_iis_worker_websocket_connection_accepted_total{%(queriesSelector)s, app=~"$application"}', + legendCustomTemplate: '{{instance}} - {{app}}', + }, + }, + }, + + websocketConnectionSuccessRate: { + name: 'Websocket connection success rate', + type: 'raw', + description: 'The success rate of websocket connection attempts for an IIS application.', + unit: 'percent', + sources: { + prometheus: { + expr: 'sum by(app, job, instance) (increase(windows_iis_worker_websocket_connection_accepted_total{%(queriesSelector)s, app=~"$application"}[$__interval:]) / clamp_min(increase(windows_iis_worker_websocket_connection_attempts_total{%(queriesSelector)s, app=~"$application"}[$__interval:]),1)) * 100', + legendCustomTemplate: '{{instance}} - {{app}}', + }, + }, + }, + + // Worker thread signals + currentWorkerThreads: { + name: 'Current worker threads', + type: 'gauge', + description: 'The current number of worker threads processing requests for an IIS application.', + unit: 'none', + sources: { + prometheus: { + expr: 'windows_iis_worker_threads{%(queriesSelector)s, app=~"$application"}', + legendCustomTemplate: '{{instance}} - {{app}} - {{state}}', + }, + }, + }, + + maxWorkerThreads: { + name: 'Maximum worker threads', + type: 'gauge', + description: 'The maximum number of worker threads for an IIS application.', + unit: 'none', + sources: { + prometheus: { + expr: 'windows_iis_worker_max_threads{%(queriesSelector)s, app=~"$application"}', + legendCustomTemplate: '{{instance}} - {{app}}', + }, + }, + }, + + threadPoolUtilization: { + name: 'Thread pool utilization', + type: 'raw', + description: 'The current application thread pool utilization for an IIS application.', + unit: 'percent', + sources: { + prometheus: { + expr: 'sum by (job, instance, app) (windows_iis_worker_threads{%(queriesSelector)s, app=~"$application"})/ clamp_min(sum by (job, instance, app) (windows_iis_worker_max_threads{%(queriesSelector)s, app=~"$application"}),1) * 100', + legendCustomTemplate: '{{instance}} - {{app}}', + }, + }, + }, + + // Application pool signals + currentWorkerProcesses: { + name: 'Current worker processes', + type: 'gauge', + description: 'The current number of worker processes for an IIS application pool.', + unit: 'none', + sources: { + prometheus: { + expr: 'windows_iis_current_worker_processes{%(queriesSelector)s, app=~"$application"}', + legendCustomTemplate: '{{instance}} - {{app}}', + }, + }, + }, + + applicationPoolState: { + name: 'Application pool state', + type: 'gauge', + description: 'The current state of an IIS application pool.', + unit: 'none', + sources: { + prometheus: { + expr: 'windows_iis_current_application_pool_state{%(queriesSelector)s, app=~"$application"}', + legendCustomTemplate: '{{instance}} - {{app}} - {{state}}', + }, + }, + }, + + // Worker process failure signals + totalWorkerProcessFailures: { + name: 'Total worker process failures', + type: 'counter', + description: 'Total worker process failures for an IIS application pool.', + unit: 'none', + sources: { + prometheus: { + expr: 'windows_iis_total_worker_process_failures{%(queriesSelector)s, app=~"$application"}', + rangeFunction: 'increase', + legendCustomTemplate: '{{instance}} - {{app}}', + }, + }, + }, + + workerProcessStartupFailures: { + name: 'Worker process startup failures', + type: 'counter', + description: 'Worker process startup failures for an IIS application pool.', + unit: 'none', + sources: { + prometheus: { + expr: 'windows_iis_total_worker_process_startup_failures{%(queriesSelector)s, app=~"$application"}', + rangeFunction: 'increase', + legendCustomTemplate: '{{instance}} - {{app}}', + }, + }, + }, + + workerProcessShutdownFailures: { + name: 'Worker process shutdown failures', + type: 'counter', + description: 'Worker process shutdown failures for an IIS application pool.', + unit: 'none', + sources: { + prometheus: { + expr: 'windows_iis_total_worker_process_shutdown_failures{%(queriesSelector)s, app=~"$application"}', + rangeFunction: 'increase', + legendCustomTemplate: '{{instance}} - {{app}}', + }, + }, + }, + + workerProcessPingFailures: { + name: 'Worker process ping failures', + type: 'counter', + description: 'Worker process ping failures for an IIS application pool.', + unit: 'none', + sources: { + prometheus: { + expr: 'windows_iis_total_worker_process_ping_failures{%(queriesSelector)s, app=~"$application"}', + rangeFunction: 'increase', + legendCustomTemplate: '{{instance}} - {{app}}', + }, + }, + }, + + // Worker cache signals + workerFileCacheHitRatio: { + name: 'Worker file cache hit ratio', + type: 'raw', + description: 'The current file cache hit ratio for an IIS worker process.', + unit: 'percent', + sources: { + prometheus: { + expr: 'sum by(job, instance, app) (increase(windows_iis_worker_file_cache_hits_total{%(queriesSelector)s, app=~"$application"}[$__interval:]) / clamp_min(increase(windows_iis_worker_file_cache_queries_total{%(queriesSelector)s, app=~"$application"}[$__interval:]),1)) * 100', + legendCustomTemplate: '{{instance}} - {{app}}', + }, + }, + }, + + workerUriCacheHitRatio: { + name: 'Worker URI cache hit ratio', + type: 'raw', + description: 'The current URI cache hit ratio for an IIS worker process.', + unit: 'percent', + sources: { + prometheus: { + expr: 'sum by(instance, job, app) (increase(windows_iis_worker_uri_cache_hits_total{%(queriesSelector)s, app=~"$application"}[$__interval:]) / clamp_min(increase(windows_iis_worker_uri_cache_queries_total{%(queriesSelector)s, app=~"$application"}[$__interval:]),1)) * 100', + legendCustomTemplate: '{{instance}} - {{app}}', + }, + }, + }, + + workerMetadataCacheHitRatio: { + name: 'Worker metadata cache hit ratio', + type: 'raw', + description: 'The current metadata cache hit ratio for an IIS worker process.', + unit: 'percent', + sources: { + prometheus: { + expr: 'sum by(job, instance, app)(increase(windows_iis_worker_metadata_cache_hits_total{%(queriesSelector)s, app=~"$application"}[$__interval:]) / clamp_min(increase(windows_iis_worker_metadata_cache_queries_total{%(queriesSelector)s, app=~"$application"}[$__interval:]),1)) * 100', + legendCustomTemplate: '{{instance}} - {{app}}', + }, + }, + }, + + workerOutputCacheHitRatio: { + name: 'Worker output cache hit ratio', + type: 'raw', + description: 'The current output cache hit ratio for an IIS worker process.', + unit: 'none', + sources: { + prometheus: { + expr: 'sum by(job, instance, app) (increase(windows_iis_worker_output_cache_hits_total{%(queriesSelector)s, app=~"$application"}[$__interval:]) / clamp_min(increase(windows_iis_worker_output_queries_total{%(queriesSelector)s, app=~"$application"}[$__interval:]),1))', + legendCustomTemplate: '{{instance}} - {{app}}', + }, + }, + }, + }, + } diff --git a/microsoft-iis-mixin/signals/overview.libsonnet b/microsoft-iis-mixin/signals/overview.libsonnet new file mode 100644 index 000000000..5f02d14dd --- /dev/null +++ b/microsoft-iis-mixin/signals/overview.libsonnet @@ -0,0 +1,216 @@ +// Signals for the Microsoft IIS Overview dashboard +function(this) + { + filteringSelector: this.filteringSelector, + groupLabels: this.groupLabels, + instanceLabels: this.instanceLabels, + enableLokiLogs: this.enableLokiLogs, + aggLevel: 'none', + aggFunction: 'sum', + signals: { + // Requests signals + requests: { + name: 'Requests per second', + type: 'counter', + description: 'The request rate split by HTTP Method for an IIS site.', + unit: 'reqps', + sources: { + prometheus: { + expr: 'windows_iis_requests_total{%(queriesSelector)s, site=~"$site"}', + legendCustomTemplate: '{{site}} - {{method}}', + }, + }, + }, + + lockedErrors: { + name: 'Locked errors per second', + type: 'counter', + description: 'Requests that resulted in locked errors for an IIS site.', + unit: 'errors/sec', + sources: { + prometheus: { + expr: 'windows_iis_locked_errors_total{%(queriesSelector)s, site=~"$site"}', + legendCustomTemplate: '{{site}} - locked', + }, + }, + }, + + notFoundErrors: { + name: 'Not found errors per second', + type: 'counter', + description: 'Requests that resulted in not found errors for an IIS site.', + unit: 'errors/sec', + sources: { + prometheus: { + expr: 'windows_iis_not_found_errors_total{%(queriesSelector)s, site=~"$site"}', + legendCustomTemplate: '{{site}} - not found', + }, + }, + }, + + // Async I/O signals + blockedAsyncIORequests: { + name: 'Blocked async I/O requests', + type: 'counter', + rangeFunction: 'increase', + description: 'Number of async I/O requests that are currently queued for an IIS site.', + unit: 'requests', + sources: { + prometheus: { + expr: 'windows_iis_blocked_async_io_requests_total{%(queriesSelector)s, site=~"$site"}', + legendCustomTemplate: '{{instance}} - {{site}}', + }, + }, + }, + + rejectedAsyncIORequests: { + name: 'Rejected async I/O requests', + type: 'counter', + rangeFunction: 'increase', + description: 'Number of async I/O requests that have been rejected for an IIS site.', + unit: 'requests', + sources: { + prometheus: { + expr: 'windows_iis_rejected_async_io_requests_total{%(queriesSelector)s, site=~"$site"}', + legendCustomTemplate: '{{instance}} - {{site}}', + }, + }, + }, + + // Data transfer signals + bytesSent: { + name: 'Bytes sent per second', + type: 'counter', + description: 'The traffic sent by an IIS site.', + unit: 'Bps', + sources: { + prometheus: { + expr: 'windows_iis_sent_bytes_total{%(queriesSelector)s, site=~"$site"}', + legendCustomTemplate: '{{instance}} - {{site}}', + }, + }, + }, + + bytesReceived: { + name: 'Bytes received per second', + type: 'counter', + description: 'The traffic received by an IIS site.', + unit: 'Bps', + sources: { + prometheus: { + expr: 'windows_iis_received_bytes_total{%(queriesSelector)s, site=~"$site"}', + legendCustomTemplate: '{{instance}} - {{site}}', + }, + }, + }, + + filesSent: { + name: 'Files sent per second', + type: 'counter', + description: 'The files sent by an IIS site.', + unit: 'files', + sources: { + prometheus: { + expr: 'windows_iis_files_sent_total{%(queriesSelector)s, site=~"$site"}', + rangeFunction: 'increase', + legendCustomTemplate: '{{instance}} - {{site}}', + }, + }, + }, + + filesReceived: { + name: 'Files received per second', + type: 'counter', + description: 'The files received by an IIS site.', + unit: 'files', + sources: { + prometheus: { + expr: 'windows_iis_files_received_total{%(queriesSelector)s, site=~"$site"}', + rangeFunction: 'increase', + legendCustomTemplate: '{{instance}} - {{site}}', + }, + }, + }, + + // Connection signals + currentConnections: { + name: 'Current connections', + type: 'gauge', + description: 'The number of current connections to an IIS site.', + unit: 'none', + sources: { + prometheus: { + expr: 'windows_iis_current_connections{%(queriesSelector)s, site=~"$site"}', + legendCustomTemplate: '{{instance}} - {{site}}', + }, + }, + }, + + connectionAttempts: { + name: 'Connection attempts', + type: 'counter', + rangeFunction: 'increase', + description: 'The number of attempted connections to an IIS site.', + unit: 'none', + sources: { + prometheus: { + expr: 'windows_iis_connection_attempts_all_instances_total{%(queriesSelector)s, site=~"$site"}', + legendCustomTemplate: '{{instance}} - {{site}}', + }, + }, + }, + + // Server cache signals + fileCacheHitRatio: { + name: 'File cache hit ratio', + type: 'raw', + description: 'The current file cache hit ratio for an IIS server.', + unit: 'percent', + sources: { + prometheus: { + expr: 'increase(windows_iis_server_file_cache_hits_total{%(queriesSelector)s}[$__interval:]) / clamp_min(increase(windows_iis_server_file_cache_queries_total{%(queriesSelector)s}[$__interval:]),1) * 100', + legendCustomTemplate: '{{job}} - {{instance}}', + }, + }, + }, + + uriCacheHitRatio: { + name: 'URI cache hit ratio', + type: 'raw', + description: 'The current URI cache hit ratio for an IIS server.', + unit: 'percent', + sources: { + prometheus: { + expr: 'sum by(instance, job) (increase(windows_iis_server_uri_cache_hits_total{%(queriesSelector)s}[$__interval:]) / clamp_min(increase(windows_iis_server_uri_cache_queries_total{%(queriesSelector)s}[$__interval:]),1)) * 100', + legendCustomTemplate: '{{job}} - {{instance}}', + }, + }, + }, + + metadataCacheHitRatio: { + name: 'Metadata cache hit ratio', + type: 'raw', + description: 'The current metadata cache hit ratio for an IIS server.', + unit: 'percent', + sources: { + prometheus: { + expr: 'increase(windows_iis_server_metadata_cache_hits_total{%(queriesSelector)s}[$__interval:]) / clamp_min(increase(windows_iis_server_metadata_cache_queries_total{%(queriesSelector)s}[$__interval:]),1) * 100', + legendCustomTemplate: '{{job}} - {{instance}}', + }, + }, + }, + + outputCacheHitRatio: { + name: 'Output cache hit ratio', + type: 'raw', + description: 'The current output cache hit ratio for an IIS site.', + unit: 'percent', + sources: { + prometheus: { + expr: 'increase(windows_iis_server_output_cache_hits_total{%(queriesSelector)s}[$__interval:]) / clamp_min(increase(windows_iis_server_output_cache_queries_total{%(queriesSelector)s}[$__interval:]), 1) * 100', + legendCustomTemplate: '{{job}} - {{instance}}', + }, + }, + }, + }, + }