From d95bc1dec0ae706e5b971e93196968b864a7f71c Mon Sep 17 00:00:00 2001 From: Greg Pattison Date: Thu, 30 Oct 2025 13:28:02 -0400 Subject: [PATCH] Modernize microsoft-iis-mixin to grafonnet v11 and signals architecture --- .gitignore | 1 + microsoft-iis-mixin/.lint | 3 + .../{alerts => }/alerts.libsonnet | 36 +- microsoft-iis-mixin/config.libsonnet | 56 +- microsoft-iis-mixin/dashboards.libsonnet | 139 ++ .../dashboards/dashboards.libsonnet | 2 - .../microsoft-iis-applications.libsonnet | 1306 --------------- .../microsoft-iis-overview.libsonnet | 1280 --------------- .../microsoft-iis-applications.json | 1425 +++-------------- .../dashboards_out/microsoft-iis-logs.json | 240 +++ .../microsoft-iis-overview.json | 1376 +++------------- microsoft-iis-mixin/g.libsonnet | 3 + microsoft-iis-mixin/jsonnetfile.json | 22 +- microsoft-iis-mixin/links.libsonnet | 27 + microsoft-iis-mixin/main.libsonnet | 48 + microsoft-iis-mixin/mixin.libsonnet | 23 +- microsoft-iis-mixin/panels.libsonnet | 279 ++++ .../prometheus_alerts.yaml | 12 +- microsoft-iis-mixin/rows.libsonnet | 85 + .../signals/app_pools.libsonnet | 35 + .../signals/async_io.libsonnet | 37 + .../signals/connections.libsonnet | 36 + .../signals/data_transfer.libsonnet | 61 + .../signals/requests.libsonnet | 48 + .../signals/server_cache.libsonnet | 61 + .../signals/worker_cache.libsonnet | 61 + .../signals/worker_processes.libsonnet | 65 + .../signals/worker_requests.libsonnet | 35 + .../signals/worker_threads.libsonnet | 35 + .../signals/worker_websocket.libsonnet | 50 + 30 files changed, 1945 insertions(+), 4942 deletions(-) rename microsoft-iis-mixin/{alerts => }/alerts.libsonnet (83%) create mode 100644 microsoft-iis-mixin/dashboards.libsonnet delete mode 100644 microsoft-iis-mixin/dashboards/dashboards.libsonnet delete mode 100644 microsoft-iis-mixin/dashboards/microsoft-iis-applications.libsonnet delete mode 100644 microsoft-iis-mixin/dashboards/microsoft-iis-overview.libsonnet create mode 100644 microsoft-iis-mixin/dashboards_out/microsoft-iis-logs.json create mode 100644 microsoft-iis-mixin/g.libsonnet create mode 100644 microsoft-iis-mixin/links.libsonnet create mode 100644 microsoft-iis-mixin/main.libsonnet create mode 100644 microsoft-iis-mixin/panels.libsonnet create mode 100644 microsoft-iis-mixin/rows.libsonnet create mode 100644 microsoft-iis-mixin/signals/app_pools.libsonnet create mode 100644 microsoft-iis-mixin/signals/async_io.libsonnet create mode 100644 microsoft-iis-mixin/signals/connections.libsonnet create mode 100644 microsoft-iis-mixin/signals/data_transfer.libsonnet create mode 100644 microsoft-iis-mixin/signals/requests.libsonnet create mode 100644 microsoft-iis-mixin/signals/server_cache.libsonnet create mode 100644 microsoft-iis-mixin/signals/worker_cache.libsonnet create mode 100644 microsoft-iis-mixin/signals/worker_processes.libsonnet create mode 100644 microsoft-iis-mixin/signals/worker_requests.libsonnet create mode 100644 microsoft-iis-mixin/signals/worker_threads.libsonnet create mode 100644 microsoft-iis-mixin/signals/worker_websocket.libsonnet diff --git a/.gitignore b/.gitignore index d68c86c04..1a57d51f0 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ vendor jsonnetfile.lock.json *.zip +.worktrees diff --git a/microsoft-iis-mixin/.lint b/microsoft-iis-mixin/.lint index b00960a27..a77d4d4c8 100644 --- a/microsoft-iis-mixin/.lint +++ b/microsoft-iis-mixin/.lint @@ -1,4 +1,6 @@ exclusions: + panel-datasource-rule: + reason: "Modern mixins use signal-based architecture where datasource references are handled by the framework" panel-units-rule: reason: "Custom units are used for better user experience in these panels" entries: @@ -16,6 +18,7 @@ exclusions: - panel: "Worker process startup failures" - panel: "Worker process shutdown failures" - panel: "Worker process ping failures" + - panel: "Worker output cache hit ratio" template-datasource-rule: reason: "Based on new convention we are using variable names prometheus_datasource and loki_datasource where as linter expects 'datasource'" template-instance-rule: diff --git a/microsoft-iis-mixin/alerts/alerts.libsonnet b/microsoft-iis-mixin/alerts.libsonnet similarity index 83% rename from microsoft-iis-mixin/alerts/alerts.libsonnet rename to microsoft-iis-mixin/alerts.libsonnet index cb45b2619..b72866447 100644 --- a/microsoft-iis-mixin/alerts/alerts.libsonnet +++ b/microsoft-iis-mixin/alerts.libsonnet @@ -1,14 +1,14 @@ { - prometheusAlerts+:: { - groups+: [ + new(this): { + groups: [ { - name: 'microsoft-iis', + name: this.config.uid + '-alerts', rules: [ { - alert: 'MicrosoftIISHighNumberOfRejectedAsyncIORequests', + alert: 'IISHighRejectedAsyncIORequests', expr: ||| increase(windows_iis_rejected_async_io_requests_total[5m]) > %(alertsWarningHighRejectedAsyncIORequests)s - ||| % $._config, + ||| % this.config, 'for': '5m', labels: { severity: 'warning', @@ -17,14 +17,14 @@ 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, + ||| % this.config, }, }, { - alert: 'MicrosoftIISHighNumberOf5xxRequestErrors', + alert: 'IISHigh5xxRequestErrors', expr: ||| sum without (pid, status_code)(increase(windows_iis_worker_request_errors_total{status_code=~"5.*"}[5m])) > %(alertsCriticalHigh5xxRequests)s - ||| % $._config, + ||| % this.config, 'for': '5m', labels: { severity: 'critical', @@ -33,14 +33,14 @@ 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, + ||| % this.config, }, }, { - alert: 'MicrosoftIISLowSuccessRateForWebsocketConnections', + alert: 'IISLowWebsocketConnectionSuccess', 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', @@ -49,14 +49,14 @@ 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, + ||| % this.config, }, }, { - alert: 'MicrosoftIISThreadpoolUtilizationNearingMax', + alert: 'IISThreadpoolUtilizationHigh', 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', @@ -65,14 +65,14 @@ 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, + ||| % this.config, }, }, { - alert: 'MicrosoftIISHighNumberOfWorkerProcessFailures', + alert: 'IISHighWorkerProcessFailures', expr: ||| increase(windows_iis_total_worker_process_failures[5m]) > %(alertsWarningHighWorkerProcessFailures)s - ||| % $._config, + ||| % this.config, 'for': '5m', labels: { severity: 'warning', @@ -81,7 +81,7 @@ 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, + ||| % this.config, }, }, ], diff --git a/microsoft-iis-mixin/config.libsonnet b/microsoft-iis-mixin/config.libsonnet index 9fada9167..0439e40a7 100644 --- a/microsoft-iis-mixin/config.libsonnet +++ b/microsoft-iis-mixin/config.libsonnet @@ -1,17 +1,49 @@ { - _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, + // Basic filtering + filteringSelector: 'job=~"$job", instance=~"$instance"', + queriesSelector: 'job=~"$job", instance=~"$instance"', + groupLabels: ['job'], + instanceLabels: ['instance'], - enableLokiLogs: true, + // Dashboard settings + dashboardTags: ['microsoft-iis-mixin'], + uid: 'microsoft-iis', + dashboardNamePrefix: 'Microsoft IIS', + dashboardRefresh: '1m', + dashboardPeriod: 'now-1h', + dashboardTimezone: 'default', + + // Logs configuration + enableLokiLogs: true, + logLabels: ['job', 'instance', 'level'], + extraLogLabels: [], + logsVolumeGroupBy: 'level', + showLogsVolume: true, + + // Alert thresholds + alertsWarningHighRejectedAsyncIORequests: 20, // count + alertsCriticalHigh5xxRequests: 5, // % + alertsCriticalLowWebsocketConnectionSuccessRate: 80, // % + alertsCriticalHighThreadPoolUtilization: 90, // % + alertsWarningHighWorkerProcessFailures: 10, // count + + // Metrics source + metricsSource: 'prometheus', + + // Signal definitions + signals+: { + requests: (import './signals/requests.libsonnet')(this), + connections: (import './signals/connections.libsonnet')(this), + data_transfer: (import './signals/data_transfer.libsonnet')(this), + async_io: (import './signals/async_io.libsonnet')(this), + server_cache: (import './signals/server_cache.libsonnet')(this), + app_pools: (import './signals/app_pools.libsonnet')(this), + worker_processes: (import './signals/worker_processes.libsonnet')(this), + worker_requests: (import './signals/worker_requests.libsonnet')(this), + worker_cache: (import './signals/worker_cache.libsonnet')(this), + worker_threads: (import './signals/worker_threads.libsonnet')(this), + worker_websocket: (import './signals/worker_websocket.libsonnet')(this), }, } diff --git a/microsoft-iis-mixin/dashboards.libsonnet b/microsoft-iis-mixin/dashboards.libsonnet new file mode 100644 index 000000000..c8219f672 --- /dev/null +++ b/microsoft-iis-mixin/dashboards.libsonnet @@ -0,0 +1,139 @@ +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, + ] + + + if this.config.enableLokiLogs then + [this.grafana.rows.overviewLogs] else [] + + + [ + this.grafana.rows.overviewCache, + ] + ) + ) + ) + + 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.onLoad() + + 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=vars.datasources.loki.name, + datasourceRegex=vars.datasources.loki.regex, + filterSelector=this.config.filteringSelector, + labels=this.config.logLabels + this.config.extraLogLabels, + formatParser=null, + showLogsVolume=this.config.showLogsVolume, + logsVolumeGroupBy=this.config.logsVolumeGroupBy, + extraFilters=[] + ) + { + dashboards+: + { + logs+: + root.applyCommon( + [], + uid + '_logs', + tags, + links { logs+:: {} }, + annotations, + timezone, + refresh, + period + ), + }, + }.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..e304618ed 100644 --- a/microsoft-iis-mixin/dashboards_out/microsoft-iis-applications.json +++ b/microsoft-iis-mixin/dashboards_out/microsoft-iis-applications.json @@ -1,117 +1,81 @@ { - "__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" + }, + { + "keepTime": true, + "title": "Microsoft IIS overview", + "type": "link", + "url": "/d/microsoftiis_overview" + }, + { + "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", + "type": "row" + }, { "datasource": { - "uid": "${prometheus_datasource}" + "type": "datasource", + "uid": "-- Mixed --" }, "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": [ ] + } }, "gridPos": { "h": 8, "w": 12, "x": 0, - "y": 0 + "y": 1 }, "id": 2, "options": { "legend": { - "calcs": [ ], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" + "placement": "bottom" } }, + "pluginVersion": "v11.0.0", "targets": [ { "datasource": { - "uid": "${prometheus_datasource}" + "type": "prometheus", + "uid": "${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=~\"$job\", instance=~\"$instance\",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 +83,93 @@ }, { "datasource": { - "uid": "${prometheus_datasource}" + "type": "datasource", + "uid": "-- Mixed --" }, "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": [ ] + } }, "gridPos": { "h": 8, "w": 12, "x": 12, - "y": 0 + "y": 1 }, "id": 3, "options": { "legend": { - "calcs": [ ], - "displayMode": "list", - "placement": "right", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" + "placement": "right" } }, + "pluginVersion": "v11.0.0", "targets": [ { "datasource": { - "uid": "${prometheus_datasource}" + "type": "prometheus", + "uid": "${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=~\"$job\", instance=~\"$instance\",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": { - "uid": "${prometheus_datasource}" + "type": "datasource", + "uid": "-- Mixed --" }, "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": [ ] - }, "gridPos": { "h": 8, "w": 12, "x": 0, - "y": 8 + "y": 10 }, - "id": 4, + "id": 5, "options": { "legend": { - "calcs": [ ], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" + "placement": "bottom" } }, + "pluginVersion": "v11.0.0", "targets": [ { "datasource": { - "uid": "${prometheus_datasource}" + "type": "prometheus", + "uid": "${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=~\"$job\", instance=~\"$instance\",job=~\"$job\",instance=~\"$instance\", app=~\"$application\"}[$__rate_interval])\n)", "format": "time_series", + "instant": false, "interval": "1m", - "intervalFactor": 2, - "legendFormat": "{{instance}} - {{app}}" + "legendFormat": "{{instance}} - {{app}}", + "refId": "Websocket connection attempts" } ], "title": "Websocket connection attempts", @@ -301,378 +177,123 @@ }, { "datasource": { - "uid": "${prometheus_datasource}" + "type": "datasource", + "uid": "-- Mixed --" }, "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": [ ] + } }, "gridPos": { "h": 8, "w": 12, "x": 12, - "y": 8 + "y": 10 }, - "id": 5, + "id": 6, "options": { "legend": { - "calcs": [ ], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" + "placement": "bottom" } }, + "pluginVersion": "v11.0.0", "targets": [ { "datasource": { - "uid": "${prometheus_datasource}" + "type": "prometheus", + "uid": "${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=~\"$job\", instance=~\"$instance\",job=~\"$job\",instance=~\"$instance\", app=~\"$application\"}[$__interval:]) / clamp_min(increase(windows_iis_worker_websocket_connection_attempts_total{job=~\"$job\", instance=~\"$instance\",job=~\"$job\",instance=~\"$instance\", app=~\"$application\"}[$__interval:]),1)) * 100", "format": "time_series", + "instant": false, "interval": "1m", - "intervalFactor": 2, - "legendFormat": "{{instance}} - {{app}}" + "legendFormat": "{{instance}} - {{app}}", + "refId": "Websocket connection success rate" } ], "title": "Websocket connection success rate", "type": "timeseries" }, { - "datasource": { - "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 - } - ] - } - }, - "overrides": [ ] - }, + "collapsed": false, "gridPos": { - "h": 8, - "w": 12, + "h": 1, + "w": 0, "x": 0, - "y": 16 - }, - "id": 6, - "options": { - "legend": { - "calcs": [ ], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } + "y": 18 }, - "targets": [ - { - "datasource": { - "uid": "${prometheus_datasource}" - }, - "expr": "sum by(app, instance, job, state) (windows_iis_worker_threads{job=~\"$job\", instance=~\"$instance\", app=~\"$application\"})", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{instance}} - {{app}} - {{state}}" - } - ], - "title": "Current worker threads", - "type": "timeseries" + "id": 7, + "panels": [ ], + "title": "Worker Processes", + "type": "row" }, { "datasource": { - "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 - } - ] - }, - "unit": "percent" - }, - "overrides": [ ] + "type": "datasource", + "uid": "-- Mixed --" }, + "description": "The current number of worker threads processing requests for an IIS application.", "gridPos": { "h": 8, "w": 12, - "x": 12, - "y": 16 + "x": 0, + "y": 19 }, - "id": 7, + "id": 8, "options": { "legend": { - "calcs": [ ], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" + "placement": "right" } }, + "pluginVersion": "v11.0.0", "targets": [ { "datasource": { - "uid": "${prometheus_datasource}" + "type": "prometheus", + "uid": "${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(app, instance, job, state) (\n windows_iis_worker_threads{job=~\"$job\", instance=~\"$instance\",job=~\"$job\",instance=~\"$instance\", app=~\"$application\"}\n)", "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{instance}} - {{app}}" + "instant": false, + "legendFormat": "{{instance}} - {{app}} - {{state}}", + "refId": "Current worker threads" } ], - "title": "Thread pool utilization", + "title": "Current worker threads", "type": "timeseries" }, - { - "collapsed": false, - "datasource": { - "uid": "${prometheus_datasource}" - }, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 24 - }, - "id": 8, - "targets": [ ], - "title": "Worker processes", - "type": "row" - }, { "datasource": { - "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 - } - ] - } - }, - "overrides": [ ] + "type": "datasource", + "uid": "-- Mixed --" }, + "description": "The current number of worker processes for an IIS application pool.", "gridPos": { "h": 8, "w": 12, - "x": 0, - "y": 25 + "x": 12, + "y": 19 }, "id": 9, "options": { "legend": { - "calcs": [ ], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" + "placement": "bottom" } }, + "pluginVersion": "v11.0.0", "targets": [ { "datasource": { - "uid": "${prometheus_datasource}" + "type": "prometheus", + "uid": "${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=~\"$job\", instance=~\"$instance\",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,840 +301,314 @@ }, { "datasource": { - "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 - } - ] - } - }, - "overrides": [ ] + "type": "datasource", + "uid": "-- Mixed --" }, + "description": "Total worker process failures for an IIS application pool.", "gridPos": { "h": 8, - "w": 12, - "x": 12, - "y": 25 + "w": 24, + "x": 0, + "y": 27 }, "id": 10, "options": { "legend": { - "calcs": [ ], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" + "placement": "bottom" } }, + "pluginVersion": "v11.0.0", "targets": [ { "datasource": { - "uid": "${prometheus_datasource}" + "type": "prometheus", + "uid": "${datasource}" }, - "expr": "increase(windows_iis_total_worker_process_failures{job=~\"$job\", instance=~\"$instance\", app=~\"$application\"}[$__interval:])", + "expr": "rate(windows_iis_total_worker_process_failures{job=~\"$job\", instance=~\"$instance\",job=~\"$job\",instance=~\"$instance\", app=~\"$application\"}[$__rate_interval])", "format": "time_series", + "instant": false, "interval": "1m", - "intervalFactor": 2, - "legendFormat": "{{instance}} - {{app}}" - } - ], - "title": "Worker process failures", - "type": "timeseries" - }, - { - "datasource": { - "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 - } - ] - } - }, - "overrides": [ ] - }, - "gridPos": { - "h": 8, - "w": 8, - "x": 0, - "y": 33 - }, - "id": 11, - "options": { - "legend": { - "calcs": [ ], - "displayMode": "list", - "placement": "bottom", - "showLegend": true + "legendFormat": "{{instance}} - {{app}}", + "refId": "Total worker process failures" }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ { "datasource": { - "uid": "${prometheus_datasource}" + "type": "prometheus", + "uid": "${datasource}" }, - "expr": "increase(windows_iis_total_worker_process_startup_failures{job=~\"$job\", instance=~\"$instance\", app=~\"$application\"}[$__interval:])", + "expr": "rate(windows_iis_total_worker_process_startup_failures{job=~\"$job\", instance=~\"$instance\",job=~\"$job\",instance=~\"$instance\", app=~\"$application\"}[$__rate_interval])", "format": "time_series", + "instant": false, "interval": "1m", - "intervalFactor": 2, - "legendFormat": "{{instance}} - {{app}}" - } - ], - "title": "Worker process startup failures", - "type": "timeseries" - }, - { - "datasource": { - "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 - } - ] - } - }, - "overrides": [ ] - }, - "gridPos": { - "h": 8, - "w": 8, - "x": 8, - "y": 33 - }, - "id": 12, - "options": { - "legend": { - "calcs": [ ], - "displayMode": "list", - "placement": "bottom", - "showLegend": true + "legendFormat": "{{instance}} - {{app}}", + "refId": "Worker process startup failures" }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ { "datasource": { - "uid": "${prometheus_datasource}" + "type": "prometheus", + "uid": "${datasource}" }, - "expr": "increase(windows_iis_total_worker_process_shutdown_failures{job=~\"$job\", instance=~\"$instance\", app=~\"$application\"}[$__interval:])", + "expr": "rate(windows_iis_total_worker_process_shutdown_failures{job=~\"$job\", instance=~\"$instance\",job=~\"$job\",instance=~\"$instance\", app=~\"$application\"}[$__rate_interval])", "format": "time_series", + "instant": false, "interval": "1m", - "intervalFactor": 2, - "legendFormat": "{{instance}} - {{app}}" - } - ], - "title": "Worker process shutdown failures", - "type": "timeseries" - }, - { - "datasource": { - "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 - } - ] - } - }, - "overrides": [ ] - }, - "gridPos": { - "h": 8, - "w": 8, - "x": 16, - "y": 33 - }, - "id": 13, - "options": { - "legend": { - "calcs": [ ], - "displayMode": "list", - "placement": "bottom", - "showLegend": true + "legendFormat": "{{instance}} - {{app}}", + "refId": "Worker process shutdown failures" }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ { "datasource": { - "uid": "${prometheus_datasource}" + "type": "prometheus", + "uid": "${datasource}" }, - "expr": "increase(windows_iis_total_worker_process_ping_failures{job=~\"$job\", instance=~\"$instance\", app=~\"$application\"}[$__interval:])", + "expr": "rate(windows_iis_total_worker_process_ping_failures{job=~\"$job\", instance=~\"$instance\",job=~\"$job\",instance=~\"$instance\", app=~\"$application\"}[$__rate_interval])", "format": "time_series", + "instant": false, "interval": "1m", - "intervalFactor": 2, - "legendFormat": "{{instance}} - {{app}}" + "legendFormat": "{{instance}} - {{app}}", + "refId": "Worker process ping failures" } ], - "title": "Worker process ping failures", + "title": "Worker process failures", "type": "timeseries" }, { "collapsed": false, - "datasource": { - "uid": "${prometheus_datasource}" - }, "gridPos": { "h": 1, - "w": 24, + "w": 0, "x": 0, - "y": 41 + "y": 35 }, - "id": 14, - "targets": [ ], + "id": 11, + "panels": [ ], "title": "Cache", "type": "row" }, { "datasource": { - "uid": "${prometheus_datasource}" + "type": "datasource", + "uid": "-- Mixed --" }, - "description": "The current file cache hit ratio for an IIS application.", + "description": "The current file cache hit ratio for an IIS worker process.", "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": 42 + "y": 36 }, - "id": 15, + "id": 12, "options": { "legend": { - "calcs": [ ], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" + "placement": "bottom" } }, + "pluginVersion": "v11.0.0", "targets": [ { "datasource": { - "uid": "${prometheus_datasource}" + "type": "prometheus", + "uid": "${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=~\"$job\", instance=~\"$instance\",job=~\"$job\",instance=~\"$instance\", app=~\"$application\"}[$__interval:]) / clamp_min(increase(windows_iis_worker_file_cache_queries_total{job=~\"$job\", instance=~\"$instance\",job=~\"$job\",instance=~\"$instance\", app=~\"$application\"}[$__interval:]),1)) * 100", "format": "time_series", + "instant": false, "interval": "1m", - "intervalFactor": 2, - "legendFormat": "{{instance}} - {{app}}" + "legendFormat": "{{instance}} - {{app}}", + "refId": "Worker file cache hit ratio" } ], - "title": "File cache hit ratio", + "title": "Worker file cache hit ratio", "type": "timeseries" }, { "datasource": { - "uid": "${prometheus_datasource}" + "type": "datasource", + "uid": "-- Mixed --" }, - "description": "The current URI cache hit ratio for an IIS application.", + "description": "The current URI cache hit ratio for an IIS worker process.", "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": 12, - "y": 42 + "y": 36 }, - "id": 16, + "id": 13, "options": { "legend": { - "calcs": [ ], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" + "placement": "bottom" } }, + "pluginVersion": "v11.0.0", "targets": [ { "datasource": { - "uid": "${prometheus_datasource}" + "type": "prometheus", + "uid": "${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=~\"$job\", instance=~\"$instance\",job=~\"$job\",instance=~\"$instance\", app=~\"$application\"}[$__interval:]) / clamp_min(increase(windows_iis_worker_uri_cache_queries_total{job=~\"$job\", instance=~\"$instance\",job=~\"$job\",instance=~\"$instance\", app=~\"$application\"}[$__interval:]),1)) * 100", "format": "time_series", + "instant": false, "interval": "1m", - "intervalFactor": 2, - "legendFormat": "{{instance}} - {{app}}" + "legendFormat": "{{instance}} - {{app}}", + "refId": "Worker URI cache hit ratio" } ], - "title": "URI cache hit ratio", + "title": "Worker URI cache hit ratio", "type": "timeseries" }, { "datasource": { - "uid": "${prometheus_datasource}" + "type": "datasource", + "uid": "-- Mixed --" }, - "description": "The current metadata cache hit ratio for an IIS site.", + "description": "The current metadata cache hit ratio for an IIS worker process.", "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": 50 + "y": 44 }, - "id": 17, + "id": 14, "options": { "legend": { - "calcs": [ ], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" + "placement": "bottom" } }, + "pluginVersion": "v11.0.0", "targets": [ { "datasource": { - "uid": "${prometheus_datasource}" + "type": "prometheus", + "uid": "${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=~\"$job\", instance=~\"$instance\",job=~\"$job\",instance=~\"$instance\", app=~\"$application\"}[$__interval:]) / clamp_min(increase(windows_iis_worker_metadata_cache_queries_total{job=~\"$job\", instance=~\"$instance\",job=~\"$job\",instance=~\"$instance\", app=~\"$application\"}[$__interval:]),1)) * 100", "format": "time_series", + "instant": false, "interval": "1m", - "intervalFactor": 2, - "legendFormat": "{{instance}} - {{app}}" + "legendFormat": "{{instance}} - {{app}}", + "refId": "Worker metadata cache hit ratio" } ], - "title": "Metadata cache hit ratio", + "title": "Worker metadata cache hit ratio", "type": "timeseries" }, { "datasource": { - "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 - } - ] - }, - "unit": "percent" - }, - "overrides": [ ] + "type": "datasource", + "uid": "-- Mixed --" }, + "description": "The current output cache hit ratio for an IIS worker process.", "gridPos": { "h": 8, "w": 12, "x": 12, - "y": 50 + "y": 44 }, - "id": 18, + "id": 15, "options": { "legend": { - "calcs": [ ], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" + "placement": "bottom" } }, + "pluginVersion": "v11.0.0", "targets": [ { "datasource": { - "uid": "${prometheus_datasource}" + "type": "prometheus", + "uid": "${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=~\"$job\", instance=~\"$instance\",job=~\"$job\",instance=~\"$instance\", app=~\"$application\"}[$__interval:]) / clamp_min(increase(windows_iis_worker_output_queries_total{job=~\"$job\", instance=~\"$instance\",job=~\"$job\",instance=~\"$instance\", app=~\"$application\"}[$__interval:]),1))", "format": "time_series", + "instant": false, "interval": "1m", - "intervalFactor": 2, - "legendFormat": "{{instance}} - {{app}}" + "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_current_connections{job=~\"$job\", instance=~\"$instance\"}, 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_current_connections{job=~\"$job\", instance=~\"$instance\",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" } ] }, @@ -1521,33 +616,7 @@ "from": "now-1h", "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..884a2870a --- /dev/null +++ b/microsoft-iis-mixin/dashboards_out/microsoft-iis-logs.json @@ -0,0 +1,240 @@ +{ + "annotations": { + "list": [ ] + }, + "links": [ + { + "keepTime": true, + "title": "Microsoft IIS applications", + "type": "link", + "url": "/d/microsoftiis_applications" + }, + { + "keepTime": true, + "title": "Microsoft IIS overview", + "type": "link", + "url": "/d/microsoftiis_overview" + }, + { + "asDropdown": true, + "includeVars": true, + "keepTime": true, + "tags": [ + "microsoft-iis-mixin" + ], + "title": "All dashboards", + "type": "dashboards" + } + ], + "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=~\"$job\", instance=~\"$instance\",job=~\"$job\",instance=~\"$instance\",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": true, + "wrapLogMessage": true + }, + "pluginVersion": "v11.0.0", + "targets": [ + { + "datasource": { + "type": "loki", + "uid": "${loki_datasource}" + }, + "expr": "{job=~\"$job\", instance=~\"$instance\",job=~\"$job\",instance=~\"$instance\",level=~\"$level\"} \n|~ \"$regex_search\"\n\n[ ]\n" + } + ], + "title": "Logs", + "type": "logs" + } + ], + "refresh": "1m", + "schemaVersion": 39, + "tags": [ + "microsoft-iis-mixin" + ], + "templating": { + "list": [ ] + }, + "time": { + "from": "now-1h", + "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..ed13ccd5c 100644 --- a/microsoft-iis-mixin/dashboards_out/microsoft-iis-overview.json +++ b/microsoft-iis-mixin/dashboards_out/microsoft-iis-overview.json @@ -1,117 +1,81 @@ { - "__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": { - "uid": "${prometheus_datasource}" + "type": "datasource", + "uid": "-- Mixed --" }, "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": [ ] + } }, "gridPos": { "h": 8, "w": 12, "x": 0, - "y": 0 + "y": 1 }, "id": 2, - "options": { - "legend": { - "calcs": [ ], - "displayMode": "list", - "placement": "right", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, + "pluginVersion": "v11.0.0", "targets": [ { "datasource": { - "uid": "${prometheus_datasource}" + "type": "prometheus", + "uid": "${datasource}" }, - "expr": "rate(windows_iis_requests_total{job=~\"$job\", instance=~\"$instance\", site=~\"$site\"}[$__rate_interval])", + "expr": "rate(windows_iis_requests_total{job=~\"$job\", instance=~\"$instance\",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 +83,108 @@ }, { "datasource": { - "uid": "${prometheus_datasource}" + "type": "datasource", + "uid": "-- Mixed --" }, "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": [ ] + } }, "gridPos": { "h": 8, "w": 12, "x": 12, - "y": 0 + "y": 1 }, "id": 3, "options": { "legend": { - "calcs": [ ], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" + "placement": "bottom" } }, + "pluginVersion": "v11.0.0", "targets": [ { "datasource": { - "uid": "${prometheus_datasource}" + "type": "prometheus", + "uid": "${datasource}" }, - "expr": "rate(windows_iis_locked_errors_total{job=~\"$job\", instance=~\"$instance\", site=~\"$site\"}[$__rate_interval])", + "expr": "rate(windows_iis_locked_errors_total{job=~\"$job\", instance=~\"$instance\",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": { - "uid": "${prometheus_datasource}" + "type": "prometheus", + "uid": "${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=~\"$job\", instance=~\"$instance\",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": { - "uid": "${prometheus_datasource}" + "type": "datasource", + "uid": "-- Mixed --" }, "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": [ ] + } }, "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" + "mode": "none" } }, + "pluginVersion": "v11.0.0", "targets": [ { "datasource": { - "uid": "${prometheus_datasource}" + "type": "prometheus", + "uid": "${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=~\"$job\", instance=~\"$instance\",job=~\"$job\",instance=~\"$instance\", site=~\"$site\"}[$__rate_interval])", "format": "time_series", + "instant": false, "interval": "1m", - "intervalFactor": 2, - "legendFormat": "{{instance}} - {{site}}" + "legendFormat": "{{instance}} - {{site}}", + "refId": "Blocked async I/O requests" } ], "title": "Blocked async I/O requests", @@ -312,183 +192,94 @@ }, { "datasource": { - "uid": "${prometheus_datasource}" + "type": "datasource", + "uid": "-- Mixed --" }, "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": [ ] + } }, "gridPos": { "h": 8, "w": 12, "x": 12, - "y": 8 + "y": 10 }, - "id": 5, + "id": 6, "options": { "legend": { - "calcs": [ ], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" + "placement": "bottom" } }, + "pluginVersion": "v11.0.0", "targets": [ { "datasource": { - "uid": "${prometheus_datasource}" + "type": "prometheus", + "uid": "${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=~\"$job\", instance=~\"$instance\",job=~\"$job\",instance=~\"$instance\", site=~\"$site\"}[$__rate_interval])", "format": "time_series", + "instant": false, "interval": "1m", - "intervalFactor": 2, - "legendFormat": "{{instance}} - {{site}}" + "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": { - "uid": "${prometheus_datasource}" + "type": "datasource", + "uid": "-- Mixed --" }, "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": [ ] + } }, "gridPos": { "h": 8, "w": 12, "x": 0, - "y": 16 + "y": 19 }, - "id": 6, + "id": 8, "options": { "legend": { - "calcs": [ ], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" + "placement": "bottom" } }, + "pluginVersion": "v11.0.0", "targets": [ { "datasource": { - "uid": "${prometheus_datasource}" + "type": "prometheus", + "uid": "${datasource}" }, - "expr": "rate(windows_iis_sent_bytes_total{job=~\"$job\", instance=~\"$instance\", site=~\"$site\"}[$__rate_interval])", + "expr": "rate(windows_iis_sent_bytes_total{job=~\"$job\", instance=~\"$instance\",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 +287,40 @@ }, { "datasource": { - "uid": "${prometheus_datasource}" + "type": "datasource", + "uid": "-- Mixed --" }, "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": [ ] + } }, "gridPos": { "h": 8, "w": 12, "x": 12, - "y": 16 + "y": 19 }, - "id": 7, + "id": 9, "options": { "legend": { - "calcs": [ ], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" + "placement": "bottom" } }, + "pluginVersion": "v11.0.0", "targets": [ { "datasource": { - "uid": "${prometheus_datasource}" + "type": "prometheus", + "uid": "${datasource}" }, - "expr": "rate(windows_iis_received_bytes_total{job=~\"$job\", instance=~\"$instance\", site=~\"$site\"}[$__rate_interval])", + "expr": "rate(windows_iis_received_bytes_total{job=~\"$job\", instance=~\"$instance\",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 +328,40 @@ }, { "datasource": { - "uid": "${prometheus_datasource}" + "type": "datasource", + "uid": "-- Mixed --" }, "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": [ ] + } }, "gridPos": { "h": 8, "w": 12, "x": 0, - "y": 24 + "y": 27 }, - "id": 8, + "id": 10, "options": { "legend": { - "calcs": [ ], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" + "placement": "bottom" } }, + "pluginVersion": "v11.0.0", "targets": [ { "datasource": { - "uid": "${prometheus_datasource}" + "type": "prometheus", + "uid": "${datasource}" }, - "expr": "rate(windows_iis_files_sent_total{job=~\"$job\", instance=~\"$instance\", site=~\"$site\"}[$__rate_interval])", + "expr": "rate(windows_iis_files_sent_total{job=~\"$job\", instance=~\"$instance\",job=~\"$job\",instance=~\"$instance\", site=~\"$site\"}[$__rate_interval])", "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{instance}} - {{site}}" + "instant": false, + "legendFormat": "{{instance}} - {{site}}", + "refId": "Files sent per second" } ], "title": "Files sent", @@ -680,180 +369,87 @@ }, { "datasource": { - "uid": "${prometheus_datasource}" + "type": "datasource", + "uid": "-- Mixed --" }, "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 + "y": 27 }, - "id": 9, + "id": 11, "options": { "legend": { - "calcs": [ ], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" + "placement": "bottom" } }, + "pluginVersion": "v11.0.0", "targets": [ { "datasource": { - "uid": "${prometheus_datasource}" + "type": "prometheus", + "uid": "${datasource}" }, - "expr": "rate(windows_iis_files_received_total{job=~\"$job\", instance=~\"$instance\", site=~\"$site\"}[$__rate_interval])", + "expr": "rate(windows_iis_files_received_total{job=~\"$job\", instance=~\"$instance\",job=~\"$job\",instance=~\"$instance\", site=~\"$site\"}[$__rate_interval])", "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{instance}} - {{site}}" + "instant": false, + "legendFormat": "{{instance}} - {{site}}", + "refId": "Files received per second" } ], "title": "Files received", "type": "timeseries" }, + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 0, + "x": 0, + "y": 35 + }, + "id": 12, + "panels": [ ], + "title": "Connections", + "type": "row" + }, { "datasource": { - "uid": "${prometheus_datasource}" + "type": "datasource", + "uid": "-- Mixed --" }, "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 + "y": 36 }, - "id": 10, + "id": 13, "options": { "legend": { - "calcs": [ ], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" + "placement": "bottom" } }, + "pluginVersion": "v11.0.0", "targets": [ { "datasource": { - "uid": "${prometheus_datasource}" + "type": "prometheus", + "uid": "${datasource}" }, - "expr": "windows_iis_current_connections{job=~\"$job\", instance=~\"$instance\", site=~\"$site\"}", + "expr": "windows_iis_current_connections{job=~\"$job\", instance=~\"$instance\",job=~\"$job\",instance=~\"$instance\", site=~\"$site\"}", "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{instance}} - {{site}}" + "instant": false, + "legendFormat": "{{instance}} - {{site}}", + "refId": "Current connections" } ], "title": "Current connections", @@ -861,615 +457,151 @@ }, { "datasource": { - "uid": "${prometheus_datasource}" + "type": "datasource", + "uid": "-- Mixed --" }, "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": 36 }, - "id": 11, + "id": 14, "options": { "legend": { - "calcs": [ ], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" + "placement": "bottom" } }, + "pluginVersion": "v11.0.0", "targets": [ { "datasource": { - "uid": "${prometheus_datasource}" + "type": "prometheus", + "uid": "${datasource}" }, - "expr": "increase(windows_iis_connection_attempts_all_instances_total{job=~\"$job\", instance=~\"$instance\", site=~\"$site\"}[$__interval:])", + "expr": "rate(windows_iis_connection_attempts_all_instances_total{job=~\"$job\", instance=~\"$instance\",job=~\"$job\",instance=~\"$instance\", site=~\"$site\"}[$__rate_interval])", "format": "time_series", + "instant": false, "interval": "1m", - "intervalFactor": 2, - "legendFormat": "{{instance}} - {{site}}" + "legendFormat": "{{instance}} - {{site}}", + "refId": "Connection attempts" } ], "title": "Attempted connections", "type": "timeseries" }, + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 0, + "x": 0, + "y": 44 + }, + "id": 15, + "panels": [ ], + "title": "Logs", + "type": "row" + }, { "datasource": { - "uid": "${loki_datasource}" + "type": "datasource", + "uid": "-- Mixed --" }, "description": "Recent access logs from access logs file for an IIS site.", "gridPos": { "h": 10, "w": 24, "x": 0, - "y": 40 + "y": 45 }, - "id": 12, + "id": 16, "options": { - "dedupStrategy": "none", "enableLogDetails": true, - "prettifyLogMessage": false, "showCommonLabels": false, - "showLabels": false, "showTime": false, - "sortOrder": "Descending", "wrapLogMessage": false }, + "pluginVersion": "v11.0.0", "targets": [ { "datasource": { + "type": "loki", "uid": "${loki_datasource}" }, - "editorMode": "code", - "expr": "{job=~\"$job\", site=~\"$site\"} |= ``", - "queryType": "range", - "refId": "A" + "expr": "{job=~\"$job\", instance=~\"$instance\", site=~\"$site\"} |= ``" } ], "title": "Access logs", "type": "logs" - }, - { - "collapsed": false, - "datasource": { - "uid": "${prometheus_datasource}" - }, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 50 - }, - "id": 13, - "targets": [ ], - "title": "Cache", - "type": "row" - }, - { - "datasource": { - "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.", - "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}}" - } - ], - "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 - }, - "id": 16, - "options": { - "legend": { - "calcs": [ ], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "datasource": { - "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", - "format": "time_series", - "interval": "1m", - "intervalFactor": 2, - "legendFormat": "{{job}} - {{instance}}" - } - ], - "title": "Metadata cache hit ratio", - "type": "timeseries" - }, - { - "datasource": { - "uid": "${prometheus_datasource}" - }, - "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": [ ] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 59 - }, - "id": 17, - "options": { - "legend": { - "calcs": [ ], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "mode": "single", - "sort": "none" - } - }, - "targets": [ - { - "datasource": { - "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", - "format": "time_series", - "interval": "1m", - "intervalFactor": 2, - "legendFormat": "{{job}} - {{instance}}" - } - ], - "title": "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" - }, - { - "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_current_connections{job=~\"$job\", instance=~\"$instance\"}, 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_current_connections{job=~\"$job\", instance=~\"$instance\",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": "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" } ] }, @@ -1477,33 +609,7 @@ "from": "now-1h", "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..ba90fd9b0 --- /dev/null +++ b/microsoft-iis-mixin/g.libsonnet @@ -0,0 +1,3 @@ +// grafonnet must be imported with "g" alias +local g = import './vendor/grafonnet-v11.0.0/main.libsonnet'; +g diff --git a/microsoft-iis-mixin/jsonnetfile.json b/microsoft-iis-mixin/jsonnetfile.json index 93f3316ec..cd4c0af70 100644 --- a/microsoft-iis-mixin/jsonnetfile.json +++ b/microsoft-iis-mixin/jsonnetfile.json @@ -4,8 +4,26 @@ { "source": { "git": { - "remote": "https://github.com/grafana/grafonnet-lib.git", - "subdir": "grafonnet" + "remote": "https://github.com/grafana/grafonnet", + "subdir": "gen/grafonnet-v11.0.0" + } + }, + "version": "main" + }, + { + "source": { + "git": { + "remote": "https://github.com/grafana/jsonnet-libs.git", + "subdir": "common-lib" + } + }, + "version": "master" + }, + { + "source": { + "git": { + "remote": "https://github.com/grafana/jsonnet-libs.git", + "subdir": "logs-lib" } }, "version": "master" diff --git a/microsoft-iis-mixin/links.libsonnet b/microsoft-iis-mixin/links.libsonnet new file mode 100644 index 000000000..9f823db7e --- /dev/null +++ b/microsoft-iis-mixin/links.libsonnet @@ -0,0 +1,27 @@ +local g = import './g.libsonnet'; + +{ + local link = g.dashboard.link, + new(this): { + microsoftIISOverview: + link.link.new(this.config.dashboardNamePrefix + ' overview', '/d/' + this.grafana.dashboards['microsoft-iis-overview.json'].uid) + + link.link.options.withKeepTime(true), + + microsoftIISApplications: + link.link.new(this.config.dashboardNamePrefix + ' applications', '/d/' + this.grafana.dashboards['microsoft-iis-applications.json'].uid) + + link.link.options.withKeepTime(true), + + otherDashboards: + 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(this.config.dashboardNamePrefix + ' 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..a29e77351 --- /dev/null +++ b/microsoft-iis-mixin/main.libsonnet @@ -0,0 +1,48 @@ +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_current_connections', + 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..432d3be4e 100644 --- a/microsoft-iis-mixin/mixin.libsonnet +++ b/microsoft-iis-mixin/mixin.libsonnet @@ -1,3 +1,20 @@ -(import 'dashboards/dashboards.libsonnet') + -(import 'alerts/alerts.libsonnet') + -(import 'config.libsonnet') +local lib = import './main.libsonnet'; +local config = (import './config.libsonnet'); + +local microsoftIIS = + lib.new() + + lib.withConfigMixin({ + filteringSelector: config.filteringSelector, + uid: config.uid, + enableLokiLogs: config.enableLokiLogs, + }); + +// populate monitoring-mixin: +{ + grafanaDashboards+:: { + [fname]: microsoftIIS.grafana.dashboards[fname] + for fname in std.objectFields(microsoftIIS.grafana.dashboards) + }, + prometheusAlerts+:: microsoftIIS.prometheus.alerts, + prometheusRules+:: microsoftIIS.prometheus.recordingRules, +} diff --git a/microsoft-iis-mixin/panels.libsonnet b/microsoft-iis-mixin/panels.libsonnet new file mode 100644 index 000000000..952d3635a --- /dev/null +++ b/microsoft-iis-mixin/panels.libsonnet @@ -0,0 +1,279 @@ +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: + g.panel.timeSeries.new('Requests') + + g.panel.timeSeries.panelOptions.withDescription('The request rate split by HTTP Method for an IIS site') + + g.panel.timeSeries.queryOptions.withTargets([ + signals.requests.requests.asTarget(), + ]) + + g.panel.timeSeries.standardOptions.withUnit('reqps') + + g.panel.timeSeries.fieldConfig.defaults.custom.withStacking({ mode: 'normal' }), + + requestErrors: + g.panel.timeSeries.new('Request errors') + + g.panel.timeSeries.panelOptions.withDescription('Requests that have resulted in errors for an IIS site.') + + g.panel.timeSeries.queryOptions.withTargets([ + signals.requests.lockedErrors.asTarget(), + signals.requests.notFoundErrors.asTarget(), + ]) + + g.panel.timeSeries.standardOptions.withUnit('errors/sec') + + g.panel.timeSeries.options.legend.withPlacement('bottom'), + + blockedAsyncIORequests: + g.panel.timeSeries.new('Blocked async I/O requests') + + g.panel.timeSeries.panelOptions.withDescription('Number of async I/O requests that are currently queued for an IIS site.') + + g.panel.timeSeries.queryOptions.withTargets([ + signals.async_io.blockedRequests.asTarget() + + g.query.prometheus.withInterval('1m'), + ]) + + 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: + g.panel.timeSeries.new('Rejected async I/O requests') + + g.panel.timeSeries.panelOptions.withDescription('Number of async I/O requests that have been rejected for an IIS site.') + + g.panel.timeSeries.queryOptions.withTargets([ + signals.async_io.rejectedRequests.asTarget() + + g.query.prometheus.withInterval('1m'), + ]) + + g.panel.timeSeries.standardOptions.withUnit('requests') + + g.panel.timeSeries.standardOptions.withMin(0) + + g.panel.timeSeries.options.legend.withPlacement('bottom'), + + trafficSent: + g.panel.timeSeries.new('Traffic sent') + + g.panel.timeSeries.panelOptions.withDescription('The traffic sent by an IIS site.') + + g.panel.timeSeries.queryOptions.withTargets([ + signals.data_transfer.bytesSent.asTarget(), + ]) + + g.panel.timeSeries.standardOptions.withUnit('Bps') + + g.panel.timeSeries.options.legend.withPlacement('bottom'), + + trafficReceived: + g.panel.timeSeries.new('Traffic received') + + g.panel.timeSeries.panelOptions.withDescription('The traffic received by an IIS site.') + + g.panel.timeSeries.queryOptions.withTargets([ + signals.data_transfer.bytesReceived.asTarget(), + ]) + + g.panel.timeSeries.standardOptions.withUnit('Bps') + + g.panel.timeSeries.standardOptions.withMin(0) + + g.panel.timeSeries.options.legend.withPlacement('bottom'), + + filesSent: + g.panel.timeSeries.new('Files sent') + + g.panel.timeSeries.panelOptions.withDescription('The files sent by an IIS site.') + + g.panel.timeSeries.queryOptions.withTargets([ + signals.data_transfer.filesSent.asTarget(), + ]) + + g.panel.timeSeries.standardOptions.withUnit('files/s') + + g.panel.timeSeries.standardOptions.withMin(0) + + g.panel.timeSeries.options.legend.withPlacement('bottom'), + + filesReceived: + g.panel.timeSeries.new('Files received') + + g.panel.timeSeries.panelOptions.withDescription('The files received by an IIS site.') + + g.panel.timeSeries.queryOptions.withTargets([ + signals.data_transfer.filesReceived.asTarget(), + ]) + + g.panel.timeSeries.standardOptions.withUnit('files/s') + + g.panel.timeSeries.options.legend.withPlacement('bottom'), + + currentConnections: + g.panel.timeSeries.new('Current connections') + + g.panel.timeSeries.panelOptions.withDescription('The number of current connections to an IIS site.') + + g.panel.timeSeries.queryOptions.withTargets([ + signals.connections.currentConnections.asTarget(), + ]) + + g.panel.timeSeries.options.legend.withPlacement('bottom'), + + attemptedConnections: + g.panel.timeSeries.new('Attempted connections') + + g.panel.timeSeries.panelOptions.withDescription('The number of attempted connections to an IIS site.') + + g.panel.timeSeries.queryOptions.withTargets([ + signals.connections.connectionAttempts.asTarget() + + g.query.prometheus.withInterval('1m'), + ]) + + g.panel.timeSeries.options.legend.withPlacement('bottom'), + + // Server Cache Panels + fileCacheHitRatio: + g.panel.timeSeries.new('File cache hit ratio') + + g.panel.timeSeries.panelOptions.withDescription('The current file cache hit ratio for an IIS server.') + + g.panel.timeSeries.queryOptions.withTargets([ + signals.server_cache.fileCacheHitRatio.asTarget() + + g.query.prometheus.withInterval('1m'), + ]) + + g.panel.timeSeries.standardOptions.withUnit('percent') + + g.panel.timeSeries.options.legend.withPlacement('bottom'), + + uriCacheHitRatio: + g.panel.timeSeries.new('URI cache hit ratio') + + g.panel.timeSeries.panelOptions.withDescription('The current URI cache hit ratio for an IIS server.') + + g.panel.timeSeries.queryOptions.withTargets([ + signals.server_cache.uriCacheHitRatio.asTarget() + + g.query.prometheus.withInterval('1m'), + ]) + + g.panel.timeSeries.standardOptions.withUnit('percent') + + g.panel.timeSeries.standardOptions.withMin(0) + + g.panel.timeSeries.options.legend.withPlacement('bottom'), + + metadataCacheHitRatio: + g.panel.timeSeries.new('Metadata cache hit ratio') + + g.panel.timeSeries.panelOptions.withDescription('The current metadata cache hit ratio for an IIS server.') + + g.panel.timeSeries.queryOptions.withTargets([ + signals.server_cache.metadataCacheHitRatio.asTarget() + + g.query.prometheus.withInterval('1m'), + ]) + + g.panel.timeSeries.standardOptions.withUnit('percent') + + g.panel.timeSeries.standardOptions.withMin(0) + + g.panel.timeSeries.options.legend.withPlacement('bottom'), + + outputCacheHitRatio: + g.panel.timeSeries.new('Output cache hit ratio') + + g.panel.timeSeries.panelOptions.withDescription('The current output cache hit ratio for an IIS site.') + + g.panel.timeSeries.queryOptions.withTargets([ + signals.server_cache.outputCacheHitRatio.asTarget() + + g.query.prometheus.withInterval('1m'), + ]) + + g.panel.timeSeries.standardOptions.withUnit('percent') + + g.panel.timeSeries.options.legend.withPlacement('bottom'), + + // Application Panels + workerRequests: + g.panel.timeSeries.new('Requests') + + g.panel.timeSeries.panelOptions.withDescription('The HTTP request rate for an IIS application.') + + g.panel.timeSeries.queryOptions.withTargets([ + signals.worker_requests.requests.withExprWrappersMixin(['sum by(app, job, instance) (', ')']) + .asTarget(), + ]) + + g.panel.timeSeries.standardOptions.withUnit('reqps') + + g.panel.timeSeries.options.legend.withPlacement('bottom'), + + workerRequestErrors: + g.panel.timeSeries.new('Request errors') + + g.panel.timeSeries.panelOptions.withDescription('Requests that have resulted in errors for an IIS application.') + + g.panel.timeSeries.queryOptions.withTargets([ + signals.worker_requests.requestErrors.withExprWrappersMixin(['sum by(app, instance, job, status_code) (', ')']) + .asTarget(), + ]) + + g.panel.timeSeries.standardOptions.withUnit('reqps') + + g.panel.timeSeries.fieldConfig.defaults.custom.withStacking({ mode: 'normal' }) + + g.panel.timeSeries.options.legend.withPlacement('right'), + + websocketConnectionAttempts: + g.panel.timeSeries.new('Websocket connection attempts') + + g.panel.timeSeries.panelOptions.withDescription('The number of attempted websocket connections for an IIS application.') + + g.panel.timeSeries.queryOptions.withTargets([ + signals.worker_websocket.connectionAttempts.withExprWrappersMixin(['sum by(app, instance, job) (', ')']) + .asTarget() + + g.query.prometheus.withInterval('1m'), + ]) + + g.panel.timeSeries.options.legend.withPlacement('bottom'), + + websocketConnectionSuccessRate: + g.panel.timeSeries.new('Websocket connection success rate') + + g.panel.timeSeries.panelOptions.withDescription('The success rate of websocket connection attempts for an IIS application.') + + g.panel.timeSeries.queryOptions.withTargets([ + signals.worker_websocket.connectionSuccessRate.asTarget() + + g.query.prometheus.withInterval('1m'), + ]) + + g.panel.timeSeries.standardOptions.withUnit('percent') + + g.panel.timeSeries.options.legend.withPlacement('bottom'), + + currentWorkerThreads: + g.panel.timeSeries.new('Current worker threads') + + g.panel.timeSeries.panelOptions.withDescription('The current number of worker threads processing requests for an IIS application.') + + g.panel.timeSeries.queryOptions.withTargets([ + signals.worker_threads.currentThreads.withExprWrappersMixin(['sum by(app, instance, job, state) (', ')']) + .asTarget(), + ]) + + g.panel.timeSeries.options.legend.withPlacement('right'), + + currentWorkerProcesses: + g.panel.timeSeries.new('Current worker processes') + + g.panel.timeSeries.panelOptions.withDescription('The current number of worker processes for an IIS application pool.') + + g.panel.timeSeries.queryOptions.withTargets([ + signals.app_pools.currentWorkerProcesses.withExprWrappersMixin(['sum by(app, instance, job) (', ')']) + .asTarget(), + ]) + + g.panel.timeSeries.options.legend.withPlacement('bottom'), + + workerProcessFailures: + g.panel.timeSeries.new('Worker process failures') + + g.panel.timeSeries.panelOptions.withDescription('Total worker process failures for an IIS application pool.') + + g.panel.timeSeries.queryOptions.withTargets([ + signals.worker_processes.totalFailures.asTarget() + + g.query.prometheus.withInterval('1m'), + signals.worker_processes.startupFailures.asTarget() + + g.query.prometheus.withInterval('1m'), + signals.worker_processes.shutdownFailures.asTarget() + + g.query.prometheus.withInterval('1m'), + signals.worker_processes.pingFailures.asTarget() + + g.query.prometheus.withInterval('1m'), + ]) + + g.panel.timeSeries.options.legend.withPlacement('bottom'), + + workerFileCacheHitRatio: + g.panel.timeSeries.new('Worker file cache hit ratio') + + g.panel.timeSeries.panelOptions.withDescription('The current file cache hit ratio for an IIS worker process.') + + g.panel.timeSeries.queryOptions.withTargets([ + signals.worker_cache.fileCacheHitRatio.asTarget() + + g.query.prometheus.withInterval('1m'), + ]) + + g.panel.timeSeries.standardOptions.withUnit('percent') + + g.panel.timeSeries.options.legend.withPlacement('bottom'), + + workerUriCacheHitRatio: + g.panel.timeSeries.new('Worker URI cache hit ratio') + + g.panel.timeSeries.panelOptions.withDescription('The current URI cache hit ratio for an IIS worker process.') + + g.panel.timeSeries.queryOptions.withTargets([ + signals.worker_cache.uriCacheHitRatio.asTarget() + + g.query.prometheus.withInterval('1m'), + ]) + + g.panel.timeSeries.standardOptions.withUnit('percent') + + g.panel.timeSeries.options.legend.withPlacement('bottom'), + + workerMetadataCacheHitRatio: + g.panel.timeSeries.new('Worker metadata cache hit ratio') + + g.panel.timeSeries.panelOptions.withDescription('The current metadata cache hit ratio for an IIS worker process.') + + g.panel.timeSeries.queryOptions.withTargets([ + signals.worker_cache.metadataCacheHitRatio.asTarget() + + g.query.prometheus.withInterval('1m'), + ]) + + g.panel.timeSeries.standardOptions.withUnit('percent') + + g.panel.timeSeries.options.legend.withPlacement('bottom'), + + workerOutputCacheHitRatio: + g.panel.timeSeries.new('Worker output cache hit ratio') + + g.panel.timeSeries.panelOptions.withDescription('The current output cache hit ratio for an IIS worker process.') + + g.panel.timeSeries.queryOptions.withTargets([ + signals.worker_cache.outputCacheHitRatio.asTarget() + + g.query.prometheus.withInterval('1m'), + ]) + + g.panel.timeSeries.options.legend.withPlacement('bottom'), + + // Logs panel + accessLogs: + g.panel.logs.new('Access logs') + + g.panel.logs.panelOptions.withDescription('Recent access logs from access logs file for an IIS site.') + + g.panel.logs.queryOptions.withTargets([ + g.query.loki.new( + '${loki_datasource}', + '{' + this.config.filteringSelector + ', site=~"$site"} |= ``' + ), + ]) + + g.panel.logs.options.withEnableLogDetails(true) + + g.panel.logs.options.withShowCommonLabels(false) + + g.panel.logs.options.withShowTime(false) + + g.panel.logs.options.withWrapLogMessage(false), + }, +} diff --git a/microsoft-iis-mixin/prometheus_rules_out/prometheus_alerts.yaml b/microsoft-iis-mixin/prometheus_rules_out/prometheus_alerts.yaml index 7554a2b30..3ab7d45d5 100644 --- a/microsoft-iis-mixin/prometheus_rules_out/prometheus_alerts.yaml +++ b/microsoft-iis-mixin/prometheus_rules_out/prometheus_alerts.yaml @@ -1,7 +1,7 @@ groups: - - name: microsoft-iis + - name: microsoft-iis-alerts rules: - - alert: MicrosoftIISHighNumberOfRejectedAsyncIORequests + - alert: IISHighRejectedAsyncIORequests 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. @@ -11,7 +11,7 @@ groups: for: 5m labels: severity: warning - - alert: MicrosoftIISHighNumberOf5xxRequestErrors + - alert: IISHigh5xxRequestErrors 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. @@ -21,7 +21,7 @@ groups: for: 5m labels: severity: critical - - alert: MicrosoftIISLowSuccessRateForWebsocketConnections + - alert: IISLowWebsocketConnectionSuccess 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. @@ -31,7 +31,7 @@ groups: for: 5m labels: severity: critical - - alert: MicrosoftIISThreadpoolUtilizationNearingMax + - alert: IISThreadpoolUtilizationHigh 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. @@ -41,7 +41,7 @@ groups: for: 5m labels: severity: critical - - alert: MicrosoftIISHighNumberOfWorkerProcessFailures + - alert: IISHighWorkerProcessFailures 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. diff --git a/microsoft-iis-mixin/rows.libsonnet b/microsoft-iis-mixin/rows.libsonnet new file mode 100644 index 000000000..c5c1fb0f8 --- /dev/null +++ b/microsoft-iis-mixin/rows.libsonnet @@ -0,0 +1,85 @@ +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.withPanels([ + panels.requests { gridPos: { h: 8, w: 12, x: 0, y: 0 } }, + panels.requestErrors { gridPos: { h: 8, w: 12, x: 12, y: 0 } }, + ]), + + overviewAsyncIO: + g.panel.row.new('Async I/O') + + g.panel.row.withPanels([ + panels.blockedAsyncIORequests { gridPos: { h: 8, w: 12, x: 0, y: 0 } }, + panels.rejectedAsyncIORequests { gridPos: { h: 8, w: 12, x: 12, y: 0 } }, + ]), + + overviewTraffic: + g.panel.row.new('Traffic') + + g.panel.row.withPanels([ + panels.trafficSent { gridPos: { h: 8, w: 12, x: 0, y: 0 } }, + panels.trafficReceived { gridPos: { h: 8, w: 12, x: 12, y: 0 } }, + panels.filesSent { gridPos: { h: 8, w: 12, x: 0, y: 8 } }, + panels.filesReceived { gridPos: { h: 8, w: 12, x: 12, y: 8 } }, + ]), + + overviewConnections: + g.panel.row.new('Connections') + + g.panel.row.withPanels([ + panels.currentConnections { gridPos: { h: 8, w: 12, x: 0, y: 0 } }, + panels.attemptedConnections { gridPos: { h: 8, w: 12, x: 12, y: 0 } }, + ]), + + overviewLogs: + g.panel.row.new('Logs') + + g.panel.row.withPanels([ + panels.accessLogs { gridPos: { h: 10, w: 24, x: 0, y: 0 } }, + ]), + + overviewCache: + g.panel.row.new('Cache') + + g.panel.row.withPanels([ + panels.fileCacheHitRatio { gridPos: { h: 8, w: 12, x: 0, y: 0 } }, + panels.uriCacheHitRatio { gridPos: { h: 8, w: 12, x: 12, y: 0 } }, + panels.metadataCacheHitRatio { gridPos: { h: 8, w: 12, x: 0, y: 8 } }, + panels.outputCacheHitRatio { gridPos: { h: 8, w: 12, x: 12, y: 8 } }, + ]), + + // Applications dashboard rows + applicationsRequests: + g.panel.row.new('Requests') + + g.panel.row.withPanels([ + panels.workerRequests { gridPos: { h: 8, w: 12, x: 0, y: 0 } }, + panels.workerRequestErrors { gridPos: { h: 8, w: 12, x: 12, y: 0 } }, + ]), + + applicationsWebsocket: + g.panel.row.new('Websocket') + + g.panel.row.withPanels([ + panels.websocketConnectionAttempts { gridPos: { h: 8, w: 12, x: 0, y: 0 } }, + panels.websocketConnectionSuccessRate { gridPos: { h: 8, w: 12, x: 12, y: 0 } }, + ]), + + applicationsWorkerProcesses: + g.panel.row.new('Worker Processes') + + g.panel.row.withPanels([ + panels.currentWorkerThreads { gridPos: { h: 8, w: 12, x: 0, y: 0 } }, + panels.currentWorkerProcesses { gridPos: { h: 8, w: 12, x: 12, y: 0 } }, + panels.workerProcessFailures { gridPos: { h: 8, w: 24, x: 0, y: 8 } }, + ]), + + applicationsCache: + g.panel.row.new('Cache') + + g.panel.row.withPanels([ + panels.workerFileCacheHitRatio { gridPos: { h: 8, w: 12, x: 0, y: 0 } }, + panels.workerUriCacheHitRatio { gridPos: { h: 8, w: 12, x: 12, y: 0 } }, + panels.workerMetadataCacheHitRatio { gridPos: { h: 8, w: 12, x: 0, y: 8 } }, + panels.workerOutputCacheHitRatio { gridPos: { h: 8, w: 12, x: 12, y: 8 } }, + ]), + }, +} diff --git a/microsoft-iis-mixin/signals/app_pools.libsonnet b/microsoft-iis-mixin/signals/app_pools.libsonnet new file mode 100644 index 000000000..0a376d1f3 --- /dev/null +++ b/microsoft-iis-mixin/signals/app_pools.libsonnet @@ -0,0 +1,35 @@ +function(this) + { + filteringSelector: this.filteringSelector, + groupLabels: this.groupLabels, + instanceLabels: this.instanceLabels, + aggLevel: 'none', + aggFunction: 'sum', + 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}}', + }, + }, + }, + }, + } diff --git a/microsoft-iis-mixin/signals/async_io.libsonnet b/microsoft-iis-mixin/signals/async_io.libsonnet new file mode 100644 index 000000000..6a7b588b0 --- /dev/null +++ b/microsoft-iis-mixin/signals/async_io.libsonnet @@ -0,0 +1,37 @@ +function(this) + { + filteringSelector: this.filteringSelector, + groupLabels: this.groupLabels, + instanceLabels: this.instanceLabels, + aggLevel: 'none', + aggFunction: 'sum', + signals: { + blockedRequests: { + 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}}', + }, + }, + }, + + rejectedRequests: { + 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}}', + }, + }, + }, + }, + } diff --git a/microsoft-iis-mixin/signals/connections.libsonnet b/microsoft-iis-mixin/signals/connections.libsonnet new file mode 100644 index 000000000..41ccfd4bb --- /dev/null +++ b/microsoft-iis-mixin/signals/connections.libsonnet @@ -0,0 +1,36 @@ +function(this) + { + filteringSelector: this.filteringSelector, + groupLabels: this.groupLabels, + instanceLabels: this.instanceLabels, + aggLevel: 'none', + aggFunction: 'sum', + 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}}', + }, + }, + }, + }, + } diff --git a/microsoft-iis-mixin/signals/data_transfer.libsonnet b/microsoft-iis-mixin/signals/data_transfer.libsonnet new file mode 100644 index 000000000..3c228b327 --- /dev/null +++ b/microsoft-iis-mixin/signals/data_transfer.libsonnet @@ -0,0 +1,61 @@ +function(this) + { + filteringSelector: this.filteringSelector, + groupLabels: this.groupLabels, + instanceLabels: this.instanceLabels, + aggLevel: 'none', + aggFunction: 'sum', + 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/s', + sources: { + prometheus: { + expr: 'windows_iis_files_sent_total{%(queriesSelector)s, site=~"$site"}', + legendCustomTemplate: '{{instance}} - {{site}}', + }, + }, + }, + + filesReceived: { + name: 'Files received per second', + type: 'counter', + description: 'The files received by an IIS site.', + unit: 'files/s', + sources: { + prometheus: { + expr: 'windows_iis_files_received_total{%(queriesSelector)s, site=~"$site"}', + legendCustomTemplate: '{{instance}} - {{site}}', + }, + }, + }, + }, + } diff --git a/microsoft-iis-mixin/signals/requests.libsonnet b/microsoft-iis-mixin/signals/requests.libsonnet new file mode 100644 index 000000000..a26848249 --- /dev/null +++ b/microsoft-iis-mixin/signals/requests.libsonnet @@ -0,0 +1,48 @@ +function(this) + { + filteringSelector: this.filteringSelector, + groupLabels: this.groupLabels, + instanceLabels: this.instanceLabels, + aggLevel: 'none', + aggFunction: 'sum', + 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', + }, + }, + }, + }, + } diff --git a/microsoft-iis-mixin/signals/server_cache.libsonnet b/microsoft-iis-mixin/signals/server_cache.libsonnet new file mode 100644 index 000000000..9d2e7aff9 --- /dev/null +++ b/microsoft-iis-mixin/signals/server_cache.libsonnet @@ -0,0 +1,61 @@ +function(this) + { + filteringSelector: this.filteringSelector, + groupLabels: this.groupLabels, + instanceLabels: this.instanceLabels, + aggLevel: 'none', + aggFunction: 'sum', + 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}}', + }, + }, + }, + }, + } diff --git a/microsoft-iis-mixin/signals/worker_cache.libsonnet b/microsoft-iis-mixin/signals/worker_cache.libsonnet new file mode 100644 index 000000000..97a27997a --- /dev/null +++ b/microsoft-iis-mixin/signals/worker_cache.libsonnet @@ -0,0 +1,61 @@ +function(this) + { + filteringSelector: this.filteringSelector, + groupLabels: this.groupLabels, + instanceLabels: this.instanceLabels, + aggLevel: 'none', + aggFunction: 'sum', + signals: { + fileCacheHitRatio: { + 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}}', + }, + }, + }, + + uriCacheHitRatio: { + 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}}', + }, + }, + }, + + metadataCacheHitRatio: { + 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}}', + }, + }, + }, + + outputCacheHitRatio: { + 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/worker_processes.libsonnet b/microsoft-iis-mixin/signals/worker_processes.libsonnet new file mode 100644 index 000000000..a0fc9d49d --- /dev/null +++ b/microsoft-iis-mixin/signals/worker_processes.libsonnet @@ -0,0 +1,65 @@ +function(this) + { + filteringSelector: this.filteringSelector, + groupLabels: this.groupLabels, + instanceLabels: this.instanceLabels, + aggLevel: 'none', + aggFunction: 'sum', + signals: { + totalFailures: { + name: 'Total worker process failures', + type: 'counter', + rangeFunction: 'increase', + 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"}', + legendCustomTemplate: '{{instance}} - {{app}}', + }, + }, + }, + + startupFailures: { + name: 'Worker process startup failures', + type: 'counter', + rangeFunction: 'increase', + 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"}', + legendCustomTemplate: '{{instance}} - {{app}}', + }, + }, + }, + + shutdownFailures: { + name: 'Worker process shutdown failures', + type: 'counter', + rangeFunction: 'increase', + 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"}', + legendCustomTemplate: '{{instance}} - {{app}}', + }, + }, + }, + + pingFailures: { + name: 'Worker process ping failures', + type: 'counter', + rangeFunction: 'increase', + 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"}', + legendCustomTemplate: '{{instance}} - {{app}}', + }, + }, + }, + }, + } diff --git a/microsoft-iis-mixin/signals/worker_requests.libsonnet b/microsoft-iis-mixin/signals/worker_requests.libsonnet new file mode 100644 index 000000000..97763797e --- /dev/null +++ b/microsoft-iis-mixin/signals/worker_requests.libsonnet @@ -0,0 +1,35 @@ +function(this) + { + filteringSelector: this.filteringSelector, + groupLabels: this.groupLabels, + instanceLabels: this.instanceLabels, + aggLevel: 'none', + aggFunction: 'sum', + signals: { + requests: { + 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}}', + }, + }, + }, + + requestErrors: { + 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}}', + }, + }, + }, + }, + } diff --git a/microsoft-iis-mixin/signals/worker_threads.libsonnet b/microsoft-iis-mixin/signals/worker_threads.libsonnet new file mode 100644 index 000000000..13c0c5774 --- /dev/null +++ b/microsoft-iis-mixin/signals/worker_threads.libsonnet @@ -0,0 +1,35 @@ +function(this) + { + filteringSelector: this.filteringSelector, + groupLabels: this.groupLabels, + instanceLabels: this.instanceLabels, + aggLevel: 'none', + aggFunction: 'sum', + signals: { + currentThreads: { + 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}}', + }, + }, + }, + + maxThreads: { + 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}}', + }, + }, + }, + }, + } diff --git a/microsoft-iis-mixin/signals/worker_websocket.libsonnet b/microsoft-iis-mixin/signals/worker_websocket.libsonnet new file mode 100644 index 000000000..e97bb7679 --- /dev/null +++ b/microsoft-iis-mixin/signals/worker_websocket.libsonnet @@ -0,0 +1,50 @@ +function(this) + { + filteringSelector: this.filteringSelector, + groupLabels: this.groupLabels, + instanceLabels: this.instanceLabels, + aggLevel: 'none', + aggFunction: 'sum', + signals: { + connectionAttempts: { + 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}}', + }, + }, + }, + + connectionAccepted: { + 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}}', + }, + }, + }, + + connectionSuccessRate: { + 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}}', + }, + }, + }, + }, + }