From 321be7d06c8310feade0a0ba3c1e073f9cb91add Mon Sep 17 00:00:00 2001 From: schmikei Date: Tue, 25 Nov 2025 16:28:56 -0500 Subject: [PATCH] modernize the IBM MQ mixin --- ibm-mq-mixin/alerts.libsonnet | 80 + ibm-mq-mixin/alerts/alerts.libsonnet | 79 - ibm-mq-mixin/config.libsonnet | 47 +- ibm-mq-mixin/dashboards.libsonnet | 170 ++ .../dashboards/cluster-overview.libsonnet | 740 --------- ibm-mq-mixin/dashboards/dashboards.libsonnet | 4 - .../queue-manager-overview.libsonnet | 1370 ----------------- .../dashboards/queue-overview.libsonnet | 547 ------- .../dashboards/topics-overview.libsonnet | 653 -------- .../ibm-mq-cluster-overview.json | 639 +++----- ibm-mq-mixin/dashboards_out/ibm-mq-logs.json | 357 +++++ .../ibm-mq-queue-manager-overview.json | 1231 +++++---------- .../dashboards_out/ibm-mq-queue-overview.json | 598 +++---- .../ibm-mq-topics-overview.json | 628 +++----- ibm-mq-mixin/g.libsonnet | 1 + ibm-mq-mixin/jsonnetfile.json | 43 +- ibm-mq-mixin/links.libsonnet | 41 + ibm-mq-mixin/main.libsonnet | 49 + ibm-mq-mixin/mixin.libsonnet | 41 +- ibm-mq-mixin/panels.libsonnet | 589 +++++++ .../prometheus_alerts.yaml | 8 +- ibm-mq-mixin/rows.libsonnet | 112 ++ ibm-mq-mixin/signals/cluster.libsonnet | 263 ++++ ibm-mq-mixin/signals/queue-manager.libsonnet | 322 ++++ ibm-mq-mixin/signals/queue.libsonnet | 243 +++ ibm-mq-mixin/signals/topics.libsonnet | 131 ++ 26 files changed, 3455 insertions(+), 5531 deletions(-) create mode 100644 ibm-mq-mixin/alerts.libsonnet delete mode 100644 ibm-mq-mixin/alerts/alerts.libsonnet create mode 100644 ibm-mq-mixin/dashboards.libsonnet delete mode 100644 ibm-mq-mixin/dashboards/cluster-overview.libsonnet delete mode 100644 ibm-mq-mixin/dashboards/dashboards.libsonnet delete mode 100644 ibm-mq-mixin/dashboards/queue-manager-overview.libsonnet delete mode 100644 ibm-mq-mixin/dashboards/queue-overview.libsonnet delete mode 100644 ibm-mq-mixin/dashboards/topics-overview.libsonnet create mode 100644 ibm-mq-mixin/dashboards_out/ibm-mq-logs.json create mode 100644 ibm-mq-mixin/g.libsonnet create mode 100644 ibm-mq-mixin/links.libsonnet create mode 100644 ibm-mq-mixin/main.libsonnet create mode 100644 ibm-mq-mixin/panels.libsonnet create mode 100644 ibm-mq-mixin/rows.libsonnet create mode 100644 ibm-mq-mixin/signals/cluster.libsonnet create mode 100644 ibm-mq-mixin/signals/queue-manager.libsonnet create mode 100644 ibm-mq-mixin/signals/queue.libsonnet create mode 100644 ibm-mq-mixin/signals/topics.libsonnet diff --git a/ibm-mq-mixin/alerts.libsonnet b/ibm-mq-mixin/alerts.libsonnet new file mode 100644 index 000000000..74a846a7c --- /dev/null +++ b/ibm-mq-mixin/alerts.libsonnet @@ -0,0 +1,80 @@ +{ + new(this): + { + groups+: [ + { + name: 'ibm-mq-alerts', + rules: [ + { + alert: 'IBMMQExpiredMessages', + expr: ||| + sum without (description,hostname,instance,job,platform) (ibmmq_qmgr_expired_message_count{%(filteringSelector)s}) > %(alertsExpiredMessages)s + ||| % this.config, + 'for': '5m', + labels: { + severity: 'critical', + }, + annotations: { + summary: 'There are expired messages, which imply that application resilience is failing.', + description: + ( + 'The number of expired messages in the {{$labels.qmgr}} is {{$labels.value}} which is above the threshold of %(alertsExpiredMessages)s.' + ) % this.config, + }, + }, + { + alert: 'IBMMQStaleMessages', + expr: ||| + sum without (description,instance,job,platform) (ibmmq_queue_oldest_message_age{%(filteringSelector)s}) >= %(alertsStaleMessagesSeconds)s + ||| % this.config, + 'for': '5m', + labels: { + severity: 'warning', + }, + annotations: { + summary: 'Stale messages have been detected.', + description: + ( + 'A stale message with an age of {{$labels.value}} has been sitting in the {{$labels.queue}} which is above the threshold of %(alertsStaleMessagesSeconds)ss.' + ) % this.config, + }, + }, + { + alert: 'IBMMQLowDiskSpace', + expr: ||| + sum without (description,hostname,instance,job,platform) (ibmmq_qmgr_queue_manager_file_system_free_space_percentage{%(filteringSelector)s}) <= %(alertsLowDiskSpace)s + ||| % this.config, + 'for': '5m', + labels: { + severity: 'critical', + }, + annotations: { + summary: 'There is limited disk available for a queue manager.', + description: + ( + 'The amount of disk space available for {{$labels.qmgr}} is at {{$labels.value}}%% which is below the threshold of %(alertsLowDiskSpace)s%%.' + ) % this.config, + }, + }, + { + alert: 'IBMMQHighQueueManagerCpuUsage', + expr: ||| + sum without (description,hostname,instance,job,platform) (ibmmq_qmgr_user_cpu_time_estimate_for_queue_manager_percentage{%(filteringSelector)s}) >= %(alertsHighQueueManagerCpuUsage)s + ||| % this.config, + 'for': '5m', + labels: { + severity: 'critical', + }, + annotations: { + summary: 'There is a high CPU usage estimate for a queue manager.', + description: + ( + 'The amount of CPU usage for the queue manager {{$labels.qmgr}} is at {{$labels.value}}%% which is above the threshold of %(alertsHighQueueManagerCpuUsage)s%%.' + ) % this.config, + }, + }, + ], + }, + ], + }, +} diff --git a/ibm-mq-mixin/alerts/alerts.libsonnet b/ibm-mq-mixin/alerts/alerts.libsonnet deleted file mode 100644 index b76ba5cdc..000000000 --- a/ibm-mq-mixin/alerts/alerts.libsonnet +++ /dev/null @@ -1,79 +0,0 @@ -{ - prometheusAlerts+:: { - groups+: [ - { - name: 'ibm-mq-alerts', - rules: [ - { - alert: 'IBMMQExpiredMessages', - expr: ||| - sum without (description,hostname,instance,job,platform) (ibmmq_qmgr_expired_message_count) > %(alertsExpiredMessages)s - ||| % $._config, - 'for': '5m', - labels: { - severity: 'critical', - }, - annotations: { - summary: 'There are expired messages, which imply that application resilience is failing.', - description: - ( - 'The number of expired messages in the {{$labels.qmgr}} is {{$labels.value}} which is above the threshold of %(alertsExpiredMessages)s.' - ) % $._config, - }, - }, - { - alert: 'IBMMQStaleMessages', - expr: ||| - sum without (description,instance,job,platform) (ibmmq_queue_oldest_message_age) >= %(alertsStaleMessagesSeconds)s - ||| % $._config, - 'for': '5m', - labels: { - severity: 'warning', - }, - annotations: { - summary: 'Stale messages have been detected.', - description: - ( - 'A stale message with an age of {{$labels.value}} has been sitting in the {{$labels.queue}} which is above the threshold of %(alertsStaleMessagesSeconds)ss.' - ) % $._config, - }, - }, - { - alert: 'IBMMQLowDiskSpace', - expr: ||| - sum without (description,hostname,instance,job,platform) (ibmmq_qmgr_queue_manager_file_system_free_space_percentage) <= %(alertsLowDiskSpace)s - ||| % $._config, - 'for': '5m', - labels: { - severity: 'critical', - }, - annotations: { - summary: 'There is limited disk available for a queue manager.', - description: - ( - 'The amount of disk space available for {{$labels.qmgr}} is at {{$labels.value}}%% which is below the threshold of %(alertsLowDiskSpace)s%%.' - ) % $._config, - }, - }, - { - alert: 'IBMMQHighQueueManagerCpuUsage', - expr: ||| - sum without (description,hostname,instance,job,platform) (ibmmq_qmgr_user_cpu_time_estimate_for_queue_manager_percentage) >= %(alertsHighQueueManagerCpuUsage)s - ||| % $._config, - 'for': '5m', - labels: { - severity: 'critical', - }, - annotations: { - summary: 'There is a high CPU usage estimate for a queue manager.', - description: - ( - 'The amount of CPU usage for the queue manager {{$labels.qmgr}} is at {{$labels.value}}%% which is above the threshold of %(alertsHighQueueManagerCpuUsage)s%%.' - ) % $._config, - }, - }, - ], - }, - ], - }, -} diff --git a/ibm-mq-mixin/config.libsonnet b/ibm-mq-mixin/config.libsonnet index 5df979e07..50c286834 100644 --- a/ibm-mq-mixin/config.libsonnet +++ b/ibm-mq-mixin/config.libsonnet @@ -1,20 +1,37 @@ { - _config+:: { - enableMultiCluster: false, - ibmmqSelector: if self.enableMultiCluster then 'job=~"$job", cluster=~"$cluster"' else 'job=~"$job"', - dashboardTags: ['ibm-mq-mixin'], - dashboardPeriod: 'now-1h', - dashboardTimezone: 'default', - dashboardRefresh: '1m', - logExpression: if self.enableMultiCluster then 'job=~"$job", cluster=~"$cluster", qmgr=~"$qmgr"' - else 'job=~"$job", qmgr=~"$qmgr"', + local this = self, + filteringSelector: 'job="integrations/ibm-mq"', + groupLabels: ['job', 'cluster', 'mq_cluster'], + instanceLabels: ['instance', 'qmgr'], + uid: 'ibm-mq', - //alerts thresholds - alertsExpiredMessages: 2, //count - alertsStaleMessagesSeconds: 300, //seconds - alertsLowDiskSpace: 5, //percentage: 0-100 - alertsHighQueueManagerCpuUsage: 85, //percentage: 0-100 + dashboardNamePrefix: 'IBM MQ', + dashboardTags: ['ibm-mq-mixin'], + dashboardPeriod: 'now-1h', + dashboardTimezone: 'default', + dashboardRefresh: '1m', - enableLokiLogs: true, + // Data source configuration + metricsSource: 'prometheus', + enableLokiLogs: true, + logLabels: this.groupLabels, + extraLogLabels: [], + logsVolumeGroupBy: 'level', + showLogsVolume: true, + + // Alerts configuration + alertsExpiredMessages: 2, //count + alertsStaleMessagesSeconds: 300, //seconds + alertsLowDiskSpace: 5, //percentage: 0-100 + alertsHighQueueManagerCpuUsage: 85, //percentage: 0-100 + + // Multi-cluster support (for backward compatibility) + enableMultiCluster: false, + + signals+: { + cluster: (import './signals/cluster.libsonnet')(this), + queueManager: (import './signals/queue-manager.libsonnet')(this), + queue: (import './signals/queue.libsonnet')(this), + topic: (import './signals/topics.libsonnet')(this), }, } diff --git a/ibm-mq-mixin/dashboards.libsonnet b/ibm-mq-mixin/dashboards.libsonnet new file mode 100644 index 000000000..6bd0e5ed6 --- /dev/null +++ b/ibm-mq-mixin/dashboards.libsonnet @@ -0,0 +1,170 @@ +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; + { + 'ibm-mq-cluster-overview.json': + g.dashboard.new(prefix + ' cluster overview') + + g.dashboard.withPanels( + g.util.panel.resolveCollapsedFlagOnRows( + g.util.grid.wrapPanels( + [ + this.grafana.rows.clusterOverview, + ] + ), + ) + ) + root.applyCommon( + vars.multiInstance, + uid + '-cluster-overview', + tags, + links { ibmMqClusterOverview+:: {} }, + annotations, + timezone, + refresh, + period + ), + + 'ibm-mq-queue-manager-overview.json': + g.dashboard.new(prefix + ' queue manager overview') + + g.dashboard.withPanels( + g.util.panel.resolveCollapsedFlagOnRows( + g.util.grid.wrapPanels( + [ + this.grafana.rows.queueManagerOverview, + this.grafana.rows.queueManagerLogs, + ] + ), + ) + ) + root.applyCommon( + vars.multiInstance, + uid + '-queue-manager-overview', + tags, + links { ibmMqQueueManagerOverview+:: {} }, + annotations, + timezone, + refresh, + period + ), + + 'ibm-mq-queue-overview.json': + g.dashboard.new(prefix + ' queue overview') + + g.dashboard.withPanels( + g.util.panel.resolveCollapsedFlagOnRows( + g.util.grid.wrapPanels( + [ + this.grafana.rows.queueOverview, + ] + ), + ) + ) + root.applyCommon( + vars.multiInstance + [ + g.dashboard.variable.query.new('queue') + + g.dashboard.variable.custom.generalOptions.withLabel('Queue') + + g.dashboard.variable.custom.selectionOptions.withMulti(true) + + g.dashboard.variable.query.queryTypes.withLabelValues(label='queue', metric='ibmmq_queue_average_queue_time_seconds') + + g.dashboard.variable.query.withDatasourceFromVariable(variable=vars.datasources.prometheus) + + g.dashboard.variable.custom.selectionOptions.withIncludeAll(true, '.+') + + g.dashboard.variable.query.refresh.onTime(), + ], + uid + '-queue-overview', + tags, + links { ibmMqQueueOverview+:: {} }, + annotations, + timezone, + refresh, + period + ), + + 'ibm-mq-topics-overview.json': + g.dashboard.new(prefix + ' topics overview') + + g.dashboard.withPanels( + g.util.panel.resolveCollapsedFlagOnRows( + g.util.grid.wrapPanels( + [ + this.grafana.rows.topicsRow, + this.grafana.rows.subscriptionsRow, + ] + ), + ) + ) + root.applyCommon( + vars.multiInstance + [ + g.dashboard.variable.query.new('topic') + + g.dashboard.variable.custom.generalOptions.withLabel('Topic') + + g.dashboard.variable.custom.selectionOptions.withMulti(true) + + g.dashboard.variable.query.queryTypes.withLabelValues(label='topic', metric='ibmmq_topic_subscriber_count{qmgr=~"$qmgr",topic!~"SYSTEM.*|\\\\$SYS.*|"}') + + g.dashboard.variable.query.withDatasourceFromVariable(variable=vars.datasources.prometheus) + + g.dashboard.variable.custom.selectionOptions.withIncludeAll(true, '.+') + + g.dashboard.variable.query.refresh.onTime(), + + g.dashboard.variable.query.new('subscription') + + g.dashboard.variable.custom.generalOptions.withLabel('Subscription') + + g.dashboard.variable.custom.selectionOptions.withMulti(true) + + g.dashboard.variable.query.queryTypes.withLabelValues(label='subscription', metric='ibmmq_subscription_messsages_received{qmgr=~"$qmgr",subscription!~"SYSTEM.*|"}') + + g.dashboard.variable.query.withDatasourceFromVariable(variable=vars.datasources.prometheus) + + g.dashboard.variable.custom.selectionOptions.withIncludeAll(true, '.+') + + g.dashboard.variable.query.refresh.onTime(), + ], + uid + '-topics-overview', + tags, + links { ibmMqTopicsOverview+:: {} }, + annotations, + timezone, + refresh, + period + ), + } + + if this.config.enableLokiLogs then { + 'ibm-mq-logs.json': + logslib.new( + prefix + ' logs', + datasourceName=this.grafana.variables.datasources.loki.name, + datasourceRegex=this.grafana.variables.datasources.loki.regex, + filterSelector=this.config.filteringSelector, + labels=this.config.groupLabels + this.config.extraLogLabels + ['qmgr'], + formatParser=null, + showLogsVolume=this.config.showLogsVolume, + ) + { + dashboards+: + { + logs+: + root.applyCommon(super.logs.templating.list, uid=uid + '-logs', tags=tags, links=links, annotations=annotations, timezone=timezone, refresh=refresh, period=period), + }, + panels+: + { + logs+: + g.panel.logs.options.withEnableLogDetails(true) + + g.panel.logs.options.withShowTime(false) + + g.panel.logs.options.withWrapLogMessage(false), + }, + variables+: { + toArray+: [ + this.grafana.variables.datasources.prometheus { hide: 2 }, + ], + }, + }.dashboards.logs, + } + else {}, + + applyCommon(vars, uid, tags, links, annotations, timezone, refresh, period): + g.dashboard.withTags(tags) + + g.dashboard.withUid(uid) + + g.dashboard.withLinks(std.objectValues(links)) + + g.dashboard.withTimezone(timezone) + + g.dashboard.withRefresh(refresh) + + g.dashboard.time.withFrom(period) + + g.dashboard.withVariables(vars) + + g.dashboard.withAnnotations(std.objectValues(annotations)), +} diff --git a/ibm-mq-mixin/dashboards/cluster-overview.libsonnet b/ibm-mq-mixin/dashboards/cluster-overview.libsonnet deleted file mode 100644 index 74f99fc6c..000000000 --- a/ibm-mq-mixin/dashboards/cluster-overview.libsonnet +++ /dev/null @@ -1,740 +0,0 @@ -local g = (import 'grafana-builder/grafana.libsonnet'); -local grafana = (import 'grafonnet/grafana.libsonnet'); -local dashboard = grafana.dashboard; -local template = grafana.template; -local prometheus = grafana.prometheus; -local getMatcher(cfg) = '%(ibmmqSelector)s' % cfg; - -local dashboardUid = 'ibm-mq-cluster-overview'; - -local promDatasourceName = 'prometheus_datasource'; - -local promDatasource = { - uid: '${%s}' % promDatasourceName, -}; - -local clustersPanel(matcher) = { - datasource: promDatasource, - targets: [ - prometheus.target( - 'count(count(ibmmq_qmgr_commit_count{' + matcher + '}) by (mq_cluster))', - datasource=promDatasource, - legendFormat='{{job}} - {{mq_cluster}}', - format='time_series', - ), - ], - type: 'stat', - title: 'Clusters', - description: 'The unique number of clusters being reported.', - fieldConfig: { - defaults: { - color: { - mode: 'palette-classic', - }, - mappings: [], - thresholds: { - mode: 'absolute', - steps: [ - { - color: 'green', - value: null, - }, - { - color: 'red', - value: 0, - }, - ], - }, - }, - overrides: [], - }, - options: { - colorMode: 'value', - graphMode: 'none', - justifyMode: 'auto', - orientation: 'auto', - reduceOptions: { - calcs: [ - 'lastNotNull', - ], - fields: '', - values: false, - }, - textMode: 'auto', - }, -}; - -local queueManagersPanel(matcher) = { - datasource: promDatasource, - targets: [ - prometheus.target( - 'count(count(ibmmq_qmgr_commit_count{' + matcher + '}) by (qmgr, mq_cluster))', - datasource=promDatasource, - legendFormat='', - format='time_series', - ), - ], - type: 'stat', - title: 'Queue managers', - description: 'The unique number of queue managers in the cluster being reported.', - fieldConfig: { - defaults: { - color: { - mode: 'palette-classic', - }, - mappings: [], - thresholds: { - mode: 'absolute', - steps: [ - { - color: 'green', - value: null, - }, - { - color: 'red', - value: 0, - }, - ], - }, - }, - overrides: [], - }, - options: { - colorMode: 'value', - graphMode: 'none', - justifyMode: 'auto', - orientation: 'auto', - reduceOptions: { - calcs: [ - 'lastNotNull', - ], - fields: '', - values: false, - }, - textMode: 'auto', - }, -}; - -local topicsPanel(matcher) = { - datasource: promDatasource, - targets: [ - prometheus.target( - 'count(count(ibmmq_topic_messages_received{' + matcher + '}) by (topic, mq_cluster))', - datasource=promDatasource, - legendFormat='{{job}} - {{mq_cluster}}', - format='time_series', - ), - ], - type: 'stat', - title: 'Topics', - description: 'The unique number of topics in the cluster.', - fieldConfig: { - defaults: { - color: { - mode: 'palette-classic', - }, - mappings: [], - thresholds: { - mode: 'absolute', - steps: [ - { - color: 'green', - value: null, - }, - { - color: 'red', - value: 0, - }, - ], - }, - }, - overrides: [], - }, - options: { - colorMode: 'value', - graphMode: 'none', - justifyMode: 'auto', - orientation: 'auto', - reduceOptions: { - calcs: [ - 'lastNotNull', - ], - fields: '', - values: false, - }, - textMode: 'auto', - }, -}; - -local queuesPanel(matcher) = { - datasource: promDatasource, - targets: [ - prometheus.target( - 'count(count(ibmmq_queue_depth{' + matcher + '}) by (queue, mq_cluster))', - datasource=promDatasource, - legendFormat='', - format='time_series', - ), - ], - type: 'stat', - title: 'Queues', - description: 'The unique number of queues in the cluster.', - fieldConfig: { - defaults: { - color: { - mode: 'palette-classic', - }, - mappings: [], - thresholds: { - mode: 'absolute', - steps: [ - { - color: 'green', - value: null, - }, - { - color: 'red', - value: 0, - }, - ], - }, - }, - overrides: [], - }, - options: { - colorMode: 'value', - graphMode: 'none', - justifyMode: 'auto', - orientation: 'auto', - reduceOptions: { - calcs: [ - 'lastNotNull', - ], - fields: '', - values: false, - }, - textMode: 'auto', - }, -}; - -local queueOperationsPanel(matcher) = { - datasource: promDatasource, - targets: [ - prometheus.target( - 'sum by (mq_cluster) (ibmmq_queue_mqset_count{' + matcher + ', mq_cluster=~"$mq_cluster"})', - datasource=promDatasource, - legendFormat='MQSET', - format='time_series', - ), - prometheus.target( - 'sum by (mq_cluster) (ibmmq_queue_mqinq_count{' + matcher + ', mq_cluster=~"$mq_cluster"})', - datasource=promDatasource, - legendFormat='MQINQ', - format='time_series', - ), - prometheus.target( - 'sum by (mq_cluster) (ibmmq_queue_mqget_count{' + matcher + ', mq_cluster=~"$mq_cluster"})', - datasource=promDatasource, - legendFormat='MQGET', - format='time_series', - ), - prometheus.target( - 'sum by (mq_cluster) (ibmmq_queue_mqopen_count{' + matcher + ', mq_cluster=~"$mq_cluster"})', - datasource=promDatasource, - legendFormat='MQOPEN', - format='time_series', - ), - prometheus.target( - 'sum by (mq_cluster) (ibmmq_queue_mqclose_count{' + matcher + ', mq_cluster=~"$mq_cluster"})', - datasource=promDatasource, - legendFormat='MQCLOSE', - format='time_series', - ), - prometheus.target( - 'sum by (mq_cluster) (ibmmq_queue_mqput_mqput1_count{' + matcher + ', mq_cluster=~"$mq_cluster"})', - datasource=promDatasource, - legendFormat='MQPUT/MQPUT1', - format='time_series', - ), - ], - type: 'piechart', - title: 'Queue operations', - description: 'The number of queue operations of the cluster. ', - fieldConfig: { - defaults: { - color: { - mode: 'palette-classic', - }, - custom: { - hideFrom: { - legend: false, - tooltip: false, - viz: false, - }, - }, - mappings: [], - unit: 'operations', - }, - overrides: [ - { - __systemRef: 'hideSeriesFrom', - matcher: { - id: 'byNames', - options: { - mode: 'exclude', - names: [ - 'MQINQ', - 'MQGET', - 'MQOPEN', - 'MQPUT/MQPUT1', - ], - prefix: 'All except:', - readOnly: true, - }, - }, - properties: [ - { - id: 'custom.hideFrom', - value: { - legend: false, - tooltip: false, - viz: true, - }, - }, - ], - }, - ], - }, - options: { - legend: { - displayMode: 'list', - placement: 'bottom', - showLegend: true, - }, - pieType: 'pie', - reduceOptions: { - calcs: [ - 'lastNotNull', - ], - fields: '', - values: false, - }, - tooltip: { - mode: 'multi', - sort: 'none', - }, - }, -}; - -local clusterStatusPanel(matcher) = { - datasource: promDatasource, - targets: [ - prometheus.target( - 'ibmmq_cluster_suspend{' + matcher + ', mq_cluster=~"$mq_cluster"}', - datasource=promDatasource, - legendFormat='{{job}} - {{mq_cluster}}', - format='time_series', - ), - ], - type: 'table', - title: 'Cluster status', - description: 'The status of the cluster.', - fieldConfig: { - defaults: { - color: { - mode: 'fixed', - }, - custom: { - align: 'center', - cellOptions: { - type: 'color-text', - }, - inspect: false, - }, - mappings: [ - { - options: { - '0': { - color: 'green', - index: 0, - text: 'Not suspended', - }, - '1': { - color: 'red', - index: 1, - text: 'Suspended', - }, - }, - type: 'value', - }, - ], - thresholds: { - mode: 'absolute', - steps: [ - { - color: 'green', - value: null, - }, - { - color: 'red', - value: 80, - }, - ], - }, - }, - overrides: [], - }, - options: { - cellHeight: 'sm', - footer: { - countRows: false, - enablePagination: false, - fields: '', - reducer: [ - 'sum', - ], - show: false, - }, - showHeader: true, - }, - transformations: [ - { - id: 'joinByLabels', - options: { - join: [ - 'cluster', - 'mq_cluster', - 'qmgr', - ], - value: '__name__', - }, - }, - { - id: 'organize', - options: { - excludeByName: {}, - indexByName: {}, - renameByName: { - cluster: 'Cluster', - ibmmq_cluster_suspend: 'Status', - mq_cluster: 'MQ cluster', - qmgr: 'Queue manager', - }, - }, - }, - { - id: 'reduce', - options: { - includeTimeField: false, - mode: 'reduceFields', - reducers: [ - 'last', - ], - }, - }, - ], -}; - -local queueManagerStatusPanel(matcher) = { - datasource: promDatasource, - targets: [ - prometheus.target( - 'ibmmq_qmgr_status{' + matcher + ', mq_cluster=~"$mq_cluster"}', - datasource=promDatasource, - legendFormat='', - format='time_series', - ), - ], - type: 'table', - title: 'Queue manager status', - description: 'The queue managers of the cluster displayed in a table.', - fieldConfig: { - defaults: { - color: { - mode: 'fixed', - }, - custom: { - align: 'center', - cellOptions: { - type: 'color-text', - }, - inspect: false, - }, - mappings: [ - { - options: { - '-1': { - color: 'dark-red', - index: 0, - text: 'N/A', - }, - '0': { - color: 'red', - index: 1, - text: 'Stopped', - }, - '1': { - color: 'light-green', - index: 2, - text: 'Starting', - }, - '2': { - color: 'green', - index: 3, - text: 'Running', - }, - '3': { - index: 4, - text: 'Quiescing', - }, - '4': { - color: 'light-red', - index: 5, - text: 'Stopping', - }, - '5': { - index: 6, - text: 'Standby', - }, - }, - type: 'value', - }, - ], - thresholds: { - mode: 'absolute', - steps: [ - { - color: 'green', - value: null, - }, - { - color: 'red', - value: 80, - }, - ], - }, - }, - overrides: [], - }, - options: { - cellHeight: 'sm', - footer: { - countRows: false, - fields: '', - reducer: [ - 'sum', - ], - show: false, - }, - showHeader: true, - sortBy: [ - { - desc: false, - displayName: 'ibmmq_qmgr_status{description="-", hostname="keith-ibm-mq-1804-2-test", instance="localhost:9157", job="integrations/ibm_mq", mq_cluster="", platform="UNIX", qmgr="QM1"}', - }, - ], - }, - transformations: [ - { - id: 'joinByLabels', - options: { - join: [ - 'mq_cluster', - 'qmgr', - 'instance', - ], - value: '__name__', - }, - }, - { - id: 'organize', - options: { - excludeByName: {}, - indexByName: {}, - renameByName: { - ibmmq_qmgr_status: 'Status', - instance: 'Instance', - mq_cluster: 'MQ cluster', - qmgr: 'Queue manager', - }, - }, - }, - { - id: 'reduce', - options: { - includeTimeField: false, - mode: 'reduceFields', - reducers: [ - 'last', - ], - }, - }, - ], -}; - -local transmissionQueueTimePanel(matcher) = { - datasource: promDatasource, - targets: [ - prometheus.target( - 'ibmmq_channel_xmitq_time_short{type="SENDER", ' + matcher + ', mq_cluster=~"$mq_cluster"}', - datasource=promDatasource, - legendFormat='{{channel}} - short', - format='time_series', - ), - prometheus.target( - 'ibmmq_channel_xmitq_time_long{type=~"SENDER", ' + matcher + ', mq_cluster=~"$mq_cluster"}', - datasource=promDatasource, - legendFormat='{{channel}} - long', - format='time_series', - ), - ], - type: 'timeseries', - title: 'Transmission queue time', - description: 'The time it takes for the messages to get through the transmission queue. (Long) - total time taken for messages to be transmitted over the channel, (Short) - an average, minimum, or maximum time taken to transmit messages over the channel in recent intervals. ', - fieldConfig: { - defaults: { - color: { - mode: 'palette-classic', - }, - custom: { - axisCenteredZero: false, - axisColorMode: 'text', - axisLabel: '', - axisPlacement: 'auto', - barAlignment: 0, - drawStyle: 'line', - fillOpacity: 10, - gradientMode: 'none', - hideFrom: { - legend: false, - tooltip: false, - viz: false, - }, - lineInterpolation: 'linear', - lineWidth: 1, - pointSize: 5, - scaleDistribution: { - type: 'linear', - }, - showPoints: 'never', - spanNulls: false, - stacking: { - group: 'A', - mode: 'none', - }, - thresholdsStyle: { - mode: 'off', - }, - }, - mappings: [], - thresholds: { - mode: 'absolute', - steps: [ - { - color: 'green', - value: null, - }, - { - color: 'red', - value: 80, - }, - ], - }, - unit: 'µs', - }, - overrides: [], - }, - options: { - legend: { - calcs: [], - displayMode: 'list', - placement: 'bottom', - showLegend: true, - }, - tooltip: { - mode: 'multi', - sort: 'desc', - }, - }, -}; - -{ - grafanaDashboards+:: { - 'ibm-mq-cluster-overview.json': - dashboard.new( - 'IBM MQ cluster overview', - time_from='%s' % $._config.dashboardPeriod, - tags=($._config.dashboardTags), - timezone='%s' % $._config.dashboardTimezone, - refresh='%s' % $._config.dashboardRefresh, - description='', - uid=dashboardUid, - ) - - .addTemplates( - [ - template.datasource( - promDatasourceName, - 'prometheus', - null, - label='Data Source', - refresh='load' - ), - template.new( - 'job', - promDatasource, - 'label_values(ibmmq_qmgr_commit_count,job)', - label='Job', - refresh=1, - includeAll=true, - multi=true, - allValues='.+', - sort=0 - ), - template.new( - 'mq_cluster', - promDatasource, - 'label_values(ibmmq_qmgr_commit_count,mq_cluster)', - label='MQ cluster', - refresh=2, - includeAll=false, - multi=false, - allValues='', - sort=0 - ), - template.new( - 'cluster', - promDatasource, - 'label_values(ibmmq_qmgr_commit_count{job=~"$job"}, cluster)', - label='Cluster', - refresh=2, - includeAll=true, - multi=true, - allValues='', - hide=if $._config.enableMultiCluster then '' else 'variable', - sort=0 - ), - ] - ) - .addLink(grafana.link.dashboards( - asDropdown=false, - title='Other IBM MQ dashboards', - includeVars=true, - keepTime=true, - tags=($._config.dashboardTags), - )) - .addPanels( - [ - clustersPanel(getMatcher($._config)) { gridPos: { h: 7, w: 4, x: 0, y: 0 } }, - queueManagersPanel(getMatcher($._config)) { gridPos: { h: 7, w: 4, x: 4, y: 0 } }, - topicsPanel(getMatcher($._config)) { gridPos: { h: 7, w: 4, x: 8, y: 0 } }, - queuesPanel(getMatcher($._config)) { gridPos: { h: 7, w: 4, x: 12, y: 0 } }, - queueOperationsPanel(getMatcher($._config)) { gridPos: { h: 15, w: 8, x: 16, y: 0 } }, - clusterStatusPanel(getMatcher($._config)) { gridPos: { h: 4, w: 16, x: 0, y: 7 } }, - queueManagerStatusPanel(getMatcher($._config)) { gridPos: { h: 4, w: 16, x: 0, y: 11 } }, - transmissionQueueTimePanel(getMatcher($._config)) { gridPos: { h: 8, w: 24, x: 0, y: 15 } }, - ] - ), - - }, -} diff --git a/ibm-mq-mixin/dashboards/dashboards.libsonnet b/ibm-mq-mixin/dashboards/dashboards.libsonnet deleted file mode 100644 index a4cdc410b..000000000 --- a/ibm-mq-mixin/dashboards/dashboards.libsonnet +++ /dev/null @@ -1,4 +0,0 @@ -(import 'cluster-overview.libsonnet') + -(import 'queue-manager-overview.libsonnet') + -(import 'queue-overview.libsonnet') + -(import 'topics-overview.libsonnet') diff --git a/ibm-mq-mixin/dashboards/queue-manager-overview.libsonnet b/ibm-mq-mixin/dashboards/queue-manager-overview.libsonnet deleted file mode 100644 index 6532140a6..000000000 --- a/ibm-mq-mixin/dashboards/queue-manager-overview.libsonnet +++ /dev/null @@ -1,1370 +0,0 @@ -local g = (import 'grafana-builder/grafana.libsonnet'); -local grafana = (import 'grafonnet/grafana.libsonnet'); -local dashboard = grafana.dashboard; -local template = grafana.template; -local prometheus = grafana.prometheus; -local getMatcher(cfg) = '%(ibmmqSelector)s' % cfg; -local logExpr(cfg) = '%(logExpr)s' % cfg; - -local dashboardUid = 'ibm-mq-queue-manager-overview'; - -local promDatasourceName = 'prometheus_datasource'; -local lokiDatasourceName = 'loki_datasource'; - -local promDatasource = { - uid: '${%s}' % promDatasourceName, -}; - -local lokiDatasource = { - uid: '${%s}' % lokiDatasourceName, -}; - -local activeListenersPanel(matcher) = { - datasource: promDatasource, - targets: [ - prometheus.target( - 'ibmmq_qmgr_active_listeners{' + matcher + ', mq_cluster=~"$mq_cluster", qmgr=~"$qmgr"}', - datasource=promDatasource, - legendFormat='', - format='time_series', - ), - ], - type: 'stat', - title: 'Active listeners', - description: 'The number of active listeners for the queue manager.', - fieldConfig: { - defaults: { - color: { - mode: 'thresholds', - }, - mappings: [], - thresholds: { - mode: 'absolute', - steps: [ - { - color: 'red', - value: null, - }, - { - color: 'green', - value: 1, - }, - ], - }, - }, - overrides: [], - }, - options: { - colorMode: 'value', - graphMode: 'none', - justifyMode: 'auto', - orientation: 'auto', - reduceOptions: { - calcs: [ - 'lastNotNull', - ], - fields: '', - values: false, - }, - textMode: 'auto', - }, -}; - -local activeConnectionsPanel(matcher) = { - datasource: promDatasource, - targets: [ - prometheus.target( - 'ibmmq_qmgr_connection_count{' + matcher + ', mq_cluster=~"$mq_cluster", qmgr=~"$qmgr"}', - datasource=promDatasource, - legendFormat='', - format='time_series', - ), - ], - type: 'stat', - title: 'Active connections', - description: 'The number of active connections for the queue manager.', - fieldConfig: { - defaults: { - color: { - mode: 'thresholds', - }, - mappings: [], - thresholds: { - mode: 'absolute', - steps: [ - { - color: 'red', - value: null, - }, - { - color: 'green', - value: 1, - }, - ], - }, - }, - overrides: [], - }, - options: { - colorMode: 'value', - graphMode: 'none', - justifyMode: 'auto', - orientation: 'auto', - reduceOptions: { - calcs: [ - 'lastNotNull', - ], - fields: '', - values: false, - }, - textMode: 'auto', - }, -}; - -local queuesPanel(matcher) = { - datasource: promDatasource, - targets: [ - prometheus.target( - 'count(count(ibmmq_queue_depth{' + matcher + '}) by (queue, mq_cluster, qmgr))', - datasource=promDatasource, - legendFormat='', - format='time_series', - ), - ], - type: 'stat', - title: 'Queues', - description: 'The unique number of queues being managed by the queue manager.', - fieldConfig: { - defaults: { - color: { - mode: 'thresholds', - }, - mappings: [], - thresholds: { - mode: 'absolute', - steps: [ - { - color: 'red', - value: null, - }, - { - color: 'green', - value: 1, - }, - ], - }, - }, - overrides: [], - }, - options: { - colorMode: 'value', - graphMode: 'none', - justifyMode: 'auto', - orientation: 'auto', - reduceOptions: { - calcs: [ - 'lastNotNull', - ], - fields: '', - values: false, - }, - textMode: 'auto', - }, -}; - -local estimatedMemoryUtilizationPanel(matcher) = { - datasource: promDatasource, - targets: [ - prometheus.target( - '(ibmmq_qmgr_ram_total_estimate_for_queue_manager_bytes{' + matcher + ', mq_cluster=~"$mq_cluster", qmgr=~"$qmgr"}/ibmmq_qmgr_ram_total_bytes{' + matcher + ', mq_cluster=~"$mq_cluster", qmgr=~"$qmgr"})', - datasource=promDatasource, - legendFormat='{{mq_cluster}} - {{qmgr}}', - format='time_series', - ), - ], - type: 'timeseries', - title: 'Estimated memory utilization', - description: 'The estimated memory usage of the queue managers.', - fieldConfig: { - defaults: { - color: { - mode: 'palette-classic', - }, - custom: { - axisCenteredZero: false, - axisColorMode: 'text', - axisLabel: '', - axisPlacement: 'auto', - barAlignment: 0, - drawStyle: 'line', - fillOpacity: 10, - gradientMode: 'none', - hideFrom: { - legend: false, - tooltip: false, - viz: false, - }, - lineInterpolation: 'linear', - lineWidth: 1, - pointSize: 5, - scaleDistribution: { - type: 'linear', - }, - showPoints: 'never', - spanNulls: false, - stacking: { - group: 'A', - mode: 'none', - }, - thresholdsStyle: { - mode: 'off', - }, - }, - mappings: [], - thresholds: { - mode: 'absolute', - steps: [ - { - color: 'green', - value: null, - }, - { - color: 'red', - value: 80, - }, - ], - }, - unit: 'percentunit', - }, - overrides: [], - }, - options: { - legend: { - calcs: [], - displayMode: 'list', - placement: 'bottom', - showLegend: true, - }, - tooltip: { - mode: 'multi', - sort: 'desc', - }, - }, -}; - -local queueManagerStatusPanel(matcher) = { - datasource: promDatasource, - targets: [ - prometheus.target( - 'ibmmq_qmgr_uptime{' + matcher + ', mq_cluster=~"$mq_cluster", qmgr=~"$qmgr"}', - datasource=promDatasource, - legendFormat='Uptime', - format='table', - ), - prometheus.target( - 'ibmmq_qmgr_status{' + matcher + ', mq_cluster=~"$mq_cluster", qmgr=~"$qmgr"}', - datasource=promDatasource, - legendFormat='Status', - format='time_series', - ), - ], - type: 'table', - title: 'Queue manager status', - description: 'A table showing the status and uptime of the queue manager.', - fieldConfig: { - defaults: { - color: { - mode: 'fixed', - }, - custom: { - align: 'left', - cellOptions: { - type: 'color-text', - }, - filterable: false, - inspect: false, - }, - mappings: [ - { - options: { - '-1': { - color: 'dark-red', - index: 0, - text: 'N/A', - }, - '0': { - color: 'red', - index: 1, - text: 'Stopped', - }, - '1': { - color: 'light-green', - index: 2, - text: 'Starting', - }, - '2': { - color: 'green', - index: 3, - text: 'Running', - }, - '3': { - index: 4, - text: 'Quiescing', - }, - '4': { - color: 'light-red', - index: 5, - text: 'Stopping', - }, - '5': { - color: 'yellow', - index: 6, - text: 'Standby', - }, - }, - type: 'value', - }, - ], - thresholds: { - mode: 'absolute', - steps: [ - { - color: 'green', - value: null, - }, - ], - }, - }, - overrides: [ - { - matcher: { - id: 'byName', - options: 'Uptime', - }, - properties: [ - { - id: 'custom.width', - value: 149, - }, - { - id: 'unit', - value: 's', - }, - ], - }, - { - matcher: { - id: 'byName', - options: '__name__', - }, - properties: [ - { - id: 'custom.width', - value: 318, - }, - ], - }, - { - matcher: { - id: 'byName', - options: 'Queue manager', - }, - properties: [ - { - id: 'custom.width', - value: 168, - }, - ], - }, - { - matcher: { - id: 'byName', - options: 'MQ cluster', - }, - properties: [ - { - id: 'custom.width', - value: 129, - }, - ], - }, - ], - }, - options: { - cellHeight: 'sm', - footer: { - countRows: false, - enablePagination: false, - fields: '', - reducer: [ - 'sum', - ], - show: false, - }, - frameIndex: 1, - showHeader: true, - sortBy: [], - }, - transformations: [ - { - id: 'joinByField', - options: { - byField: 'Time', - mode: 'inner', - }, - }, - { - id: 'organize', - options: { - excludeByName: { - Time: true, - __name__: true, - description: true, - hostname: true, - instance: true, - job: true, - platform: true, - }, - indexByName: { - Time: 0, - Value: 10, - __name__: 1, - description: 2, - hostname: 3, - 'ibmmq_qmgr_status{job="$job", mq_cluster=~"$mq_cluster", qmgr="$qmgr"}': 9, - instance: 4, - job: 5, - mq_cluster: 6, - platform: 7, - qmgr: 8, - }, - renameByName: { - Time: '', - Value: 'Uptime', - 'ibmmq_qmgr_status{job="$job", mq_cluster=~"$mq_cluster", qmgr="$qmgr"}': 'Status', - mq_cluster: 'MQ cluster', - qmgr: 'Queue manager', - }, - }, - }, - { - id: 'reduce', - options: { - includeTimeField: false, - mode: 'reduceFields', - reducers: [ - 'lastNotNull', - ], - }, - }, - ], -}; - -local cpuUsagePanel(matcher) = { - datasource: promDatasource, - targets: [ - prometheus.target( - 'ibmmq_qmgr_user_cpu_time_percentage{' + matcher + ', mq_cluster=~"$mq_cluster", qmgr=~"$qmgr"}', - datasource=promDatasource, - legendFormat='{{mq_cluster}} - {{qmgr}} - user', - format='time_series', - ), - prometheus.target( - 'ibmmq_qmgr_system_cpu_time_percentage{' + matcher + ', mq_cluster=~"$mq_cluster", qmgr=~"$qmgr"}', - datasource=promDatasource, - legendFormat='{{mq_cluster}} - {{qmgr}} - system', - format='time_series', - ), - ], - type: 'timeseries', - title: 'CPU usage', - description: 'The system/user CPU usage of the queue manager.', - fieldConfig: { - defaults: { - color: { - mode: 'palette-classic', - }, - custom: { - axisCenteredZero: false, - axisColorMode: 'text', - axisLabel: '', - axisPlacement: 'auto', - barAlignment: 0, - drawStyle: 'line', - fillOpacity: 10, - gradientMode: 'none', - hideFrom: { - legend: false, - tooltip: false, - viz: false, - }, - lineInterpolation: 'linear', - lineWidth: 1, - pointSize: 5, - scaleDistribution: { - type: 'linear', - }, - showPoints: 'never', - spanNulls: false, - stacking: { - group: 'A', - mode: 'normal', - }, - 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: 'multi', - sort: 'desc', - }, - }, -}; - -local diskUsagePanel(matcher) = { - datasource: promDatasource, - targets: [ - prometheus.target( - 'ibmmq_qmgr_queue_manager_file_system_in_use_bytes{' + matcher + ', mq_cluster=~"$mq_cluster", qmgr=~"$qmgr"}', - datasource=promDatasource, - legendFormat='{{mq_cluster}} - {{qmgr}}', - format='time_series', - ), - ], - type: 'timeseries', - title: 'Disk usage', - description: 'The disk allocated to the queue manager that is being used.', - fieldConfig: { - defaults: { - color: { - mode: 'palette-classic', - }, - custom: { - axisCenteredZero: false, - axisColorMode: 'text', - axisLabel: '', - axisPlacement: 'auto', - barAlignment: 0, - drawStyle: 'line', - fillOpacity: 10, - gradientMode: 'none', - hideFrom: { - legend: false, - tooltip: false, - viz: false, - }, - lineInterpolation: 'linear', - lineWidth: 1, - pointSize: 5, - scaleDistribution: { - type: 'linear', - }, - showPoints: 'never', - spanNulls: false, - stacking: { - group: 'A', - mode: 'normal', - }, - thresholdsStyle: { - mode: 'off', - }, - }, - mappings: [], - thresholds: { - mode: 'absolute', - steps: [ - { - color: 'green', - value: null, - }, - { - color: 'red', - value: 80, - }, - ], - }, - unit: 'decbytes', - }, - overrides: [], - }, - options: { - legend: { - calcs: [], - displayMode: 'list', - placement: 'bottom', - showLegend: true, - }, - tooltip: { - mode: 'multi', - sort: 'desc', - }, - }, -}; - -local commitsPanel(matcher) = { - datasource: promDatasource, - targets: [ - prometheus.target( - 'ibmmq_qmgr_commit_count{' + matcher + ', mq_cluster=~"$mq_cluster", qmgr=~"$qmgr"}', - datasource=promDatasource, - legendFormat='{{mq_cluster}} - {{qmgr}}', - format='time_series', - ), - ], - type: 'timeseries', - title: 'Commits', - description: 'The commits of the queue manager.', - fieldConfig: { - defaults: { - color: { - mode: 'palette-classic', - }, - custom: { - axisCenteredZero: false, - axisColorMode: 'text', - axisLabel: '', - axisPlacement: 'auto', - barAlignment: 0, - drawStyle: 'line', - fillOpacity: 10, - gradientMode: 'none', - hideFrom: { - legend: false, - tooltip: false, - viz: false, - }, - lineInterpolation: 'linear', - lineWidth: 1, - pointSize: 5, - scaleDistribution: { - type: 'linear', - }, - showPoints: 'never', - spanNulls: false, - stacking: { - group: 'A', - mode: 'normal', - }, - 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: 'multi', - sort: 'desc', - }, - }, -}; - -local publishThroughputPanel(matcher) = { - datasource: promDatasource, - targets: [ - prometheus.target( - 'ibmmq_qmgr_published_to_subscribers_bytes{' + matcher + ', mq_cluster=~"$mq_cluster", qmgr=~"$qmgr"}', - datasource=promDatasource, - legendFormat='{{mq_cluster}} - {{qmgr}}', - format='time_series', - ), - ], - type: 'timeseries', - title: 'Publish throughput', - description: 'The amount of data being pushed from the queue manager to subscribers.', - fieldConfig: { - defaults: { - color: { - mode: 'palette-classic', - }, - custom: { - axisCenteredZero: false, - axisColorMode: 'text', - axisLabel: '', - axisPlacement: 'auto', - barAlignment: 0, - drawStyle: 'line', - fillOpacity: 10, - gradientMode: 'none', - hideFrom: { - legend: false, - tooltip: false, - viz: false, - }, - lineInterpolation: 'linear', - lineWidth: 1, - pointSize: 5, - scaleDistribution: { - type: 'linear', - }, - showPoints: 'never', - spanNulls: false, - stacking: { - group: 'A', - mode: 'none', - }, - thresholdsStyle: { - mode: 'off', - }, - }, - mappings: [], - thresholds: { - mode: 'absolute', - steps: [ - { - color: 'green', - value: null, - }, - { - color: 'red', - value: 80, - }, - ], - }, - unit: 'decbytes', - }, - overrides: [], - }, - options: { - legend: { - calcs: [], - displayMode: 'list', - placement: 'bottom', - showLegend: true, - }, - tooltip: { - mode: 'multi', - sort: 'desc', - }, - }, -}; - -local publishedMessagesPanel(matcher) = { - datasource: promDatasource, - targets: [ - prometheus.target( - 'ibmmq_qmgr_published_to_subscribers_message_count{' + matcher + ', mq_cluster=~"$mq_cluster", qmgr=~"$qmgr"}', - datasource=promDatasource, - legendFormat='{{mq_cluster}} - {{qmgr}}', - format='time_series', - ), - ], - type: 'timeseries', - title: 'Published messages', - description: 'The number of messages being published by the queue manager.', - fieldConfig: { - defaults: { - color: { - mode: 'palette-classic', - }, - custom: { - axisCenteredZero: false, - axisColorMode: 'text', - axisLabel: '', - axisPlacement: 'auto', - barAlignment: 0, - drawStyle: 'line', - fillOpacity: 10, - gradientMode: 'none', - hideFrom: { - legend: false, - tooltip: false, - viz: false, - }, - lineInterpolation: 'linear', - lineWidth: 1, - pointSize: 5, - scaleDistribution: { - type: 'linear', - }, - showPoints: 'never', - spanNulls: false, - stacking: { - group: 'A', - mode: 'normal', - }, - thresholdsStyle: { - mode: 'off', - }, - }, - mappings: [], - thresholds: { - mode: 'absolute', - steps: [ - { - color: 'green', - value: null, - }, - ], - }, - }, - overrides: [], - }, - options: { - legend: { - calcs: [], - displayMode: 'list', - placement: 'bottom', - showLegend: true, - }, - tooltip: { - mode: 'multi', - sort: 'desc', - }, - }, -}; - -local expiredMessagesPanel(matcher) = { - datasource: promDatasource, - targets: [ - prometheus.target( - 'ibmmq_qmgr_expired_message_count{' + matcher + ', mq_cluster=~"$mq_cluster", qmgr=~"$qmgr"}', - datasource=promDatasource, - legendFormat='{{mq_cluster}} - {{qmgr}}', - format='time_series', - ), - ], - type: 'timeseries', - title: 'Expired messages', - description: 'The expired messages of the queue manager.', - fieldConfig: { - defaults: { - color: { - mode: 'palette-classic', - }, - custom: { - axisCenteredZero: false, - axisColorMode: 'text', - axisLabel: '', - axisPlacement: 'auto', - barAlignment: 0, - drawStyle: 'line', - fillOpacity: 10, - gradientMode: 'none', - hideFrom: { - legend: false, - tooltip: false, - viz: false, - }, - lineInterpolation: 'linear', - lineWidth: 1, - pointSize: 5, - scaleDistribution: { - type: 'linear', - }, - showPoints: 'never', - spanNulls: false, - stacking: { - group: 'A', - mode: 'normal', - }, - 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: 'multi', - sort: 'desc', - }, - }, -}; - -local queueOperationsPanel(matcher) = { - datasource: promDatasource, - targets: [ - prometheus.target( - 'sum by (mq_cluster, qmgr, job) (ibmmq_queue_mqset_count{' + matcher + ', mq_cluster=~"$mq_cluster", qmgr=~"$qmgr"})', - datasource=promDatasource, - legendFormat='{{mq_cluster}} - {{qmgr}} - MQSET', - format='time_series', - ), - prometheus.target( - 'sum by (mq_cluster, qmgr, job) (ibmmq_queue_mqinq_count{' + matcher + ', mq_cluster=~"$mq_cluster", qmgr=~"$qmgr"})', - datasource=promDatasource, - legendFormat='{{mq_cluster}} - {{qmgr}} - MQINQ', - format='time_series', - ), - prometheus.target( - 'sum by (mq_cluster, qmgr, job) (ibmmq_queue_mqget_count{' + matcher + ', mq_cluster=~"$mq_cluster", qmgr=~"$qmgr"})', - datasource=promDatasource, - legendFormat='{{mq_cluster}} - {{qmgr}} - MQGET', - format='time_series', - ), - prometheus.target( - 'sum by (mq_cluster, qmgr, job) (ibmmq_queue_mqopen_count{' + matcher + ', mq_cluster=~"$mq_cluster", qmgr=~"$qmgr"})', - datasource=promDatasource, - legendFormat='{{mq_cluster}} - {{qmgr}} - MQOPEN', - format='time_series', - ), - prometheus.target( - 'sum by (mq_cluster, qmgr, job) (ibmmq_queue_mqclose_count{' + matcher + ', mq_cluster=~"$mq_cluster", qmgr=~"$qmgr"})', - datasource=promDatasource, - legendFormat='{{mq_cluster}} - {{qmgr}} - MQCLOSE', - format='time_series', - ), - prometheus.target( - 'sum by (mq_cluster, qmgr, job) (ibmmq_queue_mqput_mqput1_count{' + matcher + ', mq_cluster=~"$mq_cluster", qmgr=~"$qmgr"})', - datasource=promDatasource, - legendFormat='{{mq_cluster}} - {{qmgr}} - MQPUT/MQPUT1', - format='time_series', - ), - ], - type: 'timeseries', - title: 'Queue operations', - description: 'The number of queue operations of the queue manager. ', - fieldConfig: { - defaults: { - color: { - mode: 'palette-classic', - }, - custom: { - axisCenteredZero: false, - axisColorMode: 'text', - axisLabel: '', - axisPlacement: 'auto', - barAlignment: 0, - drawStyle: 'line', - fillOpacity: 10, - gradientMode: 'none', - hideFrom: { - legend: false, - tooltip: false, - viz: false, - }, - lineInterpolation: 'linear', - lineWidth: 1, - pointSize: 5, - scaleDistribution: { - type: 'linear', - }, - showPoints: 'never', - spanNulls: false, - stacking: { - group: 'A', - mode: 'normal', - }, - thresholdsStyle: { - mode: 'off', - }, - }, - mappings: [], - thresholds: { - mode: 'absolute', - steps: [ - { - color: 'green', - value: null, - }, - { - color: 'red', - value: 80, - }, - ], - }, - unit: 'operations', - }, - overrides: [], - }, - options: { - legend: { - calcs: [], - displayMode: 'table', - placement: 'right', - showLegend: true, - }, - tooltip: { - mode: 'multi', - sort: 'desc', - }, - }, -}; - -local logsRow = { - datasource: promDatasource, - targets: [ - prometheus.target( - '', - datasource=promDatasource, - legendFormat='', - ), - ], - type: 'row', - title: 'Logs', - collapsed: false, -}; - -local logLatencyPanel(matcher) = { - datasource: promDatasource, - targets: [ - prometheus.target( - 'ibmmq_qmgr_log_write_latency_seconds{' + matcher + ', mq_cluster=~"$mq_cluster", qmgr=~"$qmgr"}', - datasource=promDatasource, - legendFormat='{{mq_cluster}} - {{qmgr}}', - format='time_series', - ), - ], - type: 'timeseries', - title: 'Log latency', - description: 'The recent latency of log writes.', - fieldConfig: { - defaults: { - color: { - mode: 'palette-classic', - }, - custom: { - axisCenteredZero: false, - axisColorMode: 'text', - axisLabel: '', - axisPlacement: 'auto', - barAlignment: 0, - drawStyle: 'line', - fillOpacity: 10, - gradientMode: 'none', - hideFrom: { - legend: false, - tooltip: false, - viz: false, - }, - lineInterpolation: 'linear', - lineWidth: 1, - pointSize: 5, - scaleDistribution: { - type: 'linear', - }, - showPoints: 'never', - spanNulls: false, - stacking: { - group: 'A', - mode: 'normal', - }, - thresholdsStyle: { - mode: 'off', - }, - }, - mappings: [], - thresholds: { - mode: 'absolute', - steps: [ - { - color: 'green', - value: null, - }, - { - color: 'red', - value: 80, - }, - ], - }, - unit: 's', - }, - overrides: [], - }, - options: { - legend: { - calcs: [], - displayMode: 'list', - placement: 'bottom', - showLegend: true, - }, - tooltip: { - mode: 'multi', - sort: 'desc', - }, - }, -}; - -local logUsagePanel(matcher) = { - datasource: promDatasource, - targets: [ - prometheus.target( - 'ibmmq_qmgr_log_in_use_bytes{' + matcher + ', mq_cluster=~"$mq_cluster", qmgr=~"$qmgr"}', - datasource=promDatasource, - legendFormat='{{mq_cluster}} - {{qmgr}}', - format='time_series', - ), - ], - type: 'timeseries', - title: 'Log usage', - description: 'The amount of data on the filesystem occupied by queue manager logs.', - fieldConfig: { - defaults: { - color: { - mode: 'palette-classic', - }, - custom: { - axisCenteredZero: false, - axisColorMode: 'text', - axisLabel: '', - axisPlacement: 'auto', - barAlignment: 0, - drawStyle: 'line', - fillOpacity: 10, - gradientMode: 'none', - hideFrom: { - legend: false, - tooltip: false, - viz: false, - }, - lineInterpolation: 'linear', - lineWidth: 1, - pointSize: 5, - scaleDistribution: { - type: 'linear', - }, - showPoints: 'never', - spanNulls: false, - stacking: { - group: 'A', - mode: 'normal', - }, - thresholdsStyle: { - mode: 'off', - }, - }, - mappings: [], - thresholds: { - mode: 'absolute', - steps: [ - { - color: 'green', - value: null, - }, - { - color: 'red', - value: 80, - }, - ], - }, - unit: 'decbytes', - }, - overrides: [], - }, - options: { - legend: { - calcs: [], - displayMode: 'list', - placement: 'bottom', - showLegend: true, - }, - tooltip: { - mode: 'multi', - sort: 'desc', - }, - }, -}; - -local errorLogsPanel(cfg) = { - datasource: lokiDatasource, - targets: [ - { - datasource: lokiDatasource, - editorMode: 'code', - expr: '{' + logExpr(cfg.logExpression) + '} |= `` | (filename=~"/var/mqm/qmgrs/.*/errors/.*LOG" or log_type="mq-qmgr-error")', - queryType: 'range', - refId: 'A', - }, - ], - type: 'logs', - title: 'Error logs', - description: 'Recent error logs from the queue manager.', - options: { - dedupStrategy: 'none', - enableLogDetails: true, - prettifyLogMessage: false, - showCommonLabels: false, - showLabels: false, - showTime: false, - sortOrder: 'Descending', - wrapLogMessage: false, - }, -}; - -{ - grafanaDashboards+:: { - 'ibm-mq-queue-manager-overview.json': - dashboard.new( - 'IBM MQ queue manager overview', - time_from='%s' % $._config.dashboardPeriod, - tags=($._config.dashboardTags), - timezone='%s' % $._config.dashboardTimezone, - refresh='%s' % $._config.dashboardRefresh, - description='', - uid=dashboardUid, - ) - - .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(ibmmq_topic_messages_received,job)', - label='Job', - refresh=2, - includeAll=true, - multi=true, - allValues='.+', - sort=0 - ), - template.new( - 'mq_cluster', - promDatasource, - 'label_values(ibmmq_topic_messages_received,mq_cluster)', - label='MQ cluster', - refresh=1, - includeAll=true, - multi=true, - allValues='.+', - sort=0 - ), - template.new( - 'qmgr', - promDatasource, - 'label_values(ibmmq_topic_messages_received{mq_cluster=~"$mq_cluster"},qmgr)', - label='Queue manager', - refresh=1, - includeAll=true, - multi=true, - allValues='', - sort=0 - ), - template.new( - 'cluster', - promDatasource, - 'label_values(ibmmq_qmgr_commit_count{job=~"$job"}, cluster)', - label='Cluster', - refresh=2, - includeAll=true, - multi=true, - allValues='', - hide=if $._config.enableMultiCluster then '' else 'variable', - sort=0 - ), - - ], - ]) - ) - .addLink(grafana.link.dashboards( - asDropdown=false, - title='Other IBM MQ dashboards', - includeVars=true, - keepTime=true, - tags=($._config.dashboardTags), - )) - .addPanels( - std.flattenArrays([ - [ - activeListenersPanel(getMatcher($._config)) { gridPos: { h: 7, w: 4, x: 0, y: 0 } }, - activeConnectionsPanel(getMatcher($._config)) { gridPos: { h: 7, w: 4, x: 4, y: 0 } }, - queuesPanel(getMatcher($._config)) { gridPos: { h: 7, w: 4, x: 8, y: 0 } }, - estimatedMemoryUtilizationPanel(getMatcher($._config)) { gridPos: { h: 7, w: 12, x: 12, y: 0 } }, - queueManagerStatusPanel(getMatcher($._config)) { gridPos: { h: 7, w: 8, x: 0, y: 7 } }, - cpuUsagePanel(getMatcher($._config)) { gridPos: { h: 7, w: 8, x: 8, y: 7 } }, - diskUsagePanel(getMatcher($._config)) { gridPos: { h: 7, w: 8, x: 16, y: 7 } }, - commitsPanel(getMatcher($._config)) { gridPos: { h: 7, w: 8, x: 0, y: 14 } }, - publishThroughputPanel(getMatcher($._config)) { gridPos: { h: 7, w: 8, x: 8, y: 14 } }, - publishedMessagesPanel(getMatcher($._config)) { gridPos: { h: 7, w: 8, x: 16, y: 14 } }, - expiredMessagesPanel(getMatcher($._config)) { gridPos: { h: 7, w: 8, x: 0, y: 21 } }, - queueOperationsPanel(getMatcher($._config)) { gridPos: { h: 7, w: 16, x: 8, y: 21 } }, - logsRow { gridPos: { h: 1, w: 24, x: 0, y: 28 } }, - logLatencyPanel(getMatcher($._config)) { gridPos: { h: 7, w: 12, x: 0, y: 29 } }, - logUsagePanel(getMatcher($._config)) { gridPos: { h: 7, w: 12, x: 12, y: 29 } }, - ], - if $._config.enableLokiLogs then [ - errorLogsPanel($._config) { gridPos: { h: 8, w: 24, x: 0, y: 36 } }, - ] else [], - [ - ], - ]) - ), - - }, -} diff --git a/ibm-mq-mixin/dashboards/queue-overview.libsonnet b/ibm-mq-mixin/dashboards/queue-overview.libsonnet deleted file mode 100644 index 286878b9d..000000000 --- a/ibm-mq-mixin/dashboards/queue-overview.libsonnet +++ /dev/null @@ -1,547 +0,0 @@ -local g = (import 'grafana-builder/grafana.libsonnet'); -local grafana = (import 'grafonnet/grafana.libsonnet'); -local dashboard = grafana.dashboard; -local template = grafana.template; -local prometheus = grafana.prometheus; -local getMatcher(cfg) = '%(ibmmqSelector)s' % cfg; - -local dashboardUid = 'ibm-mq-queue-overview'; - -local promDatasourceName = 'prometheus_datasource'; - -local promDatasource = { - uid: '${%s}' % promDatasourceName, -}; - -local averageQueueTimePanel(matcher) = { - datasource: promDatasource, - targets: [ - prometheus.target( - 'ibmmq_queue_average_queue_time_seconds{' + matcher + ', mq_cluster=~"$mq_cluster", qmgr=~"$qmgr", queue=~"$queue"}', - datasource=promDatasource, - legendFormat='{{mq_cluster}} - {{qmgr}} - {{queue}}', - format='time_series', - ), - ], - type: 'timeseries', - title: 'Average queue time', - description: 'The average amount of time a message spends in the queue.', - fieldConfig: { - defaults: { - color: { - mode: 'palette-classic', - }, - custom: { - axisCenteredZero: false, - axisColorMode: 'text', - axisLabel: '', - axisPlacement: 'auto', - barAlignment: 0, - drawStyle: 'line', - fillOpacity: 10, - gradientMode: 'none', - hideFrom: { - legend: false, - tooltip: false, - viz: false, - }, - lineInterpolation: 'linear', - lineWidth: 1, - pointSize: 5, - scaleDistribution: { - type: 'linear', - }, - showPoints: 'never', - spanNulls: false, - stacking: { - group: 'A', - mode: 'none', - }, - thresholdsStyle: { - mode: 'off', - }, - }, - mappings: [], - thresholds: { - mode: 'absolute', - steps: [ - { - color: 'green', - value: null, - }, - ], - }, - unit: 's', - }, - overrides: [], - }, - options: { - legend: { - calcs: [], - displayMode: 'list', - placement: 'bottom', - showLegend: true, - }, - tooltip: { - mode: 'multi', - sort: 'desc', - }, - }, -}; - -local expiredMessagesPanel(matcher) = { - datasource: promDatasource, - targets: [ - prometheus.target( - 'ibmmq_queue_expired_messages{' + matcher + ', mq_cluster=~"$mq_cluster", qmgr=~"$qmgr", queue=~"$queue"}', - datasource=promDatasource, - legendFormat='{{mq_cluster}} - {{qmgr}} - {{queue}}', - format='time_series', - ), - ], - type: 'timeseries', - title: 'Expired messages', - description: 'The amount of expired messages in the queue.', - fieldConfig: { - defaults: { - color: { - mode: 'palette-classic', - }, - custom: { - axisCenteredZero: false, - axisColorMode: 'text', - axisLabel: '', - axisPlacement: 'auto', - barAlignment: 0, - drawStyle: 'line', - fillOpacity: 10, - gradientMode: 'none', - hideFrom: { - legend: false, - tooltip: false, - viz: false, - }, - lineInterpolation: 'linear', - lineWidth: 1, - pointSize: 5, - scaleDistribution: { - type: 'linear', - }, - showPoints: 'never', - spanNulls: false, - stacking: { - group: 'A', - mode: 'normal', - }, - thresholdsStyle: { - mode: 'off', - }, - }, - mappings: [], - thresholds: { - mode: 'absolute', - steps: [ - { - color: 'green', - value: null, - }, - { - color: 'red', - value: 80, - }, - ], - }, - }, - overrides: [], - }, - options: { - legend: { - calcs: [], - displayMode: 'list', - placement: 'right', - showLegend: true, - }, - tooltip: { - mode: 'multi', - sort: 'desc', - }, - }, -}; - -local depthPanel(matcher) = { - datasource: promDatasource, - targets: [ - prometheus.target( - 'ibmmq_queue_depth{' + matcher + ', mq_cluster=~"$mq_cluster", qmgr=~"$qmgr", queue=~"$queue"}', - datasource=promDatasource, - legendFormat='{{mq_cluster}} - {{qmgr}} - {{queue}}', - format='time_series', - ), - ], - type: 'timeseries', - title: 'Depth', - description: 'The number of active messages in the queue.', - fieldConfig: { - defaults: { - color: { - mode: 'palette-classic', - }, - custom: { - axisCenteredZero: false, - axisColorMode: 'text', - axisLabel: '', - axisPlacement: 'auto', - barAlignment: 0, - drawStyle: 'line', - fillOpacity: 10, - gradientMode: 'none', - hideFrom: { - legend: false, - tooltip: false, - viz: false, - }, - lineInterpolation: 'linear', - lineWidth: 1, - pointSize: 5, - scaleDistribution: { - type: 'linear', - }, - showPoints: 'never', - 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: 'multi', - sort: 'desc', - }, - }, -}; - -local operationThroughputPanel(matcher) = { - datasource: promDatasource, - targets: [ - prometheus.target( - 'ibmmq_queue_mqget_bytes{' + matcher + ', mq_cluster=~"$mq_cluster", qmgr=~"$qmgr", queue=~"$queue"}', - datasource=promDatasource, - legendFormat='{{qmgr}} - {{queue}} - MQGET', - format='time_series', - ), - prometheus.target( - 'ibmmq_queue_mqput_bytes{' + matcher + ', mq_cluster=~"$mq_cluster", qmgr=~"$qmgr", queue=~"$queue"}', - datasource=promDatasource, - legendFormat='{{qmgr}} - {{queue}} - MQPUT', - format='time_series', - ), - ], - type: 'timeseries', - title: 'Operation throughput', - description: 'The amount of throughput going through the queue via MQGETs and MQPUTs.', - fieldConfig: { - defaults: { - color: { - mode: 'palette-classic', - }, - custom: { - axisCenteredZero: false, - axisColorMode: 'text', - axisLabel: '', - axisPlacement: 'auto', - barAlignment: 0, - drawStyle: 'line', - fillOpacity: 10, - gradientMode: 'none', - hideFrom: { - legend: false, - tooltip: false, - viz: false, - }, - lineInterpolation: 'linear', - lineWidth: 1, - pointSize: 5, - scaleDistribution: { - type: 'linear', - }, - showPoints: 'never', - spanNulls: false, - stacking: { - group: 'A', - mode: 'normal', - }, - thresholdsStyle: { - mode: 'off', - }, - }, - mappings: [], - thresholds: { - mode: 'absolute', - steps: [ - { - color: 'green', - value: null, - }, - { - color: 'red', - value: 80, - }, - ], - }, - unit: 'decbytes', - }, - overrides: [], - }, - options: { - legend: { - calcs: [], - displayMode: 'list', - placement: 'right', - showLegend: true, - }, - tooltip: { - mode: 'multi', - sort: 'desc', - }, - }, -}; - -local operationsPanel(matcher) = { - datasource: promDatasource, - targets: [ - prometheus.target( - 'ibmmq_queue_mqset_count{' + matcher + ', mq_cluster=~"$mq_cluster", qmgr=~"$qmgr", queue=~"$queue"}', - datasource=promDatasource, - legendFormat='{{qmgr}} - {{queue}} - MQSET', - format='time_series', - ), - prometheus.target( - 'ibmmq_queue_mqinq_count{' + matcher + ', mq_cluster=~"$mq_cluster", qmgr=~"$qmgr", queue=~"$queue"}', - datasource=promDatasource, - legendFormat='{{qmgr}} - {{queue}} - MQINQ', - format='time_series', - ), - prometheus.target( - 'ibmmq_queue_mqget_count{' + matcher + ', mq_cluster=~"$mq_cluster", qmgr=~"$qmgr", queue=~"$queue"}', - datasource=promDatasource, - legendFormat='{{qmgr}} - {{queue}} - MQGET', - format='time_series', - ), - prometheus.target( - 'ibmmq_queue_mqopen_count{' + matcher + ', mq_cluster=~"$mq_cluster", qmgr=~"$qmgr", queue=~"$queue"}', - datasource=promDatasource, - legendFormat='{{qmgr}} - {{queue}} - MQOPEN', - format='time_series', - ), - prometheus.target( - 'ibmmq_queue_mqclose_count{' + matcher + ', mq_cluster=~"$mq_cluster", qmgr=~"$qmgr", queue=~"$queue"}', - datasource=promDatasource, - legendFormat='{{qmgr}} - {{queue}} - MQCLOSE', - format='time_series', - ), - prometheus.target( - 'ibmmq_queue_mqput_mqput1_count{' + matcher + ', mq_cluster=~"$mq_cluster", qmgr=~"$qmgr", queue=~"$queue"}', - datasource=promDatasource, - legendFormat='{{qmgr}} - {{queue}} - MQPUT/MQPUT1', - format='time_series', - ), - ], - type: 'timeseries', - title: 'Operations', - description: 'The number of queue operations of the queue manager.', - fieldConfig: { - defaults: { - color: { - mode: 'palette-classic', - }, - custom: { - axisCenteredZero: false, - axisColorMode: 'text', - axisLabel: '', - axisPlacement: 'auto', - barAlignment: 0, - drawStyle: 'line', - fillOpacity: 10, - gradientMode: 'none', - hideFrom: { - legend: false, - tooltip: false, - viz: false, - }, - lineInterpolation: 'linear', - lineWidth: 1, - pointSize: 5, - scaleDistribution: { - type: 'linear', - }, - showPoints: 'never', - spanNulls: false, - stacking: { - group: 'A', - mode: 'normal', - }, - thresholdsStyle: { - mode: 'off', - }, - }, - mappings: [], - thresholds: { - mode: 'absolute', - steps: [ - { - color: 'green', - value: null, - }, - { - color: 'red', - value: 80, - }, - ], - }, - unit: 'operations', - }, - overrides: [], - }, - options: { - legend: { - calcs: [ - 'min', - 'max', - 'mean', - ], - displayMode: 'table', - placement: 'right', - showLegend: true, - }, - tooltip: { - mode: 'multi', - sort: 'desc', - }, - }, -}; - -{ - grafanaDashboards+:: { - 'ibm-mq-queue-overview.json': - dashboard.new( - 'IBM MQ queue overview', - time_from='%s' % $._config.dashboardPeriod, - tags=($._config.dashboardTags), - timezone='%s' % $._config.dashboardTimezone, - refresh='%s' % $._config.dashboardRefresh, - description='', - uid=dashboardUid, - ) - - .addTemplates( - [ - template.datasource( - promDatasourceName, - 'prometheus', - null, - label='Data Source', - refresh='load' - ), - template.new( - 'job', - promDatasource, - 'label_values(ibmmq_queue_average_queue_time_seconds,job)', - label='Job', - refresh=2, - includeAll=true, - multi=true, - allValues='.+', - sort=0 - ), - template.new( - 'mq_cluster', - promDatasource, - 'label_values(ibmmq_queue_average_queue_time_seconds{job=~"$job"},mq_cluster)', - label='MQ cluster', - refresh=2, - includeAll=true, - multi=true, - allValues='', - sort=0 - ), - template.new( - 'qmgr', - promDatasource, - 'label_values(ibmmq_queue_average_queue_time_seconds{mq_cluster=~"$mq_cluster"},qmgr)', - label='Queue manager', - refresh=2, - includeAll=true, - multi=true, - allValues='', - sort=0 - ), - template.new( - 'queue', - promDatasource, - 'label_values(ibmmq_queue_average_queue_time_seconds{qmgr=~"$qmgr"},queue)', - label='Queue', - refresh=2, - includeAll=true, - multi=true, - allValues='', - sort=0 - ), - template.new( - 'cluster', - promDatasource, - 'label_values(ibmmq_qmgr_commit_count{job=~"$job"}, cluster)', - label='Cluster', - refresh=2, - includeAll=true, - multi=true, - allValues='', - hide=if $._config.enableMultiCluster then '' else 'variable', - sort=0 - ), - ] - ) - .addLink(grafana.link.dashboards( - asDropdown=false, - title='Other IBM MQ dashboards', - includeVars=true, - keepTime=true, - tags=($._config.dashboardTags), - )) - .addPanels( - [ - averageQueueTimePanel(getMatcher($._config)) { gridPos: { h: 8, w: 12, x: 0, y: 0 } }, - expiredMessagesPanel(getMatcher($._config)) { gridPos: { h: 8, w: 12, x: 12, y: 0 } }, - depthPanel(getMatcher($._config)) { gridPos: { h: 8, w: 24, x: 0, y: 8 } }, - operationThroughputPanel(getMatcher($._config)) { gridPos: { h: 8, w: 9, x: 0, y: 16 } }, - operationsPanel(getMatcher($._config)) { gridPos: { h: 8, w: 15, x: 9, y: 16 } }, - ] - ), - }, -} diff --git a/ibm-mq-mixin/dashboards/topics-overview.libsonnet b/ibm-mq-mixin/dashboards/topics-overview.libsonnet deleted file mode 100644 index 325f43086..000000000 --- a/ibm-mq-mixin/dashboards/topics-overview.libsonnet +++ /dev/null @@ -1,653 +0,0 @@ -local g = (import 'grafana-builder/grafana.libsonnet'); -local grafana = (import 'grafonnet/grafana.libsonnet'); -local dashboard = grafana.dashboard; -local template = grafana.template; -local prometheus = grafana.prometheus; -local getMatcher(cfg) = '%(ibmmqSelector)s' % cfg; - -local dashboardUid = 'ibm-mq-topics-overview'; - -local promDatasourceName = 'prometheus_datasource'; - -local promDatasource = { - uid: '${%s}' % promDatasourceName, -}; - -local topicsRow = { - datasource: promDatasource, - targets: [ - prometheus.target( - '', - datasource=promDatasource, - legendFormat='', - ), - ], - type: 'row', - title: 'Topics', -}; - -local topicMessagesReceivedPanel(matcher) = { - datasource: promDatasource, - targets: [ - prometheus.target( - 'ibmmq_topic_messages_received{' + matcher + ',mq_cluster=~"$mq_cluster",qmgr=~"$qmgr",topic=~"$topic"}', - datasource=promDatasource, - legendFormat='{{mq_cluster}} - {{qmgr}} - {{topic}}', - format='time_series', - ), - ], - type: 'timeseries', - title: 'Topic messages received', - description: 'Received messages per topic.', - fieldConfig: { - defaults: { - color: { - mode: 'palette-classic', - }, - custom: { - axisCenteredZero: false, - axisColorMode: 'text', - axisLabel: '', - axisPlacement: 'auto', - barAlignment: 0, - drawStyle: 'line', - fillOpacity: 10, - gradientMode: 'none', - hideFrom: { - legend: false, - tooltip: false, - viz: false, - }, - lineInterpolation: 'linear', - lineWidth: 1, - pointSize: 5, - scaleDistribution: { - type: 'linear', - }, - showPoints: 'never', - spanNulls: false, - stacking: { - group: 'A', - mode: 'normal', - }, - thresholdsStyle: { - mode: 'off', - }, - }, - decimals: 0, - mappings: [], - thresholds: { - mode: 'absolute', - steps: [ - { - color: 'green', - value: null, - }, - ], - }, - unit: 'none', - }, - overrides: [], - }, - options: { - legend: { - calcs: [], - displayMode: 'list', - placement: 'right', - showLegend: true, - }, - tooltip: { - mode: 'multi', - sort: 'desc', - }, - }, -}; - -local timeSinceLastMessagePanel(matcher) = { - datasource: promDatasource, - targets: [ - prometheus.target( - 'ibmmq_topic_time_since_msg_received{' + matcher + ',mq_cluster=~"$mq_cluster",qmgr=~"$qmgr",topic=~"$topic"}', - datasource=promDatasource, - legendFormat='{{mq_cluster}} - {{qmgr}} - {{topic}}', - format='time_series', - ), - ], - type: 'bargauge', - title: 'Time since last message', - description: 'The time since the topic last received a message.', - fieldConfig: { - defaults: { - color: { - mode: 'thresholds', - }, - mappings: [], - thresholds: { - mode: 'absolute', - steps: [ - { - color: 'green', - value: null, - }, - ], - }, - unit: 's', - }, - overrides: [], - }, - options: { - displayMode: 'basic', - minVizHeight: 10, - minVizWidth: 0, - orientation: 'horizontal', - reduceOptions: { - calcs: [ - 'lastNotNull', - ], - fields: '', - values: false, - }, - showUnfilled: true, - valueMode: 'color', - }, -}; - -local topicSubscribersPanel(matcher) = { - datasource: promDatasource, - targets: [ - prometheus.target( - 'ibmmq_topic_subscriber_count{' + matcher + ',mq_cluster=~"$mq_cluster",qmgr=~"$qmgr",topic=~"$topic"}', - datasource=promDatasource, - legendFormat='{{mq_cluster}} - {{qmgr}} - {{topic}}', - format='time_series', - ), - ], - type: 'timeseries', - title: 'Topic subscribers', - description: 'The number of subscribers per topic.', - fieldConfig: { - defaults: { - color: { - mode: 'palette-classic', - }, - custom: { - axisCenteredZero: false, - axisColorMode: 'text', - axisLabel: '', - axisPlacement: 'auto', - barAlignment: 0, - drawStyle: 'line', - fillOpacity: 10, - gradientMode: 'none', - hideFrom: { - legend: false, - tooltip: false, - viz: false, - }, - lineInterpolation: 'linear', - lineWidth: 1, - pointSize: 5, - scaleDistribution: { - type: 'linear', - }, - showPoints: 'never', - spanNulls: false, - stacking: { - group: 'A', - mode: 'none', - }, - thresholdsStyle: { - mode: 'off', - }, - }, - decimals: 0, - mappings: [], - thresholds: { - mode: 'absolute', - steps: [ - { - color: 'green', - value: null, - }, - ], - }, - unit: 'none', - }, - overrides: [], - }, - options: { - legend: { - calcs: [], - displayMode: 'list', - placement: 'bottom', - showLegend: true, - }, - tooltip: { - mode: 'multi', - sort: 'desc', - }, - }, -}; - -local topicPublishersPanel(matcher) = { - datasource: promDatasource, - targets: [ - prometheus.target( - 'ibmmq_topic_publisher_count{' + matcher + ',mq_cluster=~"$mq_cluster",qmgr=~"$qmgr",topic=~"$topic"}', - datasource=promDatasource, - legendFormat='{{mq_cluster}} - {{qmgr}} - {{topic}}', - format='time_series', - ), - ], - type: 'timeseries', - title: 'Topic publishers', - description: 'The number of publishers per topic.', - fieldConfig: { - defaults: { - color: { - mode: 'palette-classic', - }, - custom: { - axisCenteredZero: false, - axisColorMode: 'text', - axisLabel: '', - axisPlacement: 'auto', - barAlignment: 0, - drawStyle: 'line', - fillOpacity: 10, - gradientMode: 'none', - hideFrom: { - legend: false, - tooltip: false, - viz: false, - }, - lineInterpolation: 'linear', - lineWidth: 1, - pointSize: 5, - scaleDistribution: { - type: 'linear', - }, - showPoints: 'never', - spanNulls: false, - stacking: { - group: 'A', - mode: 'none', - }, - thresholdsStyle: { - mode: 'off', - }, - }, - decimals: 0, - mappings: [], - thresholds: { - mode: 'absolute', - steps: [ - { - color: 'green', - value: null, - }, - ], - }, - unit: 'none', - }, - overrides: [], - }, - options: { - legend: { - calcs: [], - displayMode: 'list', - placement: 'bottom', - showLegend: true, - }, - tooltip: { - mode: 'multi', - sort: 'desc', - }, - }, -}; - -local subscriptionsRow = { - datasource: promDatasource, - targets: [ - prometheus.target( - '', - datasource=promDatasource, - legendFormat='', - ), - ], - type: 'row', - title: 'Subscriptions', - collapsed: false, -}; - -local subscriptionMessagesReceivedPanel(matcher) = { - datasource: promDatasource, - targets: [ - prometheus.target( - 'ibmmq_subscription_messsages_received{' + matcher + ',mq_cluster=~"$mq_cluster",qmgr=~"$qmgr",subscription=~"$subscription"}', - datasource=promDatasource, - legendFormat='{{mq_cluster}} - {{qmgr}} - {{subscription}}', - format='time_series', - ), - ], - type: 'timeseries', - title: 'Subscription messages received', - description: 'The number of messages a subscription receives.', - fieldConfig: { - defaults: { - color: { - mode: 'palette-classic', - }, - custom: { - axisCenteredZero: false, - axisColorMode: 'text', - axisLabel: '', - axisPlacement: 'auto', - barAlignment: 0, - drawStyle: 'line', - fillOpacity: 10, - gradientMode: 'none', - hideFrom: { - legend: false, - tooltip: false, - viz: false, - }, - lineInterpolation: 'linear', - lineWidth: 1, - pointSize: 5, - scaleDistribution: { - type: 'linear', - }, - showPoints: 'never', - spanNulls: false, - stacking: { - group: 'A', - mode: 'normal', - }, - thresholdsStyle: { - mode: 'off', - }, - }, - decimals: 0, - mappings: [], - thresholds: { - mode: 'absolute', - steps: [ - { - color: 'green', - value: null, - }, - ], - }, - unit: 'none', - }, - overrides: [], - }, - options: { - legend: { - calcs: [], - displayMode: 'list', - placement: 'right', - showLegend: true, - }, - tooltip: { - mode: 'multi', - sort: 'desc', - }, - }, - transformations: [], -}; - -local subscriptionStatusPanel(matcher) = { - datasource: promDatasource, - targets: [ - prometheus.target( - 'ibmmq_subscription_time_since_message_published{' + matcher + ',mq_cluster=~"$mq_cluster",qmgr=~"$qmgr",subscription=~"$subscription"}', - datasource=promDatasource, - legendFormat='{{label_name}}', - format='table', - ), - ], - type: 'table', - title: 'Subscription status', - description: 'A table for at a glance information about a subscription.', - fieldConfig: { - defaults: { - color: { - mode: 'thresholds', - }, - custom: { - align: 'center', - cellOptions: { - type: 'auto', - }, - filterable: false, - inspect: false, - }, - mappings: [], - thresholds: { - mode: 'absolute', - steps: [ - { - color: 'green', - value: null, - }, - { - color: 'red', - value: 80, - }, - ], - }, - unit: 's', - }, - overrides: [], - }, - options: { - cellHeight: 'sm', - footer: { - countRows: false, - enablePagination: false, - fields: '', - reducer: [ - 'sum', - ], - show: false, - }, - showHeader: true, - sortBy: [ - { - desc: false, - displayName: 'subid', - }, - ], - }, - transformations: [ - { - id: 'organize', - options: { - excludeByName: { - Time: true, - __name__: true, - instance: true, - job: true, - platform: true, - subid: true, - type: false, - }, - indexByName: { - Time: 6, - Value: 5, - __name__: 7, - instance: 8, - job: 9, - mq_cluster: 1, - platform: 10, - qmgr: 0, - subid: 11, - subscription: 2, - topic: 4, - type: 3, - }, - renameByName: {}, - }, - }, - { - id: 'groupBy', - options: { - fields: { - Value: { - aggregations: [ - 'last', - ], - operation: 'aggregate', - }, - mq_cluster: { - aggregations: [], - operation: 'groupby', - }, - qmgr: { - aggregations: [], - operation: 'groupby', - }, - subscription: { - aggregations: [], - operation: 'groupby', - }, - topic: { - aggregations: [], - operation: 'groupby', - }, - type: { - aggregations: [], - operation: 'groupby', - }, - }, - }, - }, - { - id: 'organize', - options: { - excludeByName: {}, - indexByName: {}, - renameByName: { - 'Value (last)': 'Time since last subscription message', - 'Value (lastNotNull)': 'Time since last subscription message', - }, - }, - }, - ], -}; - -{ - grafanaDashboards+:: { - 'ibm-mq-topics-overview.json': - dashboard.new( - 'IBM MQ topics overview', - time_from='%s' % $._config.dashboardPeriod, - tags=($._config.dashboardTags), - timezone='%s' % $._config.dashboardTimezone, - refresh='%s' % $._config.dashboardRefresh, - description='', - uid=dashboardUid, - ) - - .addTemplates( - [ - template.datasource( - promDatasourceName, - 'prometheus', - null, - label='Data Source', - refresh='load' - ), - template.new( - 'job', - promDatasource, - 'label_values(ibmmq_topic_messages_received,job)', - label='Job', - refresh=2, - includeAll=false, - multi=false, - allValues='', - sort=0 - ), - template.new( - 'mq_cluster', - promDatasource, - 'label_values(ibmmq_topic_messages_received{job=~"$job"},mq_cluster)', - label='MQ cluster', - refresh=2, - includeAll=true, - multi=true, - allValues='.+', - sort=0 - ), - template.new( - 'qmgr', - promDatasource, - 'label_values(ibmmq_topic_messages_received{mq_cluster=~"$mq_cluster"},qmgr)', - label='Queue manager', - refresh=2, - includeAll=false, - multi=false, - allValues='', - sort=0 - ), - template.new( - 'topic', - promDatasource, - 'label_values(ibmmq_topic_subscriber_count{qmgr=~"$qmgr",topic!~"SYSTEM.*|\\\\$SYS.*|"},topic)', - label='Topic', - refresh=2, - includeAll=true, - multi=true, - allValues='', - sort=0 - ), - template.new( - 'subscription', - promDatasource, - 'label_values(ibmmq_subscription_messsages_received{qmgr=~"$qmgr",subscription!~"SYSTEM.*|"},subscription)', - label='Subscription', - refresh=2, - includeAll=true, - multi=true, - allValues='', - sort=0 - ), - template.new( - 'cluster', - promDatasource, - 'label_values(ibmmq_qmgr_commit_count{job=~"$job"}, cluster)', - label='Cluster', - refresh=2, - includeAll=true, - multi=true, - allValues='', - hide=if $._config.enableMultiCluster then '' else 'variable', - sort=0 - ), - - ] - ) - .addLink(grafana.link.dashboards( - asDropdown=false, - title='Other IBM MQ dashboards', - includeVars=true, - keepTime=true, - tags=($._config.dashboardTags), - )) - .addPanels( - [ - topicsRow { gridPos: { h: 1, w: 24, x: 0, y: 0 } }, - topicMessagesReceivedPanel(getMatcher($._config)) { gridPos: { h: 6, w: 16, x: 0, y: 1 } }, - timeSinceLastMessagePanel(getMatcher($._config)) { gridPos: { h: 6, w: 8, x: 16, y: 1 } }, - topicSubscribersPanel(getMatcher($._config)) { gridPos: { h: 6, w: 12, x: 0, y: 7 } }, - topicPublishersPanel(getMatcher($._config)) { gridPos: { h: 6, w: 12, x: 12, y: 7 } }, - subscriptionsRow { gridPos: { h: 1, w: 24, x: 0, y: 13 } }, - subscriptionMessagesReceivedPanel(getMatcher($._config)) { gridPos: { h: 6, w: 24, x: 0, y: 14 } }, - subscriptionStatusPanel(getMatcher($._config)) { gridPos: { h: 10, w: 24, x: 0, y: 20 } }, - ] - ), - }, -} diff --git a/ibm-mq-mixin/dashboards_out/ibm-mq-cluster-overview.json b/ibm-mq-mixin/dashboards_out/ibm-mq-cluster-overview.json index 4f075e6bf..d423a437c 100644 --- a/ibm-mq-mixin/dashboards_out/ibm-mq-cluster-overview.json +++ b/ibm-mq-mixin/dashboards_out/ibm-mq-cluster-overview.json @@ -1,88 +1,104 @@ { - "__inputs": [ ], - "__requires": [ ], "annotations": { "list": [ ] }, - "description": "", - "editable": false, - "gnetId": null, - "graphTooltip": 0, - "hideControls": false, - "id": null, "links": [ { - "asDropdown": false, - "icon": "external link", + "includeVars": true, + "keepTime": true, + "title": "IBM MQ logs", + "type": "link", + "url": "/d/ibmmq-logs" + }, + { + "includeVars": true, + "keepTime": true, + "title": "IBM MQ queue manager overview", + "type": "link", + "url": "/d/ibmmq-queue-manager-overview" + }, + { + "includeVars": true, + "keepTime": true, + "title": "IBM MQ queue overview", + "type": "link", + "url": "/d/ibmmq-queue-overview" + }, + { + "includeVars": true, + "keepTime": true, + "title": "IBM MQ topics overview", + "type": "link", + "url": "/d/ibmmq-topics-overview" + }, + { + "asDropdown": true, "includeVars": true, "keepTime": true, "tags": [ "ibm-mq-mixin" ], - "targetBlank": false, - "title": "Other IBM MQ 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": "Cluster overview", + "type": "row" + }, { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, "description": "The unique number of clusters being reported.", "fieldConfig": { "defaults": { "color": { - "mode": "palette-classic" + "fixedColor": "text", + "mode": "fixed" }, - "mappings": [ ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 0 - } - ] - } - }, - "overrides": [ ] + "unit": "none" + } }, "gridPos": { "h": 7, "w": 4, "x": 0, - "y": 0 + "y": 1 }, "id": 2, "options": { - "colorMode": "value", + "colorMode": "fixed", "graphMode": "none", - "justifyMode": "auto", - "orientation": "auto", "reduceOptions": { "calcs": [ "lastNotNull" - ], - "fields": "", - "values": false - }, - "textMode": "auto" + ] + } }, + "pluginVersion": "v11.0.0", "targets": [ { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, - "expr": "count(count(ibmmq_qmgr_commit_count{job=~\"$job\"}) by (mq_cluster))", + "expr": "count(count(ibmmq_qmgr_commit_count{job=\"integrations/ibm-mq\",job=~\"$job\",cluster=~\"$cluster\",mq_cluster=~\"$mq_cluster\",instance=~\"$instance\",qmgr=~\"$qmgr\"}) by (mq_cluster))", "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{job}} - {{mq_cluster}}" + "instant": false, + "legendFormat": "{{job}} - {{mq_cluster}}", + "refId": "Clusters" } ], "title": "Clusters", @@ -90,61 +106,47 @@ }, { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, "description": "The unique number of queue managers in the cluster being reported.", "fieldConfig": { "defaults": { "color": { - "mode": "palette-classic" + "fixedColor": "text", + "mode": "fixed" }, - "mappings": [ ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 0 - } - ] - } - }, - "overrides": [ ] + "unit": "none" + } }, "gridPos": { "h": 7, "w": 4, "x": 4, - "y": 0 + "y": 1 }, "id": 3, "options": { - "colorMode": "value", + "colorMode": "fixed", "graphMode": "none", - "justifyMode": "auto", - "orientation": "auto", "reduceOptions": { "calcs": [ "lastNotNull" - ], - "fields": "", - "values": false - }, - "textMode": "auto" + ] + } }, + "pluginVersion": "v11.0.0", "targets": [ { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, - "expr": "count(count(ibmmq_qmgr_commit_count{job=~\"$job\"}) by (qmgr, mq_cluster))", + "expr": "count(count(ibmmq_qmgr_commit_count{job=\"integrations/ibm-mq\",job=~\"$job\",cluster=~\"$cluster\",mq_cluster=~\"$mq_cluster\",instance=~\"$instance\",qmgr=~\"$qmgr\"}) by (qmgr, mq_cluster))", "format": "time_series", - "intervalFactor": 2, - "legendFormat": "" + "instant": false, + "legendFormat": "", + "refId": "Queue managers" } ], "title": "Queue managers", @@ -152,61 +154,47 @@ }, { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, "description": "The unique number of topics in the cluster.", "fieldConfig": { "defaults": { "color": { - "mode": "palette-classic" + "fixedColor": "text", + "mode": "fixed" }, - "mappings": [ ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 0 - } - ] - } - }, - "overrides": [ ] + "unit": "none" + } }, "gridPos": { "h": 7, "w": 4, "x": 8, - "y": 0 + "y": 1 }, "id": 4, "options": { - "colorMode": "value", + "colorMode": "fixed", "graphMode": "none", - "justifyMode": "auto", - "orientation": "auto", "reduceOptions": { "calcs": [ "lastNotNull" - ], - "fields": "", - "values": false - }, - "textMode": "auto" + ] + } }, + "pluginVersion": "v11.0.0", "targets": [ { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, - "expr": "count(count(ibmmq_topic_messages_received{job=~\"$job\"}) by (topic, mq_cluster))", + "expr": "count(count(ibmmq_topic_messages_received{job=\"integrations/ibm-mq\",job=~\"$job\",cluster=~\"$cluster\",mq_cluster=~\"$mq_cluster\",instance=~\"$instance\",qmgr=~\"$qmgr\"}) by (topic, mq_cluster))", "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{job}} - {{mq_cluster}}" + "instant": false, + "legendFormat": "{{job}} - {{mq_cluster}}", + "refId": "Topics" } ], "title": "Topics", @@ -214,61 +202,47 @@ }, { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, "description": "The unique number of queues in the cluster.", "fieldConfig": { "defaults": { "color": { - "mode": "palette-classic" + "fixedColor": "text", + "mode": "fixed" }, - "mappings": [ ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 0 - } - ] - } - }, - "overrides": [ ] + "unit": "none" + } }, "gridPos": { "h": 7, "w": 4, "x": 12, - "y": 0 + "y": 1 }, "id": 5, "options": { - "colorMode": "value", + "colorMode": "fixed", "graphMode": "none", - "justifyMode": "auto", - "orientation": "auto", "reduceOptions": { "calcs": [ "lastNotNull" - ], - "fields": "", - "values": false - }, - "textMode": "auto" + ] + } }, + "pluginVersion": "v11.0.0", "targets": [ { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, - "expr": "count(count(ibmmq_queue_depth{job=~\"$job\"}) by (queue, mq_cluster))", + "expr": "count(count(ibmmq_queue_depth{job=\"integrations/ibm-mq\",job=~\"$job\",cluster=~\"$cluster\",mq_cluster=~\"$mq_cluster\",instance=~\"$instance\",qmgr=~\"$qmgr\"}) by (queue, mq_cluster))", "format": "time_series", - "intervalFactor": 2, - "legendFormat": "" + "instant": false, + "legendFormat": "", + "refId": "Queues" } ], "title": "Queues", @@ -276,59 +250,20 @@ }, { "datasource": { - "uid": "${prometheus_datasource}" + "type": "datasource", + "uid": "-- Mixed --" }, - "description": "The number of queue operations of the cluster. ", + "description": "The number of queue operations of the cluster.", "fieldConfig": { "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - } - }, - "mappings": [ ], "unit": "operations" - }, - "overrides": [ - { - "__systemRef": "hideSeriesFrom", - "matcher": { - "id": "byNames", - "options": { - "mode": "exclude", - "names": [ - "MQINQ", - "MQGET", - "MQOPEN", - "MQPUT/MQPUT1" - ], - "prefix": "All except:", - "readOnly": true - } - }, - "properties": [ - { - "id": "custom.hideFrom", - "value": { - "legend": false, - "tooltip": false, - "viz": true - } - } - ] - } - ] + } }, "gridPos": { "h": 15, "w": 8, "x": 16, - "y": 0 + "y": 1 }, "id": 6, "options": { @@ -341,69 +276,76 @@ "reduceOptions": { "calcs": [ "lastNotNull" - ], - "fields": "", - "values": false - }, - "tooltip": { - "mode": "multi", - "sort": "none" + ] } }, + "pluginVersion": "v11.4.0", "targets": [ { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, - "expr": "sum by (mq_cluster) (ibmmq_queue_mqset_count{job=~\"$job\", mq_cluster=~\"$mq_cluster\"})", + "expr": "sum by (mq_cluster) (ibmmq_queue_mqset_count{job=\"integrations/ibm-mq\",job=~\"$job\",cluster=~\"$cluster\",mq_cluster=~\"$mq_cluster\",instance=~\"$instance\",qmgr=~\"$qmgr\"})", "format": "time_series", - "intervalFactor": 2, - "legendFormat": "MQSET" + "instant": false, + "legendFormat": "MQSET", + "refId": "Queue operations - MQSET" }, { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, - "expr": "sum by (mq_cluster) (ibmmq_queue_mqinq_count{job=~\"$job\", mq_cluster=~\"$mq_cluster\"})", + "expr": "sum by (mq_cluster) (ibmmq_queue_mqinq_count{job=\"integrations/ibm-mq\",job=~\"$job\",cluster=~\"$cluster\",mq_cluster=~\"$mq_cluster\",instance=~\"$instance\",qmgr=~\"$qmgr\"})", "format": "time_series", - "intervalFactor": 2, - "legendFormat": "MQINQ" + "instant": false, + "legendFormat": "MQINQ", + "refId": "Queue operations - MQINQ" }, { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, - "expr": "sum by (mq_cluster) (ibmmq_queue_mqget_count{job=~\"$job\", mq_cluster=~\"$mq_cluster\"})", + "expr": "sum by (mq_cluster) (ibmmq_queue_mqget_count{job=\"integrations/ibm-mq\",job=~\"$job\",cluster=~\"$cluster\",mq_cluster=~\"$mq_cluster\",instance=~\"$instance\",qmgr=~\"$qmgr\"})", "format": "time_series", - "intervalFactor": 2, - "legendFormat": "MQGET" + "instant": false, + "legendFormat": "MQGET", + "refId": "Queue operations - MQGET" }, { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, - "expr": "sum by (mq_cluster) (ibmmq_queue_mqopen_count{job=~\"$job\", mq_cluster=~\"$mq_cluster\"})", + "expr": "sum by (mq_cluster) (ibmmq_queue_mqopen_count{job=\"integrations/ibm-mq\",job=~\"$job\",cluster=~\"$cluster\",mq_cluster=~\"$mq_cluster\",instance=~\"$instance\",qmgr=~\"$qmgr\"})", "format": "time_series", - "intervalFactor": 2, - "legendFormat": "MQOPEN" + "instant": false, + "legendFormat": "MQOPEN", + "refId": "Queue operations - MQOPEN" }, { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, - "expr": "sum by (mq_cluster) (ibmmq_queue_mqclose_count{job=~\"$job\", mq_cluster=~\"$mq_cluster\"})", + "expr": "sum by (mq_cluster) (ibmmq_queue_mqclose_count{job=\"integrations/ibm-mq\",job=~\"$job\",cluster=~\"$cluster\",mq_cluster=~\"$mq_cluster\",instance=~\"$instance\",qmgr=~\"$qmgr\"})", "format": "time_series", - "intervalFactor": 2, - "legendFormat": "MQCLOSE" + "instant": false, + "legendFormat": "MQCLOSE", + "refId": "Queue operations - MQCLOSE" }, { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, - "expr": "sum by (mq_cluster) (ibmmq_queue_mqput_mqput1_count{job=~\"$job\", mq_cluster=~\"$mq_cluster\"})", + "expr": "sum by (mq_cluster) (ibmmq_queue_mqput_mqput1_count{job=\"integrations/ibm-mq\",job=~\"$job\",cluster=~\"$cluster\",mq_cluster=~\"$mq_cluster\",instance=~\"$instance\",qmgr=~\"$qmgr\"})", "format": "time_series", - "intervalFactor": 2, - "legendFormat": "MQPUT/MQPUT1" + "instant": false, + "legendFormat": "MQPUT/MQPUT1", + "refId": "Queue operations - MQPUT/MQPUT1" } ], "title": "Queue operations", @@ -411,6 +353,7 @@ }, { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, "description": "The status of the cluster.", @@ -442,52 +385,31 @@ }, "type": "value" } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [ ] + ] + } }, "gridPos": { "h": 4, "w": 16, "x": 0, - "y": 7 + "y": 5 }, "id": 7, "options": { - "cellHeight": "sm", - "footer": { - "countRows": false, - "enablePagination": false, - "fields": "", - "reducer": [ - "sum" - ], - "show": false - }, - "showHeader": true + "enablePagination": true }, + "pluginVersion": "v11.0.0", "targets": [ { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, - "expr": "ibmmq_cluster_suspend{job=~\"$job\", mq_cluster=~\"$mq_cluster\"}", + "expr": "ibmmq_cluster_suspend{job=\"integrations/ibm-mq\",job=~\"$job\",cluster=~\"$cluster\",mq_cluster=~\"$mq_cluster\",instance=~\"$instance\",qmgr=~\"$qmgr\"}", "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{job}} - {{mq_cluster}}" + "instant": false, + "legendFormat": "{{job}} - {{mq_cluster}}", + "refId": "Cluster status" } ], "title": "Cluster status", @@ -531,6 +453,7 @@ }, { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, "description": "The queue managers of the cluster displayed in a table.", @@ -585,57 +508,31 @@ }, "type": "value" } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [ ] + ] + } }, "gridPos": { "h": 4, "w": 16, "x": 0, - "y": 11 + "y": 9 }, "id": 8, "options": { - "cellHeight": "sm", - "footer": { - "countRows": false, - "fields": "", - "reducer": [ - "sum" - ], - "show": false - }, - "showHeader": true, - "sortBy": [ - { - "desc": false, - "displayName": "ibmmq_qmgr_status{description=\"-\", hostname=\"keith-ibm-mq-1804-2-test\", instance=\"localhost:9157\", job=\"integrations/ibm_mq\", mq_cluster=\"\", platform=\"UNIX\", qmgr=\"QM1\"}" - } - ] + "enablePagination": true }, + "pluginVersion": "v11.0.0", "targets": [ { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, - "expr": "ibmmq_qmgr_status{job=~\"$job\", mq_cluster=~\"$mq_cluster\"}", + "expr": "ibmmq_qmgr_status{job=\"integrations/ibm-mq\",job=~\"$job\",cluster=~\"$cluster\",mq_cluster=~\"$mq_cluster\",instance=~\"$instance\",qmgr=~\"$qmgr\"}", "format": "time_series", - "intervalFactor": 2, - "legendFormat": "" + "instant": false, + "legendFormat": "", + "refId": "Queue manager status" } ], "title": "Queue manager status", @@ -679,99 +576,62 @@ }, { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, - "description": "The time it takes for the messages to get through the transmission queue. (Long) - total time taken for messages to be transmitted over the channel, (Short) - an average, minimum, or maximum time taken to transmit messages over the channel in recent intervals. ", + "description": "The time it takes for the messages to get through the transmission queue. (Long) - total time taken for messages to be transmitted over the channel, (Short) - an average, minimum, or maximum time taken to transmit messages over the channel in recent intervals.", "fieldConfig": { "defaults": { - "color": { - "mode": "palette-classic" - }, "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [ ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] + "fillOpacity": 30, + "gradientMode": "opacity", + "lineInterpolation": "smooth", + "lineWidth": 2, + "showPoints": "never" }, "unit": "µs" - }, - "overrides": [ ] + } }, "gridPos": { "h": 8, "w": 24, "x": 0, - "y": 15 + "y": 17 }, "id": 9, "options": { "legend": { "calcs": [ ], - "displayMode": "list", - "placement": "bottom", - "showLegend": true + "displayMode": "list" }, "tooltip": { "mode": "multi", "sort": "desc" } }, + "pluginVersion": "v11.0.0", "targets": [ { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, - "expr": "ibmmq_channel_xmitq_time_short{type=\"SENDER\", job=~\"$job\", mq_cluster=~\"$mq_cluster\"}", + "expr": "ibmmq_channel_xmitq_time_short{type=\"SENDER\", job=\"integrations/ibm-mq\",job=~\"$job\",cluster=~\"$cluster\",mq_cluster=~\"$mq_cluster\",instance=~\"$instance\",qmgr=~\"$qmgr\"}", "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{channel}} - short" + "instant": false, + "legendFormat": "{{channel}} - short", + "refId": "Transmission queue time - short" }, { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, - "expr": "ibmmq_channel_xmitq_time_long{type=~\"SENDER\", job=~\"$job\", mq_cluster=~\"$mq_cluster\"}", + "expr": "ibmmq_channel_xmitq_time_long{type=~\"SENDER\", job=\"integrations/ibm-mq\",job=~\"$job\",cluster=~\"$cluster\",mq_cluster=~\"$mq_cluster\",instance=~\"$instance\",qmgr=~\"$qmgr\"}", "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{channel}} - long" + "instant": false, + "legendFormat": "{{channel}} - long", + "refId": "Transmission queue time - long" } ], "title": "Transmission queue time", @@ -779,90 +639,101 @@ } ], "refresh": "1m", - "rows": [ ], - "schemaVersion": 14, - "style": "dark", + "schemaVersion": 39, "tags": [ "ibm-mq-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(ibmmq_qmgr_commit_count,job)", - "refresh": 1, - "regex": "", - "sort": 0, - "tagValuesQuery": "", - "tags": [ ], - "tagsQuery": "", - "type": "query", - "useTags": false + "query": "label_values(ibmmq_qmgr_commit_count{job=\"integrations/ibm-mq\"}, job)", + "refresh": 2, + "sort": 1, + "type": "query" }, { - "allValue": "", - "current": { }, + "allValue": ".*", "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, - "hide": 0, - "includeAll": false, + "includeAll": true, + "label": "Cluster", + "multi": true, + "name": "cluster", + "query": "label_values(ibmmq_qmgr_commit_count{job=\"integrations/ibm-mq\",job=~\"$job\"}, cluster)", + "refresh": 2, + "sort": 1, + "type": "query" + }, + { + "allValue": ".*", + "datasource": { + "type": "prometheus", + "uid": "${prometheus_datasource}" + }, + "includeAll": true, "label": "MQ cluster", "multi": false, "name": "mq_cluster", - "options": [ ], - "query": "label_values(ibmmq_qmgr_commit_count,mq_cluster)", + "query": "label_values(ibmmq_qmgr_commit_count{job=\"integrations/ibm-mq\",job=~\"$job\",cluster=~\"$cluster\"}, mq_cluster)", "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": 2, "includeAll": true, - "label": "Cluster", + "label": "Instance", "multi": true, - "name": "cluster", - "options": [ ], - "query": "label_values(ibmmq_qmgr_commit_count{job=~\"$job\"}, cluster)", + "name": "instance", + "query": "label_values(ibmmq_qmgr_commit_count{job=\"integrations/ibm-mq\",job=~\"$job\",cluster=~\"$cluster\",mq_cluster=~\"$mq_cluster\"}, instance)", + "refresh": 2, + "sort": 1, + "type": "query" + }, + { + "allValue": ".+", + "datasource": { + "type": "prometheus", + "uid": "${prometheus_datasource}" + }, + "includeAll": true, + "label": "Queue manager", + "multi": true, + "name": "qmgr", + "query": "label_values(ibmmq_qmgr_commit_count{job=\"integrations/ibm-mq\",job=~\"$job\",cluster=~\"$cluster\",mq_cluster=~\"$mq_cluster\",instance=~\"$instance\"}, qmgr)", "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" } ] }, @@ -870,33 +741,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": "IBM MQ cluster overview", - "uid": "ibm-mq-cluster-overview", - "version": 0 + "uid": "ibmmq-cluster-overview" } \ No newline at end of file diff --git a/ibm-mq-mixin/dashboards_out/ibm-mq-logs.json b/ibm-mq-mixin/dashboards_out/ibm-mq-logs.json new file mode 100644 index 000000000..720c6d1d3 --- /dev/null +++ b/ibm-mq-mixin/dashboards_out/ibm-mq-logs.json @@ -0,0 +1,357 @@ +{ + "annotations": { + "list": [ ] + }, + "links": [ + { + "includeVars": true, + "keepTime": true, + "title": "IBM MQ cluster overview", + "type": "link", + "url": "/d/ibmmq-cluster-overview" + }, + { + "includeVars": true, + "keepTime": true, + "title": "IBM MQ logs", + "type": "link", + "url": "/d/ibmmq-logs" + }, + { + "includeVars": true, + "keepTime": true, + "title": "IBM MQ queue manager overview", + "type": "link", + "url": "/d/ibmmq-queue-manager-overview" + }, + { + "includeVars": true, + "keepTime": true, + "title": "IBM MQ queue overview", + "type": "link", + "url": "/d/ibmmq-queue-overview" + }, + { + "includeVars": true, + "keepTime": true, + "title": "IBM MQ topics overview", + "type": "link", + "url": "/d/ibmmq-topics-overview" + }, + { + "asDropdown": true, + "includeVars": true, + "keepTime": true, + "tags": [ + "ibm-mq-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=\"integrations/ibm-mq\",job=~\"$job\",cluster=~\"$cluster\",mq_cluster=~\"$mq_cluster\",qmgr=~\"$qmgr\"}\n|~ \"$regex_search\"\n\n[$__auto]))\n", + "legendFormat": "{{ level }}" + } + ], + "title": "Logs volume", + "transformations": [ + { + "id": "renameByRegex", + "options": { + "regex": "Value", + "renamePattern": "logs" + } + } + ], + "type": "timeseries" + }, + { + "datasource": { + "type": "datasource", + "uid": "-- Mixed --" + }, + "gridPos": { + "h": 18, + "w": 24, + "x": 0, + "y": 18 + }, + "id": 2, + "options": { + "dedupStrategy": "exact", + "enableLogDetails": true, + "prettifyLogMessage": true, + "showTime": false, + "wrapLogMessage": false + }, + "pluginVersion": "v11.0.0", + "targets": [ + { + "datasource": { + "type": "loki", + "uid": "${loki_datasource}" + }, + "expr": "{job=\"integrations/ibm-mq\",job=~\"$job\",cluster=~\"$cluster\",mq_cluster=~\"$mq_cluster\",qmgr=~\"$qmgr\"} \n|~ \"$regex_search\"\n\n\n" + } + ], + "title": "Logs", + "type": "logs" + } + ], + "refresh": "1m", + "schemaVersion": 39, + "tags": [ + "ibm-mq-mixin" + ], + "templating": { + "list": [ + { + "label": "Loki data source", + "name": "loki_datasource", + "query": "loki", + "regex": "", + "type": "datasource" + }, + { + "allValue": ".*", + "datasource": { + "type": "loki", + "uid": "${loki_datasource}" + }, + "includeAll": true, + "label": "Job", + "multi": true, + "name": "job", + "query": "label_values({job=\"integrations/ibm-mq\"}, job)", + "refresh": 2, + "sort": 1, + "type": "query" + }, + { + "allValue": ".*", + "datasource": { + "type": "loki", + "uid": "${loki_datasource}" + }, + "includeAll": true, + "label": "Cluster", + "multi": true, + "name": "cluster", + "query": "label_values({job=\"integrations/ibm-mq\",job=~\"$job\"}, cluster)", + "refresh": 2, + "sort": 1, + "type": "query" + }, + { + "allValue": ".*", + "datasource": { + "type": "loki", + "uid": "${loki_datasource}" + }, + "includeAll": true, + "label": "MQ cluster", + "multi": false, + "name": "mq_cluster", + "query": "label_values({job=\"integrations/ibm-mq\",job=~\"$job\",cluster=~\"$cluster\"}, mq_cluster)", + "refresh": 2, + "sort": 1, + "type": "query" + }, + { + "allValue": ".*", + "datasource": { + "type": "loki", + "uid": "${loki_datasource}" + }, + "includeAll": true, + "label": "Queue manager", + "multi": true, + "name": "qmgr", + "query": "label_values({job=\"integrations/ibm-mq\",job=~\"$job\",cluster=~\"$cluster\",mq_cluster=~\"$mq_cluster\"}, qmgr)", + "refresh": 2, + "sort": 1, + "type": "query" + }, + { + "current": { + "selected": false, + "text": "", + "value": "" + }, + "label": "Regex search", + "name": "regex_search", + "options": [ + { + "selected": true, + "text": "", + "value": "" + } + ], + "query": "", + "type": "textbox" + }, + { + "hide": 2, + "label": "Prometheus data source", + "name": "prometheus_datasource", + "query": "prometheus", + "regex": "", + "type": "datasource" + } + ] + }, + "time": { + "from": "now-1h", + "to": "now" + }, + "timezone": "default", + "title": "IBM MQ logs", + "uid": "ibmmq-logs" + } \ No newline at end of file diff --git a/ibm-mq-mixin/dashboards_out/ibm-mq-queue-manager-overview.json b/ibm-mq-mixin/dashboards_out/ibm-mq-queue-manager-overview.json index 8fa5a9ece..9a348cf8e 100644 --- a/ibm-mq-mixin/dashboards_out/ibm-mq-queue-manager-overview.json +++ b/ibm-mq-mixin/dashboards_out/ibm-mq-queue-manager-overview.json @@ -1,44 +1,74 @@ { - "__inputs": [ ], - "__requires": [ ], "annotations": { "list": [ ] }, - "description": "", - "editable": false, - "gnetId": null, - "graphTooltip": 0, - "hideControls": false, - "id": null, "links": [ { - "asDropdown": false, - "icon": "external link", + "includeVars": true, + "keepTime": true, + "title": "IBM MQ cluster overview", + "type": "link", + "url": "/d/ibmmq-cluster-overview" + }, + { + "includeVars": true, + "keepTime": true, + "title": "IBM MQ logs", + "type": "link", + "url": "/d/ibmmq-logs" + }, + { + "includeVars": true, + "keepTime": true, + "title": "IBM MQ queue overview", + "type": "link", + "url": "/d/ibmmq-queue-overview" + }, + { + "includeVars": true, + "keepTime": true, + "title": "IBM MQ topics overview", + "type": "link", + "url": "/d/ibmmq-topics-overview" + }, + { + "asDropdown": true, "includeVars": true, "keepTime": true, "tags": [ "ibm-mq-mixin" ], - "targetBlank": false, - "title": "Other IBM MQ 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": "Queue manager overview", + "type": "row" + }, { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, "description": "The number of active listeners for the queue manager.", "fieldConfig": { "defaults": { "color": { - "mode": "thresholds" + "fixedColor": "text", + "mode": "fixed" }, - "mappings": [ ], "thresholds": { - "mode": "absolute", "steps": [ { "color": "red", @@ -49,40 +79,38 @@ "value": 1 } ] - } - }, - "overrides": [ ] + }, + "unit": "none" + } }, "gridPos": { - "h": 7, + "h": 8, "w": 4, "x": 0, - "y": 0 + "y": 1 }, "id": 2, "options": { "colorMode": "value", "graphMode": "none", - "justifyMode": "auto", - "orientation": "auto", "reduceOptions": { "calcs": [ "lastNotNull" - ], - "fields": "", - "values": false - }, - "textMode": "auto" + ] + } }, + "pluginVersion": "v11.0.0", "targets": [ { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, - "expr": "ibmmq_qmgr_active_listeners{job=~\"$job\", mq_cluster=~\"$mq_cluster\", qmgr=~\"$qmgr\"}", + "expr": "ibmmq_qmgr_active_listeners{job=\"integrations/ibm-mq\",job=~\"$job\",cluster=~\"$cluster\",mq_cluster=~\"$mq_cluster\",instance=~\"$instance\",qmgr=~\"$qmgr\"}", "format": "time_series", - "intervalFactor": 2, - "legendFormat": "" + "instant": false, + "legendFormat": "", + "refId": "Active listeners" } ], "title": "Active listeners", @@ -90,17 +118,17 @@ }, { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, "description": "The number of active connections for the queue manager.", "fieldConfig": { "defaults": { "color": { - "mode": "thresholds" + "fixedColor": "text", + "mode": "fixed" }, - "mappings": [ ], "thresholds": { - "mode": "absolute", "steps": [ { "color": "red", @@ -111,40 +139,38 @@ "value": 1 } ] - } - }, - "overrides": [ ] + }, + "unit": "none" + } }, "gridPos": { - "h": 7, + "h": 8, "w": 4, "x": 4, - "y": 0 + "y": 1 }, "id": 3, "options": { "colorMode": "value", "graphMode": "none", - "justifyMode": "auto", - "orientation": "auto", "reduceOptions": { "calcs": [ "lastNotNull" - ], - "fields": "", - "values": false - }, - "textMode": "auto" + ] + } }, + "pluginVersion": "v11.0.0", "targets": [ { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, - "expr": "ibmmq_qmgr_connection_count{job=~\"$job\", mq_cluster=~\"$mq_cluster\", qmgr=~\"$qmgr\"}", + "expr": "ibmmq_qmgr_connection_count{job=\"integrations/ibm-mq\",job=~\"$job\",cluster=~\"$cluster\",mq_cluster=~\"$mq_cluster\",instance=~\"$instance\",qmgr=~\"$qmgr\"}", "format": "time_series", - "intervalFactor": 2, - "legendFormat": "" + "instant": false, + "legendFormat": "", + "refId": "Active connections" } ], "title": "Active connections", @@ -152,17 +178,17 @@ }, { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, "description": "The unique number of queues being managed by the queue manager.", "fieldConfig": { "defaults": { "color": { - "mode": "thresholds" + "fixedColor": "text", + "mode": "fixed" }, - "mappings": [ ], "thresholds": { - "mode": "absolute", "steps": [ { "color": "red", @@ -173,40 +199,38 @@ "value": 1 } ] - } - }, - "overrides": [ ] + }, + "unit": "none" + } }, "gridPos": { - "h": 7, + "h": 8, "w": 4, "x": 8, - "y": 0 + "y": 1 }, "id": 4, "options": { "colorMode": "value", "graphMode": "none", - "justifyMode": "auto", - "orientation": "auto", "reduceOptions": { "calcs": [ "lastNotNull" - ], - "fields": "", - "values": false - }, - "textMode": "auto" + ] + } }, + "pluginVersion": "v11.0.0", "targets": [ { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, - "expr": "count(count(ibmmq_queue_depth{job=~\"$job\"}) by (queue, mq_cluster, qmgr))", + "expr": "count(count(ibmmq_queue_depth{job=\"integrations/ibm-mq\",job=~\"$job\",cluster=~\"$cluster\",mq_cluster=~\"$mq_cluster\",instance=~\"$instance\",qmgr=~\"$qmgr\"}) by (queue, mq_cluster, qmgr))", "format": "time_series", - "intervalFactor": 2, - "legendFormat": "" + "instant": false, + "legendFormat": "", + "refId": "Queues" } ], "title": "Queues", @@ -214,90 +238,51 @@ }, { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, "description": "The estimated memory usage of the queue managers.", "fieldConfig": { "defaults": { - "color": { - "mode": "palette-classic" - }, "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [ ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] + "fillOpacity": 30, + "gradientMode": "opacity", + "lineInterpolation": "smooth", + "lineWidth": 2, + "showPoints": "never" }, "unit": "percentunit" - }, - "overrides": [ ] + } }, "gridPos": { - "h": 7, + "h": 8, "w": 12, "x": 12, - "y": 0 + "y": 1 }, "id": 5, "options": { "legend": { "calcs": [ ], - "displayMode": "list", - "placement": "bottom", - "showLegend": true + "displayMode": "list" }, "tooltip": { "mode": "multi", "sort": "desc" } }, + "pluginVersion": "v11.0.0", "targets": [ { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, - "expr": "(ibmmq_qmgr_ram_total_estimate_for_queue_manager_bytes{job=~\"$job\", mq_cluster=~\"$mq_cluster\", qmgr=~\"$qmgr\"}/ibmmq_qmgr_ram_total_bytes{job=~\"$job\", mq_cluster=~\"$mq_cluster\", qmgr=~\"$qmgr\"})", + "expr": "(ibmmq_qmgr_ram_total_estimate_for_queue_manager_bytes{job=\"integrations/ibm-mq\",job=~\"$job\",cluster=~\"$cluster\",mq_cluster=~\"$mq_cluster\",instance=~\"$instance\",qmgr=~\"$qmgr\"}/ibmmq_qmgr_ram_total_bytes{job=\"integrations/ibm-mq\",job=~\"$job\",cluster=~\"$cluster\",mq_cluster=~\"$mq_cluster\",instance=~\"$instance\",qmgr=~\"$qmgr\"})", "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{mq_cluster}} - {{qmgr}}" + "instant": false, + "legendFormat": "{{mq_cluster}} - {{qmgr}}", + "refId": "Estimated memory utilization" } ], "title": "Estimated memory utilization", @@ -305,73 +290,11 @@ }, { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, "description": "A table showing the status and uptime of the queue manager.", "fieldConfig": { - "defaults": { - "color": { - "mode": "fixed" - }, - "custom": { - "align": "left", - "cellOptions": { - "type": "color-text" - }, - "filterable": false, - "inspect": false - }, - "mappings": [ - { - "options": { - "-1": { - "color": "dark-red", - "index": 0, - "text": "N/A" - }, - "0": { - "color": "red", - "index": 1, - "text": "Stopped" - }, - "1": { - "color": "light-green", - "index": 2, - "text": "Starting" - }, - "2": { - "color": "green", - "index": 3, - "text": "Running" - }, - "3": { - "index": 4, - "text": "Quiescing" - }, - "4": { - "color": "light-red", - "index": 5, - "text": "Stopping" - }, - "5": { - "color": "yellow", - "index": 6, - "text": "Standby" - } - }, - "type": "value" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - } - }, "overrides": [ { "matcher": { @@ -379,10 +302,6 @@ "options": "Uptime" }, "properties": [ - { - "id": "custom.width", - "value": 149 - }, { "id": "unit", "value": "s" @@ -392,81 +311,52 @@ { "matcher": { "id": "byName", - "options": "__name__" + "options": "Status" }, "properties": [ { - "id": "custom.width", - "value": 318 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Queue manager" - }, - "properties": [ - { - "id": "custom.width", - "value": 168 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "MQ cluster" - }, - "properties": [ - { - "id": "custom.width", - "value": 129 + "id": "custom.cellOptions", + "value": { + "type": "color-text" + } } ] } ] }, "gridPos": { - "h": 7, + "h": 8, "w": 8, "x": 0, - "y": 7 + "y": 9 }, "id": 6, "options": { - "cellHeight": "sm", - "footer": { - "countRows": false, - "enablePagination": false, - "fields": "", - "reducer": [ - "sum" - ], - "show": false - }, - "frameIndex": 1, - "showHeader": true, - "sortBy": [ ] + "enablePagination": true }, + "pluginVersion": "v11.0.0", "targets": [ { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, - "expr": "ibmmq_qmgr_uptime{job=~\"$job\", mq_cluster=~\"$mq_cluster\", qmgr=~\"$qmgr\"}", - "format": "table", - "intervalFactor": 2, - "legendFormat": "Uptime" + "expr": "ibmmq_qmgr_uptime{job=\"integrations/ibm-mq\",job=~\"$job\",cluster=~\"$cluster\",mq_cluster=~\"$mq_cluster\",instance=~\"$instance\",qmgr=~\"$qmgr\"}", + "format": "time_series", + "instant": false, + "legendFormat": "Uptime", + "refId": "Queue manager uptime" }, { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, - "expr": "ibmmq_qmgr_status{job=~\"$job\", mq_cluster=~\"$mq_cluster\", qmgr=~\"$qmgr\"}", + "expr": "ibmmq_qmgr_status{job=\"integrations/ibm-mq\",job=~\"$job\",cluster=~\"$cluster\",mq_cluster=~\"$mq_cluster\",instance=~\"$instance\",qmgr=~\"$qmgr\"}", "format": "time_series", - "intervalFactor": 2, - "legendFormat": "Status" + "instant": false, + "legendFormat": "Status", + "refId": "Queue manager status" } ], "title": "Queue manager status", @@ -490,21 +380,7 @@ "job": true, "platform": true }, - "indexByName": { - "Time": 0, - "Value": 10, - "__name__": 1, - "description": 2, - "hostname": 3, - "ibmmq_qmgr_status{job=\"$job\", mq_cluster=~\"$mq_cluster\", qmgr=\"$qmgr\"}": 9, - "instance": 4, - "job": 5, - "mq_cluster": 6, - "platform": 7, - "qmgr": 8 - }, "renameByName": { - "Time": "", "Value": "Uptime", "ibmmq_qmgr_status{job=\"$job\", mq_cluster=~\"$mq_cluster\", qmgr=\"$qmgr\"}": "Status", "mq_cluster": "MQ cluster", @@ -527,99 +403,65 @@ }, { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, "description": "The system/user CPU usage of the queue manager.", "fieldConfig": { "defaults": { - "color": { - "mode": "palette-classic" - }, "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, + "fillOpacity": 30, + "gradientMode": "opacity", + "lineInterpolation": "smooth", + "lineWidth": 2, "showPoints": "never", - "spanNulls": false, "stacking": { - "group": "A", "mode": "normal" - }, - "thresholdsStyle": { - "mode": "off" } }, - "mappings": [ ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, "unit": "percent" - }, - "overrides": [ ] + } }, "gridPos": { - "h": 7, + "h": 8, "w": 8, "x": 8, - "y": 7 + "y": 9 }, "id": 7, "options": { "legend": { "calcs": [ ], - "displayMode": "list", - "placement": "bottom", - "showLegend": true + "displayMode": "list" }, "tooltip": { "mode": "multi", "sort": "desc" } }, + "pluginVersion": "v11.0.0", "targets": [ { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, - "expr": "ibmmq_qmgr_user_cpu_time_percentage{job=~\"$job\", mq_cluster=~\"$mq_cluster\", qmgr=~\"$qmgr\"}", + "expr": "ibmmq_qmgr_user_cpu_time_percentage{job=\"integrations/ibm-mq\",job=~\"$job\",cluster=~\"$cluster\",mq_cluster=~\"$mq_cluster\",instance=~\"$instance\",qmgr=~\"$qmgr\"}", "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{mq_cluster}} - {{qmgr}} - user" + "instant": false, + "legendFormat": "{{mq_cluster}} - {{qmgr}} - user", + "refId": "CPU usage - user" }, { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, - "expr": "ibmmq_qmgr_system_cpu_time_percentage{job=~\"$job\", mq_cluster=~\"$mq_cluster\", qmgr=~\"$qmgr\"}", + "expr": "ibmmq_qmgr_system_cpu_time_percentage{job=\"integrations/ibm-mq\",job=~\"$job\",cluster=~\"$cluster\",mq_cluster=~\"$mq_cluster\",instance=~\"$instance\",qmgr=~\"$qmgr\"}", "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{mq_cluster}} - {{qmgr}} - system" + "instant": false, + "legendFormat": "{{mq_cluster}} - {{qmgr}} - system", + "refId": "CPU usage - system" } ], "title": "CPU usage", @@ -627,90 +469,54 @@ }, { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, "description": "The disk allocated to the queue manager that is being used.", "fieldConfig": { "defaults": { - "color": { - "mode": "palette-classic" - }, "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, + "fillOpacity": 30, + "gradientMode": "opacity", + "lineInterpolation": "smooth", + "lineWidth": 2, "showPoints": "never", - "spanNulls": false, "stacking": { - "group": "A", "mode": "normal" - }, - "thresholdsStyle": { - "mode": "off" } }, - "mappings": [ ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, "unit": "decbytes" - }, - "overrides": [ ] + } }, "gridPos": { - "h": 7, + "h": 8, "w": 8, "x": 16, - "y": 7 + "y": 9 }, "id": 8, "options": { "legend": { "calcs": [ ], - "displayMode": "list", - "placement": "bottom", - "showLegend": true + "displayMode": "list" }, "tooltip": { "mode": "multi", "sort": "desc" } }, + "pluginVersion": "v11.0.0", "targets": [ { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, - "expr": "ibmmq_qmgr_queue_manager_file_system_in_use_bytes{job=~\"$job\", mq_cluster=~\"$mq_cluster\", qmgr=~\"$qmgr\"}", + "expr": "ibmmq_qmgr_queue_manager_file_system_in_use_bytes{job=\"integrations/ibm-mq\",job=~\"$job\",cluster=~\"$cluster\",mq_cluster=~\"$mq_cluster\",instance=~\"$instance\",qmgr=~\"$qmgr\"}", "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{mq_cluster}} - {{qmgr}}" + "instant": false, + "legendFormat": "{{mq_cluster}} - {{qmgr}}", + "refId": "Disk usage" } ], "title": "Disk usage", @@ -718,89 +524,53 @@ }, { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, "description": "The commits of the queue manager.", "fieldConfig": { "defaults": { - "color": { - "mode": "palette-classic" - }, "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, + "fillOpacity": 30, + "gradientMode": "opacity", + "lineInterpolation": "smooth", + "lineWidth": 2, "showPoints": "never", - "spanNulls": false, "stacking": { - "group": "A", "mode": "normal" - }, - "thresholdsStyle": { - "mode": "off" } - }, - "mappings": [ ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] } - }, - "overrides": [ ] + } }, "gridPos": { - "h": 7, + "h": 8, "w": 8, "x": 0, - "y": 14 + "y": 17 }, "id": 9, "options": { "legend": { "calcs": [ ], - "displayMode": "list", - "placement": "bottom", - "showLegend": true + "displayMode": "list" }, "tooltip": { "mode": "multi", "sort": "desc" } }, + "pluginVersion": "v11.0.0", "targets": [ { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, - "expr": "ibmmq_qmgr_commit_count{job=~\"$job\", mq_cluster=~\"$mq_cluster\", qmgr=~\"$qmgr\"}", + "expr": "ibmmq_qmgr_commit_count{job=\"integrations/ibm-mq\",job=~\"$job\",cluster=~\"$cluster\",mq_cluster=~\"$mq_cluster\",instance=~\"$instance\",qmgr=~\"$qmgr\"}", "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{mq_cluster}} - {{qmgr}}" + "instant": false, + "legendFormat": "{{mq_cluster}} - {{qmgr}}", + "refId": "Commits" } ], "title": "Commits", @@ -808,90 +578,51 @@ }, { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, "description": "The amount of data being pushed from the queue manager to subscribers.", "fieldConfig": { "defaults": { - "color": { - "mode": "palette-classic" - }, "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [ ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] + "fillOpacity": 30, + "gradientMode": "opacity", + "lineInterpolation": "smooth", + "lineWidth": 2, + "showPoints": "never" }, "unit": "decbytes" - }, - "overrides": [ ] + } }, "gridPos": { - "h": 7, + "h": 8, "w": 8, "x": 8, - "y": 14 + "y": 17 }, "id": 10, "options": { "legend": { "calcs": [ ], - "displayMode": "list", - "placement": "bottom", - "showLegend": true + "displayMode": "list" }, "tooltip": { "mode": "multi", "sort": "desc" } }, + "pluginVersion": "v11.0.0", "targets": [ { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, - "expr": "ibmmq_qmgr_published_to_subscribers_bytes{job=~\"$job\", mq_cluster=~\"$mq_cluster\", qmgr=~\"$qmgr\"}", + "expr": "ibmmq_qmgr_published_to_subscribers_bytes{job=\"integrations/ibm-mq\",job=~\"$job\",cluster=~\"$cluster\",mq_cluster=~\"$mq_cluster\",instance=~\"$instance\",qmgr=~\"$qmgr\"}", "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{mq_cluster}} - {{qmgr}}" + "instant": false, + "legendFormat": "{{mq_cluster}} - {{qmgr}}", + "refId": "Publish throughput" } ], "title": "Publish throughput", @@ -899,85 +630,53 @@ }, { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, "description": "The number of messages being published by the queue manager.", "fieldConfig": { "defaults": { - "color": { - "mode": "palette-classic" - }, "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, + "fillOpacity": 30, + "gradientMode": "opacity", + "lineInterpolation": "smooth", + "lineWidth": 2, "showPoints": "never", - "spanNulls": false, "stacking": { - "group": "A", "mode": "normal" - }, - "thresholdsStyle": { - "mode": "off" } - }, - "mappings": [ ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] } - }, - "overrides": [ ] + } }, "gridPos": { - "h": 7, + "h": 8, "w": 8, "x": 16, - "y": 14 + "y": 17 }, "id": 11, "options": { "legend": { "calcs": [ ], - "displayMode": "list", - "placement": "bottom", - "showLegend": true + "displayMode": "list" }, "tooltip": { "mode": "multi", "sort": "desc" } }, + "pluginVersion": "v11.0.0", "targets": [ { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, - "expr": "ibmmq_qmgr_published_to_subscribers_message_count{job=~\"$job\", mq_cluster=~\"$mq_cluster\", qmgr=~\"$qmgr\"}", + "expr": "ibmmq_qmgr_published_to_subscribers_message_count{job=\"integrations/ibm-mq\",job=~\"$job\",cluster=~\"$cluster\",mq_cluster=~\"$mq_cluster\",instance=~\"$instance\",qmgr=~\"$qmgr\"}", "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{mq_cluster}} - {{qmgr}}" + "instant": false, + "legendFormat": "{{mq_cluster}} - {{qmgr}}", + "refId": "Published messages" } ], "title": "Published messages", @@ -985,89 +684,53 @@ }, { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, "description": "The expired messages of the queue manager.", "fieldConfig": { "defaults": { - "color": { - "mode": "palette-classic" - }, "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, + "fillOpacity": 30, + "gradientMode": "opacity", + "lineInterpolation": "smooth", + "lineWidth": 2, "showPoints": "never", - "spanNulls": false, "stacking": { - "group": "A", "mode": "normal" - }, - "thresholdsStyle": { - "mode": "off" } - }, - "mappings": [ ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] } - }, - "overrides": [ ] + } }, "gridPos": { - "h": 7, + "h": 8, "w": 8, "x": 0, - "y": 21 + "y": 25 }, "id": 12, "options": { "legend": { "calcs": [ ], - "displayMode": "list", - "placement": "bottom", - "showLegend": true + "displayMode": "list" }, "tooltip": { "mode": "multi", "sort": "desc" } }, + "pluginVersion": "v11.0.0", "targets": [ { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, - "expr": "ibmmq_qmgr_expired_message_count{job=~\"$job\", mq_cluster=~\"$mq_cluster\", qmgr=~\"$qmgr\"}", + "expr": "ibmmq_qmgr_expired_message_count{job=\"integrations/ibm-mq\",job=~\"$job\",cluster=~\"$cluster\",mq_cluster=~\"$mq_cluster\",instance=~\"$instance\",qmgr=~\"$qmgr\"}", "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{mq_cluster}} - {{qmgr}}" + "instant": false, + "legendFormat": "{{mq_cluster}} - {{qmgr}}", + "refId": "Expired messages" } ], "title": "Expired messages", @@ -1075,135 +738,110 @@ }, { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, - "description": "The number of queue operations of the queue manager. ", + "description": "The number of queue operations of the queue manager.", "fieldConfig": { "defaults": { - "color": { - "mode": "palette-classic" - }, "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, + "fillOpacity": 30, + "gradientMode": "opacity", + "lineInterpolation": "smooth", + "lineWidth": 2, "showPoints": "never", - "spanNulls": false, "stacking": { - "group": "A", "mode": "normal" - }, - "thresholdsStyle": { - "mode": "off" } }, - "mappings": [ ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, "unit": "operations" - }, - "overrides": [ ] + } }, "gridPos": { - "h": 7, + "h": 8, "w": 16, "x": 8, - "y": 21 + "y": 25 }, "id": 13, "options": { "legend": { "calcs": [ ], "displayMode": "table", - "placement": "right", - "showLegend": true + "placement": "right" }, "tooltip": { "mode": "multi", "sort": "desc" } }, + "pluginVersion": "v11.0.0", "targets": [ { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, - "expr": "sum by (mq_cluster, qmgr, job) (ibmmq_queue_mqset_count{job=~\"$job\", mq_cluster=~\"$mq_cluster\", qmgr=~\"$qmgr\"})", + "expr": "sum by (mq_cluster, qmgr, job) (ibmmq_queue_mqset_count{job=\"integrations/ibm-mq\",job=~\"$job\",cluster=~\"$cluster\",mq_cluster=~\"$mq_cluster\",instance=~\"$instance\",qmgr=~\"$qmgr\"})", "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{mq_cluster}} - {{qmgr}} - MQSET" + "instant": false, + "legendFormat": "{{mq_cluster}} - {{qmgr}} - MQSET", + "refId": "Queue operations - MQSET" }, { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, - "expr": "sum by (mq_cluster, qmgr, job) (ibmmq_queue_mqinq_count{job=~\"$job\", mq_cluster=~\"$mq_cluster\", qmgr=~\"$qmgr\"})", + "expr": "sum by (mq_cluster, qmgr, job) (ibmmq_queue_mqinq_count{job=\"integrations/ibm-mq\",job=~\"$job\",cluster=~\"$cluster\",mq_cluster=~\"$mq_cluster\",instance=~\"$instance\",qmgr=~\"$qmgr\"})", "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{mq_cluster}} - {{qmgr}} - MQINQ" + "instant": false, + "legendFormat": "{{mq_cluster}} - {{qmgr}} - MQINQ", + "refId": "Queue operations - MQINQ" }, { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, - "expr": "sum by (mq_cluster, qmgr, job) (ibmmq_queue_mqget_count{job=~\"$job\", mq_cluster=~\"$mq_cluster\", qmgr=~\"$qmgr\"})", + "expr": "sum by (mq_cluster, qmgr, job) (ibmmq_queue_mqget_count{job=\"integrations/ibm-mq\",job=~\"$job\",cluster=~\"$cluster\",mq_cluster=~\"$mq_cluster\",instance=~\"$instance\",qmgr=~\"$qmgr\"})", "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{mq_cluster}} - {{qmgr}} - MQGET" + "instant": false, + "legendFormat": "{{mq_cluster}} - {{qmgr}} - MQGET", + "refId": "Queue operations - MQGET" }, { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, - "expr": "sum by (mq_cluster, qmgr, job) (ibmmq_queue_mqopen_count{job=~\"$job\", mq_cluster=~\"$mq_cluster\", qmgr=~\"$qmgr\"})", + "expr": "sum by (mq_cluster, qmgr, job) (ibmmq_queue_mqopen_count{job=\"integrations/ibm-mq\",job=~\"$job\",cluster=~\"$cluster\",mq_cluster=~\"$mq_cluster\",instance=~\"$instance\",qmgr=~\"$qmgr\"})", "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{mq_cluster}} - {{qmgr}} - MQOPEN" + "instant": false, + "legendFormat": "{{mq_cluster}} - {{qmgr}} - MQOPEN", + "refId": "Queue operations - MQOPEN" }, { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, - "expr": "sum by (mq_cluster, qmgr, job) (ibmmq_queue_mqclose_count{job=~\"$job\", mq_cluster=~\"$mq_cluster\", qmgr=~\"$qmgr\"})", + "expr": "sum by (mq_cluster, qmgr, job) (ibmmq_queue_mqclose_count{job=\"integrations/ibm-mq\",job=~\"$job\",cluster=~\"$cluster\",mq_cluster=~\"$mq_cluster\",instance=~\"$instance\",qmgr=~\"$qmgr\"})", "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{mq_cluster}} - {{qmgr}} - MQCLOSE" + "instant": false, + "legendFormat": "{{mq_cluster}} - {{qmgr}} - MQCLOSE", + "refId": "Queue operations - MQCLOSE" }, { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, - "expr": "sum by (mq_cluster, qmgr, job) (ibmmq_queue_mqput_mqput1_count{job=~\"$job\", mq_cluster=~\"$mq_cluster\", qmgr=~\"$qmgr\"})", + "expr": "sum by (mq_cluster, qmgr, job) (ibmmq_queue_mqput_mqput1_count{job=\"integrations/ibm-mq\",job=~\"$job\",cluster=~\"$cluster\",mq_cluster=~\"$mq_cluster\",instance=~\"$instance\",qmgr=~\"$qmgr\"})", "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{mq_cluster}} - {{qmgr}} - MQPUT/MQPUT1" + "instant": false, + "legendFormat": "{{mq_cluster}} - {{qmgr}} - MQPUT/MQPUT1", + "refId": "Queue operations - MQPUT/MQPUT1" } ], "title": "Queue operations", @@ -1211,116 +849,67 @@ }, { "collapsed": false, - "datasource": { - "uid": "${prometheus_datasource}" - }, "gridPos": { "h": 1, - "w": 24, + "w": 0, "x": 0, - "y": 28 + "y": 33 }, "id": 14, - "targets": [ - { - "datasource": { - "uid": "${prometheus_datasource}" - }, - "expr": "", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "" - } - ], + "panels": [ ], "title": "Logs", "type": "row" }, { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, "description": "The recent latency of log writes.", "fieldConfig": { "defaults": { - "color": { - "mode": "palette-classic" - }, "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, + "fillOpacity": 30, + "gradientMode": "opacity", + "lineInterpolation": "smooth", + "lineWidth": 2, "showPoints": "never", - "spanNulls": false, "stacking": { - "group": "A", "mode": "normal" - }, - "thresholdsStyle": { - "mode": "off" } }, - "mappings": [ ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, "unit": "s" - }, - "overrides": [ ] + } }, "gridPos": { - "h": 7, + "h": 8, "w": 12, "x": 0, - "y": 29 + "y": 34 }, "id": 15, "options": { "legend": { "calcs": [ ], - "displayMode": "list", - "placement": "bottom", - "showLegend": true + "displayMode": "list" }, "tooltip": { "mode": "multi", "sort": "desc" } }, + "pluginVersion": "v11.0.0", "targets": [ { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, - "expr": "ibmmq_qmgr_log_write_latency_seconds{job=~\"$job\", mq_cluster=~\"$mq_cluster\", qmgr=~\"$qmgr\"}", + "expr": "ibmmq_qmgr_log_write_latency_seconds{job=\"integrations/ibm-mq\",job=~\"$job\",cluster=~\"$cluster\",mq_cluster=~\"$mq_cluster\",instance=~\"$instance\",qmgr=~\"$qmgr\"}", "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{mq_cluster}} - {{qmgr}}" + "instant": false, + "legendFormat": "{{mq_cluster}} - {{qmgr}}", + "refId": "Log latency" } ], "title": "Log latency", @@ -1328,250 +917,156 @@ }, { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, "description": "The amount of data on the filesystem occupied by queue manager logs.", "fieldConfig": { "defaults": { - "color": { - "mode": "palette-classic" - }, "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, + "fillOpacity": 30, + "gradientMode": "opacity", + "lineInterpolation": "smooth", + "lineWidth": 2, "showPoints": "never", - "spanNulls": false, "stacking": { - "group": "A", "mode": "normal" - }, - "thresholdsStyle": { - "mode": "off" } }, - "mappings": [ ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, "unit": "decbytes" - }, - "overrides": [ ] + } }, "gridPos": { - "h": 7, + "h": 8, "w": 12, "x": 12, - "y": 29 + "y": 34 }, "id": 16, "options": { "legend": { "calcs": [ ], - "displayMode": "list", - "placement": "bottom", - "showLegend": true + "displayMode": "list" }, "tooltip": { "mode": "multi", "sort": "desc" } }, + "pluginVersion": "v11.0.0", "targets": [ { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, - "expr": "ibmmq_qmgr_log_in_use_bytes{job=~\"$job\", mq_cluster=~\"$mq_cluster\", qmgr=~\"$qmgr\"}", + "expr": "ibmmq_qmgr_log_in_use_bytes{job=\"integrations/ibm-mq\",job=~\"$job\",cluster=~\"$cluster\",mq_cluster=~\"$mq_cluster\",instance=~\"$instance\",qmgr=~\"$qmgr\"}", "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{mq_cluster}} - {{qmgr}}" + "instant": false, + "legendFormat": "{{mq_cluster}} - {{qmgr}}", + "refId": "Log usage" } ], "title": "Log usage", "type": "timeseries" - }, - { - "datasource": { - "uid": "${loki_datasource}" - }, - "description": "Recent error logs from the queue manager.", - "gridPos": { - "h": 8, - "w": 24, - "x": 0, - "y": 36 - }, - "id": 17, - "options": { - "dedupStrategy": "none", - "enableLogDetails": true, - "prettifyLogMessage": false, - "showCommonLabels": false, - "showLabels": false, - "showTime": false, - "sortOrder": "Descending", - "wrapLogMessage": false - }, - "targets": [ - { - "datasource": { - "uid": "${loki_datasource}" - }, - "editorMode": "code", - "expr": "{job=~\"$job\", qmgr=~\"$qmgr\"} |= `` | (filename=~\"/var/mqm/qmgrs/.*/errors/.*LOG\" or log_type=\"mq-qmgr-error\")", - "queryType": "range", - "refId": "A" - } - ], - "title": "Error logs", - "type": "logs" } ], "refresh": "1m", - "rows": [ ], - "schemaVersion": 14, - "style": "dark", + "schemaVersion": 39, "tags": [ "ibm-mq-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(ibmmq_topic_messages_received,job)", + "query": "label_values(ibmmq_qmgr_commit_count{job=\"integrations/ibm-mq\"}, 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": "MQ cluster", + "label": "Cluster", "multi": true, + "name": "cluster", + "query": "label_values(ibmmq_qmgr_commit_count{job=\"integrations/ibm-mq\",job=~\"$job\"}, cluster)", + "refresh": 2, + "sort": 1, + "type": "query" + }, + { + "allValue": ".*", + "datasource": { + "type": "prometheus", + "uid": "${prometheus_datasource}" + }, + "includeAll": true, + "label": "MQ cluster", + "multi": false, "name": "mq_cluster", - "options": [ ], - "query": "label_values(ibmmq_topic_messages_received,mq_cluster)", - "refresh": 1, - "regex": "", - "sort": 0, - "tagValuesQuery": "", - "tags": [ ], - "tagsQuery": "", - "type": "query", - "useTags": false + "query": "label_values(ibmmq_qmgr_commit_count{job=\"integrations/ibm-mq\",job=~\"$job\",cluster=~\"$cluster\"}, mq_cluster)", + "refresh": 2, + "sort": 1, + "type": "query" }, { - "allValue": "", - "current": { }, + "allValue": ".+", "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, - "hide": 0, "includeAll": true, - "label": "Queue manager", + "label": "Instance", "multi": true, - "name": "qmgr", - "options": [ ], - "query": "label_values(ibmmq_topic_messages_received{mq_cluster=~\"$mq_cluster\"},qmgr)", - "refresh": 1, - "regex": "", - "sort": 0, - "tagValuesQuery": "", - "tags": [ ], - "tagsQuery": "", - "type": "query", - "useTags": false + "name": "instance", + "query": "label_values(ibmmq_qmgr_commit_count{job=\"integrations/ibm-mq\",job=~\"$job\",cluster=~\"$cluster\",mq_cluster=~\"$mq_cluster\"}, instance)", + "refresh": 2, + "sort": 1, + "type": "query" }, { - "allValue": "", - "current": { }, + "allValue": ".+", "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, - "hide": 2, "includeAll": true, - "label": "Cluster", + "label": "Queue manager", "multi": true, - "name": "cluster", - "options": [ ], - "query": "label_values(ibmmq_qmgr_commit_count{job=~\"$job\"}, cluster)", + "name": "qmgr", + "query": "label_values(ibmmq_qmgr_commit_count{job=\"integrations/ibm-mq\",job=~\"$job\",cluster=~\"$cluster\",mq_cluster=~\"$mq_cluster\",instance=~\"$instance\"}, qmgr)", "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" } ] }, @@ -1579,33 +1074,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": "IBM MQ queue manager overview", - "uid": "ibm-mq-queue-manager-overview", - "version": 0 + "uid": "ibmmq-queue-manager-overview" } \ No newline at end of file diff --git a/ibm-mq-mixin/dashboards_out/ibm-mq-queue-overview.json b/ibm-mq-mixin/dashboards_out/ibm-mq-queue-overview.json index cf12920fe..1b01ee5a3 100644 --- a/ibm-mq-mixin/dashboards_out/ibm-mq-queue-overview.json +++ b/ibm-mq-mixin/dashboards_out/ibm-mq-queue-overview.json @@ -1,113 +1,108 @@ { - "__inputs": [ ], - "__requires": [ ], "annotations": { "list": [ ] }, - "description": "", - "editable": false, - "gnetId": null, - "graphTooltip": 0, - "hideControls": false, - "id": null, "links": [ { - "asDropdown": false, - "icon": "external link", + "includeVars": true, + "keepTime": true, + "title": "IBM MQ cluster overview", + "type": "link", + "url": "/d/ibmmq-cluster-overview" + }, + { + "includeVars": true, + "keepTime": true, + "title": "IBM MQ logs", + "type": "link", + "url": "/d/ibmmq-logs" + }, + { + "includeVars": true, + "keepTime": true, + "title": "IBM MQ queue manager overview", + "type": "link", + "url": "/d/ibmmq-queue-manager-overview" + }, + { + "includeVars": true, + "keepTime": true, + "title": "IBM MQ topics overview", + "type": "link", + "url": "/d/ibmmq-topics-overview" + }, + { + "asDropdown": true, "includeVars": true, "keepTime": true, "tags": [ "ibm-mq-mixin" ], - "targetBlank": false, - "title": "Other IBM MQ 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": "Queue overview", + "type": "row" + }, { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, "description": "The average amount of time a message spends in the queue.", "fieldConfig": { "defaults": { - "color": { - "mode": "palette-classic" - }, "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [ ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] + "fillOpacity": 30, + "gradientMode": "opacity", + "lineInterpolation": "smooth", + "lineWidth": 2, + "showPoints": "never" }, "unit": "s" - }, - "overrides": [ ] + } }, "gridPos": { "h": 8, "w": 12, "x": 0, - "y": 0 + "y": 1 }, "id": 2, "options": { "legend": { "calcs": [ ], - "displayMode": "list", - "placement": "bottom", - "showLegend": true + "displayMode": "list" }, "tooltip": { "mode": "multi", "sort": "desc" } }, + "pluginVersion": "v11.0.0", "targets": [ { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, - "expr": "ibmmq_queue_average_queue_time_seconds{job=~\"$job\", mq_cluster=~\"$mq_cluster\", qmgr=~\"$qmgr\", queue=~\"$queue\"}", + "expr": "ibmmq_queue_average_queue_time_seconds{job=\"integrations/ibm-mq\",job=~\"$job\",cluster=~\"$cluster\",mq_cluster=~\"$mq_cluster\",instance=~\"$instance\",qmgr=~\"$qmgr\", queue=~\"$queue\"}", "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{mq_cluster}} - {{qmgr}} - {{queue}}" + "instant": false, + "legendFormat": "{{mq_cluster}} - {{qmgr}} - {{queue}}", + "refId": "Average queue time" } ], "title": "Average queue time", @@ -115,89 +110,51 @@ }, { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, - "description": "The amount of expired messages in the queue.", + "description": "The expired messages of the queue.", "fieldConfig": { "defaults": { - "color": { - "mode": "palette-classic" - }, "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "normal" - }, - "thresholdsStyle": { - "mode": "off" - } + "fillOpacity": 30, + "gradientMode": "opacity", + "lineInterpolation": "smooth", + "lineWidth": 2, + "showPoints": "never" }, - "mappings": [ ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [ ] + "unit": "none" + } }, "gridPos": { "h": 8, "w": 12, "x": 12, - "y": 0 + "y": 1 }, "id": 3, "options": { "legend": { "calcs": [ ], - "displayMode": "list", - "placement": "right", - "showLegend": true + "displayMode": "list" }, "tooltip": { "mode": "multi", "sort": "desc" } }, + "pluginVersion": "v11.0.0", "targets": [ { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, - "expr": "ibmmq_queue_expired_messages{job=~\"$job\", mq_cluster=~\"$mq_cluster\", qmgr=~\"$qmgr\", queue=~\"$queue\"}", + "expr": "ibmmq_queue_expired_messages{job=\"integrations/ibm-mq\",job=~\"$job\",cluster=~\"$cluster\",mq_cluster=~\"$mq_cluster\",instance=~\"$instance\",qmgr=~\"$qmgr\", queue=~\"$queue\"}", "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{mq_cluster}} - {{qmgr}} - {{queue}}" + "instant": false, + "legendFormat": "{{mq_cluster}} - {{qmgr}} - {{queue}}", + "refId": "Expired messages" } ], "title": "Expired messages", @@ -205,189 +162,118 @@ }, { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, - "description": "The number of active messages in the queue.", + "description": "The depth of the queue.", "fieldConfig": { "defaults": { - "color": { - "mode": "palette-classic" - }, "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } + "fillOpacity": 30, + "gradientMode": "opacity", + "lineInterpolation": "smooth", + "lineWidth": 2, + "showPoints": "never" }, - "mappings": [ ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [ ] + "unit": "none" + } }, "gridPos": { "h": 8, "w": 24, "x": 0, - "y": 8 + "y": 9 }, "id": 4, "options": { "legend": { "calcs": [ ], - "displayMode": "list", - "placement": "bottom", - "showLegend": true + "displayMode": "list" }, "tooltip": { "mode": "multi", "sort": "desc" } }, + "pluginVersion": "v11.0.0", "targets": [ { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, - "expr": "ibmmq_queue_depth{job=~\"$job\", mq_cluster=~\"$mq_cluster\", qmgr=~\"$qmgr\", queue=~\"$queue\"}", + "expr": "ibmmq_queue_depth{job=\"integrations/ibm-mq\",job=~\"$job\",cluster=~\"$cluster\",mq_cluster=~\"$mq_cluster\",instance=~\"$instance\",qmgr=~\"$qmgr\", queue=~\"$queue\"}", "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{mq_cluster}} - {{qmgr}} - {{queue}}" + "instant": false, + "legendFormat": "{{mq_cluster}} - {{qmgr}} - {{queue}}", + "refId": "Queue depth" } ], - "title": "Depth", + "title": "Queue depth", "type": "timeseries" }, { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, "description": "The amount of throughput going through the queue via MQGETs and MQPUTs.", "fieldConfig": { "defaults": { - "color": { - "mode": "palette-classic" - }, "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, + "fillOpacity": 30, + "gradientMode": "opacity", + "lineInterpolation": "smooth", + "lineWidth": 2, "showPoints": "never", - "spanNulls": false, "stacking": { - "group": "A", "mode": "normal" - }, - "thresholdsStyle": { - "mode": "off" } }, - "mappings": [ ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, "unit": "decbytes" - }, - "overrides": [ ] + } }, "gridPos": { "h": 8, "w": 9, "x": 0, - "y": 16 + "y": 17 }, "id": 5, "options": { "legend": { "calcs": [ ], "displayMode": "list", - "placement": "right", - "showLegend": true + "placement": "right" }, "tooltip": { "mode": "multi", "sort": "desc" } }, + "pluginVersion": "v11.0.0", "targets": [ { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, - "expr": "ibmmq_queue_mqget_bytes{job=~\"$job\", mq_cluster=~\"$mq_cluster\", qmgr=~\"$qmgr\", queue=~\"$queue\"}", + "expr": "ibmmq_queue_mqget_bytes{job=\"integrations/ibm-mq\",job=~\"$job\",cluster=~\"$cluster\",mq_cluster=~\"$mq_cluster\",instance=~\"$instance\",qmgr=~\"$qmgr\", queue=~\"$queue\"}", "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{qmgr}} - {{queue}} - MQGET" + "instant": false, + "legendFormat": "{{qmgr}} - {{queue}} - MQGET", + "refId": "MQGET bytes" }, { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, - "expr": "ibmmq_queue_mqput_bytes{job=~\"$job\", mq_cluster=~\"$mq_cluster\", qmgr=~\"$qmgr\", queue=~\"$queue\"}", + "expr": "ibmmq_queue_mqput_bytes{job=\"integrations/ibm-mq\",job=~\"$job\",cluster=~\"$cluster\",mq_cluster=~\"$mq_cluster\",instance=~\"$instance\",qmgr=~\"$qmgr\", queue=~\"$queue\"}", "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{qmgr}} - {{queue}} - MQPUT" + "instant": false, + "legendFormat": "{{qmgr}} - {{queue}} - MQPUT", + "refId": "MQPUT bytes" } ], "title": "Operation throughput", @@ -395,67 +281,30 @@ }, { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, "description": "The number of queue operations of the queue manager.", "fieldConfig": { "defaults": { - "color": { - "mode": "palette-classic" - }, "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, + "fillOpacity": 30, + "gradientMode": "opacity", + "lineInterpolation": "smooth", + "lineWidth": 2, "showPoints": "never", - "spanNulls": false, "stacking": { - "group": "A", "mode": "normal" - }, - "thresholdsStyle": { - "mode": "off" } }, - "mappings": [ ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, "unit": "operations" - }, - "overrides": [ ] + } }, "gridPos": { "h": 8, "w": 15, "x": 9, - "y": 16 + "y": 17 }, "id": 6, "options": { @@ -466,68 +315,80 @@ "mean" ], "displayMode": "table", - "placement": "right", - "showLegend": true + "placement": "right" }, "tooltip": { "mode": "multi", "sort": "desc" } }, + "pluginVersion": "v11.0.0", "targets": [ { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, - "expr": "ibmmq_queue_mqset_count{job=~\"$job\", mq_cluster=~\"$mq_cluster\", qmgr=~\"$qmgr\", queue=~\"$queue\"}", + "expr": "ibmmq_queue_mqset_count{job=\"integrations/ibm-mq\",job=~\"$job\",cluster=~\"$cluster\",mq_cluster=~\"$mq_cluster\",instance=~\"$instance\",qmgr=~\"$qmgr\", queue=~\"$queue\"}", "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{qmgr}} - {{queue}} - MQSET" + "instant": false, + "legendFormat": "{{qmgr}} - {{queue}} - MQSET", + "refId": "MQSET operations" }, { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, - "expr": "ibmmq_queue_mqinq_count{job=~\"$job\", mq_cluster=~\"$mq_cluster\", qmgr=~\"$qmgr\", queue=~\"$queue\"}", + "expr": "ibmmq_queue_mqinq_count{job=\"integrations/ibm-mq\",job=~\"$job\",cluster=~\"$cluster\",mq_cluster=~\"$mq_cluster\",instance=~\"$instance\",qmgr=~\"$qmgr\", queue=~\"$queue\"}", "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{qmgr}} - {{queue}} - MQINQ" + "instant": false, + "legendFormat": "{{qmgr}} - {{queue}} - MQINQ", + "refId": "MQINQ operations" }, { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, - "expr": "ibmmq_queue_mqget_count{job=~\"$job\", mq_cluster=~\"$mq_cluster\", qmgr=~\"$qmgr\", queue=~\"$queue\"}", + "expr": "ibmmq_queue_mqget_count{job=\"integrations/ibm-mq\",job=~\"$job\",cluster=~\"$cluster\",mq_cluster=~\"$mq_cluster\",instance=~\"$instance\",qmgr=~\"$qmgr\", queue=~\"$queue\"}", "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{qmgr}} - {{queue}} - MQGET" + "instant": false, + "legendFormat": "{{qmgr}} - {{queue}} - MQGET", + "refId": "MQGET operations" }, { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, - "expr": "ibmmq_queue_mqopen_count{job=~\"$job\", mq_cluster=~\"$mq_cluster\", qmgr=~\"$qmgr\", queue=~\"$queue\"}", + "expr": "ibmmq_queue_mqopen_count{job=\"integrations/ibm-mq\",job=~\"$job\",cluster=~\"$cluster\",mq_cluster=~\"$mq_cluster\",instance=~\"$instance\",qmgr=~\"$qmgr\", queue=~\"$queue\"}", "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{qmgr}} - {{queue}} - MQOPEN" + "instant": false, + "legendFormat": "{{qmgr}} - {{queue}} - MQOPEN", + "refId": "MQOPEN operations" }, { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, - "expr": "ibmmq_queue_mqclose_count{job=~\"$job\", mq_cluster=~\"$mq_cluster\", qmgr=~\"$qmgr\", queue=~\"$queue\"}", + "expr": "ibmmq_queue_mqclose_count{job=\"integrations/ibm-mq\",job=~\"$job\",cluster=~\"$cluster\",mq_cluster=~\"$mq_cluster\",instance=~\"$instance\",qmgr=~\"$qmgr\", queue=~\"$queue\"}", "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{qmgr}} - {{queue}} - MQCLOSE" + "instant": false, + "legendFormat": "{{qmgr}} - {{queue}} - MQCLOSE", + "refId": "MQCLOSE operations" }, { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, - "expr": "ibmmq_queue_mqput_mqput1_count{job=~\"$job\", mq_cluster=~\"$mq_cluster\", qmgr=~\"$qmgr\", queue=~\"$queue\"}", + "expr": "ibmmq_queue_mqput_mqput1_count{job=\"integrations/ibm-mq\",job=~\"$job\",cluster=~\"$cluster\",mq_cluster=~\"$mq_cluster\",instance=~\"$instance\",qmgr=~\"$qmgr\", queue=~\"$queue\"}", "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{qmgr}} - {{queue}} - MQPUT/MQPUT1" + "instant": false, + "legendFormat": "{{qmgr}} - {{queue}} - MQPUT/MQPUT1", + "refId": "MQPUT/MQPUT1 operations" } ], "title": "Operations", @@ -535,134 +396,115 @@ } ], "refresh": "1m", - "rows": [ ], - "schemaVersion": 14, - "style": "dark", + "schemaVersion": 39, "tags": [ "ibm-mq-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(ibmmq_queue_average_queue_time_seconds,job)", + "query": "label_values(ibmmq_qmgr_commit_count{job=\"integrations/ibm-mq\"}, 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": "MQ cluster", + "label": "Cluster", "multi": true, + "name": "cluster", + "query": "label_values(ibmmq_qmgr_commit_count{job=\"integrations/ibm-mq\",job=~\"$job\"}, cluster)", + "refresh": 2, + "sort": 1, + "type": "query" + }, + { + "allValue": ".*", + "datasource": { + "type": "prometheus", + "uid": "${prometheus_datasource}" + }, + "includeAll": true, + "label": "MQ cluster", + "multi": false, "name": "mq_cluster", - "options": [ ], - "query": "label_values(ibmmq_queue_average_queue_time_seconds{job=~\"$job\"},mq_cluster)", + "query": "label_values(ibmmq_qmgr_commit_count{job=\"integrations/ibm-mq\",job=~\"$job\",cluster=~\"$cluster\"}, mq_cluster)", "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": "Queue manager", + "label": "Instance", "multi": true, - "name": "qmgr", - "options": [ ], - "query": "label_values(ibmmq_queue_average_queue_time_seconds{mq_cluster=~\"$mq_cluster\"},qmgr)", + "name": "instance", + "query": "label_values(ibmmq_qmgr_commit_count{job=\"integrations/ibm-mq\",job=~\"$job\",cluster=~\"$cluster\",mq_cluster=~\"$mq_cluster\"}, instance)", "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": "Queue", + "label": "Queue manager", "multi": true, - "name": "queue", - "options": [ ], - "query": "label_values(ibmmq_queue_average_queue_time_seconds{qmgr=~\"$qmgr\"},queue)", + "name": "qmgr", + "query": "label_values(ibmmq_qmgr_commit_count{job=\"integrations/ibm-mq\",job=~\"$job\",cluster=~\"$cluster\",mq_cluster=~\"$mq_cluster\",instance=~\"$instance\"}, qmgr)", "refresh": 2, + "sort": 1, + "type": "query" + }, + { + "hide": 2, + "label": "Loki data source", + "name": "loki_datasource", + "query": "loki", "regex": "", - "sort": 0, - "tagValuesQuery": "", - "tags": [ ], - "tagsQuery": "", - "type": "query", - "useTags": false + "type": "datasource" }, { - "allValue": "", - "current": { }, + "allValue": ".+", "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, - "hide": 2, "includeAll": true, - "label": "Cluster", + "label": "Queue", "multi": true, - "name": "cluster", - "options": [ ], - "query": "label_values(ibmmq_qmgr_commit_count{job=~\"$job\"}, cluster)", + "name": "queue", + "query": "label_values(ibmmq_queue_average_queue_time_seconds, queue)", "refresh": 2, - "regex": "", - "sort": 0, - "tagValuesQuery": "", - "tags": [ ], - "tagsQuery": "", - "type": "query", - "useTags": false + "type": "query" } ] }, @@ -670,33 +512,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": "IBM MQ queue overview", - "uid": "ibm-mq-queue-overview", - "version": 0 + "uid": "ibmmq-queue-overview" } \ No newline at end of file diff --git a/ibm-mq-mixin/dashboards_out/ibm-mq-topics-overview.json b/ibm-mq-mixin/dashboards_out/ibm-mq-topics-overview.json index 9f4ae17a9..cfbca0bb4 100644 --- a/ibm-mq-mixin/dashboards_out/ibm-mq-topics-overview.json +++ b/ibm-mq-mixin/dashboards_out/ibm-mq-topics-overview.json @@ -1,110 +1,81 @@ { - "__inputs": [ ], - "__requires": [ ], "annotations": { "list": [ ] }, - "description": "", - "editable": false, - "gnetId": null, - "graphTooltip": 0, - "hideControls": false, - "id": null, "links": [ { - "asDropdown": false, - "icon": "external link", + "includeVars": true, + "keepTime": true, + "title": "IBM MQ cluster overview", + "type": "link", + "url": "/d/ibmmq-cluster-overview" + }, + { + "includeVars": true, + "keepTime": true, + "title": "IBM MQ logs", + "type": "link", + "url": "/d/ibmmq-logs" + }, + { + "includeVars": true, + "keepTime": true, + "title": "IBM MQ queue manager overview", + "type": "link", + "url": "/d/ibmmq-queue-manager-overview" + }, + { + "includeVars": true, + "keepTime": true, + "title": "IBM MQ queue overview", + "type": "link", + "url": "/d/ibmmq-queue-overview" + }, + { + "asDropdown": true, "includeVars": true, "keepTime": true, "tags": [ "ibm-mq-mixin" ], - "targetBlank": false, - "title": "Other IBM MQ dashboards", - "type": "dashboards", - "url": "" + "title": "All dashboards", + "type": "dashboards" } ], "panels": [ { - "datasource": { - "uid": "${prometheus_datasource}" - }, + "collapsed": false, "gridPos": { "h": 1, - "w": 24, + "w": 0, "x": 0, "y": 0 }, - "id": 2, - "targets": [ - { - "datasource": { - "uid": "${prometheus_datasource}" - }, - "expr": "", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "" - } - ], + "id": 1, + "panels": [ ], "title": "Topics", "type": "row" }, { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, "description": "Received messages per topic.", "fieldConfig": { "defaults": { - "color": { - "mode": "palette-classic" - }, "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, + "fillOpacity": 30, + "gradientMode": "opacity", + "lineInterpolation": "smooth", + "lineWidth": 2, "showPoints": "never", - "spanNulls": false, "stacking": { - "group": "A", "mode": "normal" - }, - "thresholdsStyle": { - "mode": "off" } }, - "decimals": 0, - "mappings": [ ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - }, "unit": "none" - }, - "overrides": [ ] + } }, "gridPos": { "h": 6, @@ -112,28 +83,30 @@ "x": 0, "y": 1 }, - "id": 3, + "id": 2, "options": { "legend": { "calcs": [ ], "displayMode": "list", - "placement": "right", - "showLegend": true + "placement": "right" }, "tooltip": { "mode": "multi", "sort": "desc" } }, + "pluginVersion": "v11.0.0", "targets": [ { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, - "expr": "ibmmq_topic_messages_received{job=~\"$job\",mq_cluster=~\"$mq_cluster\",qmgr=~\"$qmgr\",topic=~\"$topic\"}", + "expr": "ibmmq_topic_messages_received{job=\"integrations/ibm-mq\",job=~\"$job\",cluster=~\"$cluster\",mq_cluster=~\"$mq_cluster\",instance=~\"$instance\",qmgr=~\"$qmgr\"}", "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{mq_cluster}} - {{qmgr}} - {{topic}}" + "instant": false, + "legendFormat": "{{mq_cluster}} - {{qmgr}} - {{topic}}", + "refId": "Topic messages received" } ], "title": "Topic messages received", @@ -141,27 +114,14 @@ }, { "datasource": { - "uid": "${prometheus_datasource}" + "type": "datasource", + "uid": "-- Mixed --" }, "description": "The time since the topic last received a message.", "fieldConfig": { "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [ ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - }, "unit": "s" - }, - "overrides": [ ] + } }, "gridPos": { "h": 6, @@ -169,31 +129,29 @@ "x": 16, "y": 1 }, - "id": 4, + "id": 3, "options": { "displayMode": "basic", - "minVizHeight": 10, - "minVizWidth": 0, "orientation": "horizontal", "reduceOptions": { "calcs": [ "lastNotNull" - ], - "fields": "", - "values": false + ] }, - "showUnfilled": true, - "valueMode": "color" + "showUnfilled": true }, + "pluginVersion": "v11.4.0", "targets": [ { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, - "expr": "ibmmq_topic_time_since_msg_received{job=~\"$job\",mq_cluster=~\"$mq_cluster\",qmgr=~\"$qmgr\",topic=~\"$topic\"}", + "expr": "ibmmq_topic_time_since_msg_received{job=\"integrations/ibm-mq\",job=~\"$job\",cluster=~\"$cluster\",mq_cluster=~\"$mq_cluster\",instance=~\"$instance\",qmgr=~\"$qmgr\"}", "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{mq_cluster}} - {{qmgr}} - {{topic}}" + "instant": false, + "legendFormat": "{{mq_cluster}} - {{qmgr}} - {{topic}}", + "refId": "Time since last message" } ], "title": "Time since last message", @@ -201,58 +159,21 @@ }, { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, "description": "The number of subscribers per topic.", "fieldConfig": { "defaults": { - "color": { - "mode": "palette-classic" - }, "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "decimals": 0, - "mappings": [ ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] + "fillOpacity": 30, + "gradientMode": "opacity", + "lineInterpolation": "smooth", + "lineWidth": 2, + "showPoints": "never" }, "unit": "none" - }, - "overrides": [ ] + } }, "gridPos": { "h": 6, @@ -260,28 +181,30 @@ "x": 0, "y": 7 }, - "id": 5, + "id": 4, "options": { "legend": { "calcs": [ ], "displayMode": "list", - "placement": "bottom", - "showLegend": true + "placement": "bottom" }, "tooltip": { "mode": "multi", "sort": "desc" } }, + "pluginVersion": "v11.0.0", "targets": [ { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, - "expr": "ibmmq_topic_subscriber_count{job=~\"$job\",mq_cluster=~\"$mq_cluster\",qmgr=~\"$qmgr\",topic=~\"$topic\"}", + "expr": "ibmmq_topic_subscriber_count{job=\"integrations/ibm-mq\",job=~\"$job\",cluster=~\"$cluster\",mq_cluster=~\"$mq_cluster\",instance=~\"$instance\",qmgr=~\"$qmgr\"}", "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{mq_cluster}} - {{qmgr}} - {{topic}}" + "instant": false, + "legendFormat": "{{mq_cluster}} - {{qmgr}} - {{topic}}", + "refId": "Topic subscribers" } ], "title": "Topic subscribers", @@ -289,58 +212,21 @@ }, { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, "description": "The number of publishers per topic.", "fieldConfig": { "defaults": { - "color": { - "mode": "palette-classic" - }, "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "decimals": 0, - "mappings": [ ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] + "fillOpacity": 30, + "gradientMode": "opacity", + "lineInterpolation": "smooth", + "lineWidth": 2, + "showPoints": "never" }, "unit": "none" - }, - "overrides": [ ] + } }, "gridPos": { "h": 6, @@ -348,28 +234,30 @@ "x": 12, "y": 7 }, - "id": 6, + "id": 5, "options": { "legend": { "calcs": [ ], "displayMode": "list", - "placement": "bottom", - "showLegend": true + "placement": "bottom" }, "tooltip": { "mode": "multi", "sort": "desc" } }, + "pluginVersion": "v11.0.0", "targets": [ { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, - "expr": "ibmmq_topic_publisher_count{job=~\"$job\",mq_cluster=~\"$mq_cluster\",qmgr=~\"$qmgr\",topic=~\"$topic\"}", + "expr": "ibmmq_topic_publisher_count{job=\"integrations/ibm-mq\",job=~\"$job\",cluster=~\"$cluster\",mq_cluster=~\"$mq_cluster\",instance=~\"$instance\",qmgr=~\"$qmgr\"}", "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{mq_cluster}} - {{qmgr}} - {{topic}}" + "instant": false, + "legendFormat": "{{mq_cluster}} - {{qmgr}} - {{topic}}", + "refId": "Topic publishers" } ], "title": "Topic publishers", @@ -377,84 +265,37 @@ }, { "collapsed": false, - "datasource": { - "uid": "${prometheus_datasource}" - }, "gridPos": { "h": 1, - "w": 24, + "w": 0, "x": 0, "y": 13 }, - "id": 7, - "targets": [ - { - "datasource": { - "uid": "${prometheus_datasource}" - }, - "expr": "", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "" - } - ], + "id": 6, + "panels": [ ], "title": "Subscriptions", "type": "row" }, { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, "description": "The number of messages a subscription receives.", "fieldConfig": { "defaults": { - "color": { - "mode": "palette-classic" - }, "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, + "fillOpacity": 30, + "gradientMode": "opacity", + "lineInterpolation": "smooth", + "lineWidth": 2, "showPoints": "never", - "spanNulls": false, "stacking": { - "group": "A", "mode": "normal" - }, - "thresholdsStyle": { - "mode": "off" } }, - "decimals": 0, - "mappings": [ ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - }, "unit": "none" - }, - "overrides": [ ] + } }, "gridPos": { "h": 6, @@ -462,105 +303,71 @@ "x": 0, "y": 14 }, - "id": 8, + "id": 7, "options": { "legend": { "calcs": [ ], "displayMode": "list", - "placement": "right", - "showLegend": true + "placement": "right" }, "tooltip": { "mode": "multi", "sort": "desc" } }, + "pluginVersion": "v11.0.0", "targets": [ { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, - "expr": "ibmmq_subscription_messsages_received{job=~\"$job\",mq_cluster=~\"$mq_cluster\",qmgr=~\"$qmgr\",subscription=~\"$subscription\"}", + "expr": "ibmmq_subscription_messsages_received{job=\"integrations/ibm-mq\",job=~\"$job\",cluster=~\"$cluster\",mq_cluster=~\"$mq_cluster\",instance=~\"$instance\",qmgr=~\"$qmgr\"}", "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{mq_cluster}} - {{qmgr}} - {{subscription}}" + "instant": false, + "legendFormat": "{{mq_cluster}} - {{qmgr}} - {{subscription}}", + "refId": "Subscription messages received" } ], "title": "Subscription messages received", - "transformations": [ ], "type": "timeseries" }, { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, "description": "A table for at a glance information about a subscription.", "fieldConfig": { "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": { - "align": "center", - "cellOptions": { - "type": "auto" - }, - "filterable": false, - "inspect": false - }, - "mappings": [ ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 80 - } - ] - }, "unit": "s" - }, - "overrides": [ ] + } }, "gridPos": { "h": 10, "w": 24, "x": 0, - "y": 20 + "y": 24 }, - "id": 9, + "id": 8, "options": { - "cellHeight": "sm", + "enablePagination": true, "footer": { - "countRows": false, - "enablePagination": false, - "fields": "", - "reducer": [ - "sum" - ], - "show": false - }, - "showHeader": true, - "sortBy": [ - { - "desc": false, - "displayName": "subid" - } - ] + "enablePagination": false + } }, + "pluginVersion": "v11.0.0", "targets": [ { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, - "expr": "ibmmq_subscription_time_since_message_published{job=~\"$job\",mq_cluster=~\"$mq_cluster\",qmgr=~\"$qmgr\",subscription=~\"$subscription\"}", + "expr": "ibmmq_subscription_time_since_message_published{job=\"integrations/ibm-mq\",job=~\"$job\",cluster=~\"$cluster\",mq_cluster=~\"$mq_cluster\",instance=~\"$instance\",qmgr=~\"$qmgr\"}", "format": "table", - "intervalFactor": 2, - "legendFormat": "{{label_name}}" + "instant": true, + "legendFormat": "{{label_name}}", + "refId": "Subscription time since message published" } ], "title": "Subscription status", @@ -574,8 +381,7 @@ "instance": true, "job": true, "platform": true, - "subid": true, - "type": false + "subid": true }, "indexByName": { "Time": 6, @@ -590,8 +396,7 @@ "subscription": 2, "topic": 4, "type": 3 - }, - "renameByName": { } + } } }, { @@ -630,8 +435,6 @@ { "id": "organize", "options": { - "excludeByName": { }, - "indexByName": { }, "renameByName": { "Value (last)": "Time since last subscription message", "Value (lastNotNull)": "Time since last subscription message" @@ -643,156 +446,129 @@ } ], "refresh": "1m", - "rows": [ ], - "schemaVersion": 14, - "style": "dark", + "schemaVersion": 39, "tags": [ "ibm-mq-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": { }, + "allValue": ".+", "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, - "hide": 0, - "includeAll": false, + "includeAll": true, "label": "Job", - "multi": false, + "multi": true, "name": "job", - "options": [ ], - "query": "label_values(ibmmq_topic_messages_received,job)", + "query": "label_values(ibmmq_qmgr_commit_count{job=\"integrations/ibm-mq\"}, 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": "MQ cluster", + "label": "Cluster", "multi": true, - "name": "mq_cluster", - "options": [ ], - "query": "label_values(ibmmq_topic_messages_received{job=~\"$job\"},mq_cluster)", + "name": "cluster", + "query": "label_values(ibmmq_qmgr_commit_count{job=\"integrations/ibm-mq\",job=~\"$job\"}, cluster)", "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": false, - "label": "Queue manager", + "includeAll": true, + "label": "MQ cluster", "multi": false, - "name": "qmgr", - "options": [ ], - "query": "label_values(ibmmq_topic_messages_received{mq_cluster=~\"$mq_cluster\"},qmgr)", + "name": "mq_cluster", + "query": "label_values(ibmmq_qmgr_commit_count{job=\"integrations/ibm-mq\",job=~\"$job\",cluster=~\"$cluster\"}, mq_cluster)", "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": "Topic", + "label": "Instance", "multi": true, - "name": "topic", - "options": [ ], - "query": "label_values(ibmmq_topic_subscriber_count{qmgr=~\"$qmgr\",topic!~\"SYSTEM.*|\\\\$SYS.*|\"},topic)", + "name": "instance", + "query": "label_values(ibmmq_qmgr_commit_count{job=\"integrations/ibm-mq\",job=~\"$job\",cluster=~\"$cluster\",mq_cluster=~\"$mq_cluster\"}, instance)", "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": "Subscription", + "label": "Queue manager", "multi": true, - "name": "subscription", - "options": [ ], - "query": "label_values(ibmmq_subscription_messsages_received{qmgr=~\"$qmgr\",subscription!~\"SYSTEM.*|\"},subscription)", + "name": "qmgr", + "query": "label_values(ibmmq_qmgr_commit_count{job=\"integrations/ibm-mq\",job=~\"$job\",cluster=~\"$cluster\",mq_cluster=~\"$mq_cluster\",instance=~\"$instance\"}, qmgr)", "refresh": 2, + "sort": 1, + "type": "query" + }, + { + "hide": 2, + "label": "Loki data source", + "name": "loki_datasource", + "query": "loki", "regex": "", - "sort": 0, - "tagValuesQuery": "", - "tags": [ ], - "tagsQuery": "", - "type": "query", - "useTags": false + "type": "datasource" }, { - "allValue": "", - "current": { }, + "allValue": ".+", "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, - "hide": 2, "includeAll": true, - "label": "Cluster", + "label": "Topic", "multi": true, - "name": "cluster", - "options": [ ], - "query": "label_values(ibmmq_qmgr_commit_count{job=~\"$job\"}, cluster)", + "name": "topic", + "query": "label_values(ibmmq_topic_subscriber_count{qmgr=~\"$qmgr\",topic!~\"SYSTEM.*|\\\\$SYS.*|\"}, topic)", "refresh": 2, - "regex": "", - "sort": 0, - "tagValuesQuery": "", - "tags": [ ], - "tagsQuery": "", - "type": "query", - "useTags": false + "type": "query" + }, + { + "allValue": ".+", + "datasource": { + "type": "prometheus", + "uid": "${prometheus_datasource}" + }, + "includeAll": true, + "label": "Subscription", + "multi": true, + "name": "subscription", + "query": "label_values(ibmmq_subscription_messsages_received{qmgr=~\"$qmgr\",subscription!~\"SYSTEM.*|\"}, subscription)", + "refresh": 2, + "type": "query" } ] }, @@ -800,33 +576,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": "IBM MQ topics overview", - "uid": "ibm-mq-topics-overview", - "version": 0 + "uid": "ibmmq-topics-overview" } \ No newline at end of file diff --git a/ibm-mq-mixin/g.libsonnet b/ibm-mq-mixin/g.libsonnet new file mode 100644 index 000000000..52d628af4 --- /dev/null +++ b/ibm-mq-mixin/g.libsonnet @@ -0,0 +1 @@ +(import 'github.com/grafana/grafonnet/gen/grafonnet-latest/main.libsonnet') diff --git a/ibm-mq-mixin/jsonnetfile.json b/ibm-mq-mixin/jsonnetfile.json index 93f3316ec..6354d0e12 100644 --- a/ibm-mq-mixin/jsonnetfile.json +++ b/ibm-mq-mixin/jsonnetfile.json @@ -1,15 +1,42 @@ { "version": 1, "dependencies": [ - { - "source": { - "git": { - "remote": "https://github.com/grafana/grafonnet-lib.git", - "subdir": "grafonnet" - } + { + "source": { + "git": { + "remote": "https://github.com/grafana/grafonnet-lib.git", + "subdir": "grafonnet" + } + }, + "version": "master" }, - "version": "master" - } + { + "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": "grafana-cloud-integration-utils" + } + }, + "version": "master" + }, + { + "source": { + "git": { + "remote": "https://github.com/grafana/jsonnet-libs.git", + "subdir": "logs-lib" + } + }, + "version": "master" + } ], "legacyImports": true } diff --git a/ibm-mq-mixin/links.libsonnet b/ibm-mq-mixin/links.libsonnet new file mode 100644 index 000000000..7e01c7d2d --- /dev/null +++ b/ibm-mq-mixin/links.libsonnet @@ -0,0 +1,41 @@ +local g = import './g.libsonnet'; + +{ + new(this):: + { + local link = g.dashboard.link, + + + ibmMqClusterOverview: + g.dashboard.link.link.new('IBM MQ cluster overview', '/d/' + this.grafana.dashboards['ibm-mq-cluster-overview.json'].uid) + + g.dashboard.link.link.options.withKeepTime(true) + + g.dashboard.link.link.options.withIncludeVars(true), + + ibmMqQueueManagerOverview: + g.dashboard.link.link.new('IBM MQ queue manager overview', '/d/' + this.grafana.dashboards['ibm-mq-queue-manager-overview.json'].uid) + + g.dashboard.link.link.options.withKeepTime(true) + + g.dashboard.link.link.options.withIncludeVars(true), + + ibmMqQueueOverview: + g.dashboard.link.link.new('IBM MQ queue overview', '/d/' + this.grafana.dashboards['ibm-mq-queue-overview.json'].uid) + + g.dashboard.link.link.options.withKeepTime(true) + + g.dashboard.link.link.options.withIncludeVars(true), + + ibmMqTopicsOverview: + g.dashboard.link.link.new('IBM MQ topics overview', '/d/' + this.grafana.dashboards['ibm-mq-topics-overview.json'].uid) + + g.dashboard.link.link.options.withKeepTime(true) + + g.dashboard.link.link.options.withIncludeVars(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 { + ibmMqLogs: + g.dashboard.link.link.new('IBM MQ logs', '/d/' + this.grafana.dashboards['ibm-mq-logs.json'].uid) + + g.dashboard.link.link.options.withKeepTime(true) + + g.dashboard.link.link.options.withIncludeVars(true), + } else {}, +} diff --git a/ibm-mq-mixin/main.libsonnet b/ibm-mq-mixin/main.libsonnet new file mode 100644 index 000000000..a3ba9b064 --- /dev/null +++ b/ibm-mq-mixin/main.libsonnet @@ -0,0 +1,49 @@ +local alerts = import './alerts.libsonnet'; +local config = import './config.libsonnet'; +local dashboards = import './dashboards.libsonnet'; +local links = import './links.libsonnet'; +local panels = import './panels.libsonnet'; +local rows = import './rows.libsonnet'; +local commonlib = import 'common-lib/common/main.libsonnet'; + +{ + withConfigMixin(config): { + config+: config, + }, + + new(): { + + local this = self, + config: config, + + signals: + { + [sig]: commonlib.signals.unmarshallJsonMulti( + this.config.signals[sig], + type=this.config.metricsSource + ) + for sig in std.objectFields(this.config.signals) + }, + + grafana: { + variables: commonlib.variables.new( + filteringSelector=this.config.filteringSelector, + groupLabels=this.config.groupLabels, + instanceLabels=this.config.instanceLabels, + varMetric='ibmmq_qmgr_commit_count', + 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/ibm-mq-mixin/mixin.libsonnet b/ibm-mq-mixin/mixin.libsonnet index 4d987cf31..dee518a90 100644 --- a/ibm-mq-mixin/mixin.libsonnet +++ b/ibm-mq-mixin/mixin.libsonnet @@ -1,3 +1,38 @@ -(import 'dashboards/dashboards.libsonnet') + -(import 'alerts/alerts.libsonnet') + -(import 'config.libsonnet') +local ibmmqlib = import './main.libsonnet'; +local config = (import './config.libsonnet'); +local util = import 'grafana-cloud-integration-utils/util.libsonnet'; + +local ibmmq = + ibmmqlib.new() + + ibmmqlib.withConfigMixin( + { + filteringSelector: config.filteringSelector, + uid: config.uid, + enableLokiLogs: config.enableLokiLogs, + } + ); + +local label_patch = { + cluster+: { + allValue: '.*', + }, + mq_cluster+: { + label: 'MQ cluster', + allValue: '.*', + multi: false, + }, + qmgr+: { + label: 'Queue manager', + }, +}; + +{ + grafanaDashboards+:: { + [fname]: + local dashboard = ibmmq.grafana.dashboards[fname]; + dashboard + util.patch_variables(dashboard, label_patch) + for fname in std.objectFields(ibmmq.grafana.dashboards) + }, + prometheusAlerts+:: ibmmq.prometheus.alerts, + prometheusRules+:: ibmmq.prometheus.recordingRules, +} diff --git a/ibm-mq-mixin/panels.libsonnet b/ibm-mq-mixin/panels.libsonnet new file mode 100644 index 000000000..744dbaf30 --- /dev/null +++ b/ibm-mq-mixin/panels.libsonnet @@ -0,0 +1,589 @@ +local g = import './g.libsonnet'; +local commonlib = import 'common-lib/common/main.libsonnet'; + +{ + new(this):: + { + local signals = this.signals, + + /* + ------------------------- + Cluster Overview + ------------------------- + */ + + clusterClusters: + commonlib.panels.generic.stat.info.new('Clusters', targets=[signals.cluster.clusters.asTarget()]) + + g.panel.stat.panelOptions.withDescription('The unique number of clusters being reported.') + + g.panel.stat.standardOptions.withUnit('none'), + + clusterQueueManagers: + commonlib.panels.generic.stat.info.new('Queue managers', targets=[signals.cluster.queueManagers.asTarget()]) + + g.panel.stat.panelOptions.withDescription('The unique number of queue managers in the cluster being reported.') + + g.panel.stat.standardOptions.withUnit('none'), + + clusterTopics: + commonlib.panels.generic.stat.info.new('Topics', targets=[signals.cluster.topics.asTarget()]) + + g.panel.stat.panelOptions.withDescription('The unique number of topics in the cluster.') + + g.panel.stat.standardOptions.withUnit('none'), + + clusterQueues: + commonlib.panels.generic.stat.info.new('Queues', targets=[signals.cluster.queues.asTarget()]) + + g.panel.stat.panelOptions.withDescription('The unique number of queues in the cluster.') + + g.panel.stat.standardOptions.withUnit('none'), + + clusterQueueOperations: + g.panel.pieChart.new('Queue operations') + + g.panel.pieChart.queryOptions.withTargets([ + signals.cluster.queueOperationsMqset.asTarget(), + signals.cluster.queueOperationsMqinq.asTarget(), + signals.cluster.queueOperationsMqget.asTarget(), + signals.cluster.queueOperationsMqopen.asTarget(), + signals.cluster.queueOperationsMqclose.asTarget(), + signals.cluster.queueOperationsMqput.asTarget(), + ]) + + g.panel.pieChart.panelOptions.withDescription('The number of queue operations of the cluster.') + + g.panel.pieChart.standardOptions.withUnit('operations') + + g.panel.pieChart.options.withLegend({ displayMode: 'list', placement: 'bottom', showLegend: true }) + + g.panel.pieChart.options.withPieType('pie') + + g.panel.pieChart.options.reduceOptions.withCalcs(['lastNotNull']), + + clusterStatusTable: + commonlib.panels.generic.table.base.new('Cluster status', targets=[signals.cluster.clusterStatus.asTarget()]) + + g.panel.table.panelOptions.withDescription('The status of the cluster.') + + g.panel.table.standardOptions.color.withMode('fixed') + + g.panel.table.fieldConfig.defaults.custom.withAlign('center') + + g.panel.table.fieldConfig.defaults.custom.withCellOptions({ type: 'color-text' }) + + g.panel.table.fieldConfig.defaults.custom.withInspect(false) + + { + options+: { + enablePagination: true, + }, + } + + g.panel.table.standardOptions.withMappings([ + { + type: 'value', + options: { + '0': { + text: 'Not suspended', + color: 'green', + index: 0, + }, + '1': { + text: 'Suspended', + color: 'red', + index: 1, + }, + }, + }, + ]) + + g.panel.table.queryOptions.withTransformations([ + g.panel.table.transformation.withId('joinByLabels') + + g.panel.table.transformation.withOptions({ + join: ['cluster', 'mq_cluster', 'qmgr'], + value: '__name__', + }), + g.panel.table.transformation.withId('organize') + + g.panel.table.transformation.withOptions({ + excludeByName: {}, + indexByName: {}, + renameByName: { + cluster: 'Cluster', + ibmmq_cluster_suspend: 'Status', + mq_cluster: 'MQ cluster', + qmgr: 'Queue manager', + }, + }), + g.panel.table.transformation.withId('reduce') + + g.panel.table.transformation.withOptions({ + includeTimeField: false, + mode: 'reduceFields', + reducers: ['last'], + }), + ]), + + clusterQueueManagerStatusTable: + commonlib.panels.generic.table.base.new('Queue manager status', targets=[signals.cluster.queueManagerStatus.asTarget()]) + + g.panel.table.panelOptions.withDescription('The queue managers of the cluster displayed in a table.') + + g.panel.table.standardOptions.color.withMode('fixed') + + g.panel.table.fieldConfig.defaults.custom.withAlign('center') + + g.panel.table.fieldConfig.defaults.custom.withCellOptions({ type: 'color-text' }) + + g.panel.table.fieldConfig.defaults.custom.withInspect(false) + + { options+: { enablePagination: true } } + + g.panel.table.standardOptions.withMappings([ + { + type: 'value', + options: { + '-1': { + text: 'N/A', + color: 'dark-red', + index: 0, + }, + '0': { + text: 'Stopped', + color: 'red', + index: 1, + }, + '1': { + text: 'Starting', + color: 'light-green', + index: 2, + }, + '2': { + text: 'Running', + color: 'green', + index: 3, + }, + '3': { + text: 'Quiescing', + index: 4, + }, + '4': { + text: 'Stopping', + color: 'light-red', + index: 5, + }, + '5': { + text: 'Standby', + index: 6, + }, + }, + }, + ]) + + g.panel.table.queryOptions.withTransformations([ + g.panel.table.transformation.withId('joinByLabels') + + g.panel.table.transformation.withOptions({ + join: ['mq_cluster', 'qmgr', 'instance'], + value: '__name__', + }), + g.panel.table.transformation.withId('organize') + + g.panel.table.transformation.withOptions({ + excludeByName: {}, + indexByName: {}, + renameByName: { + ibmmq_qmgr_status: 'Status', + instance: 'Instance', + mq_cluster: 'MQ cluster', + qmgr: 'Queue manager', + }, + }), + g.panel.table.transformation.withId('reduce') + + g.panel.table.transformation.withOptions({ + includeTimeField: false, + mode: 'reduceFields', + reducers: ['last'], + }), + ]), + + clusterTransmissionQueueTime: + commonlib.panels.generic.timeSeries.base.new('Transmission queue time', targets=[ + signals.cluster.transmissionQueueTimeShort.asTarget(), + signals.cluster.transmissionQueueTimeLong.asTarget(), + ]) + + g.panel.timeSeries.panelOptions.withDescription('The time it takes for the messages to get through the transmission queue. (Long) - total time taken for messages to be transmitted over the channel, (Short) - an average, minimum, or maximum time taken to transmit messages over the channel in recent intervals.') + + g.panel.timeSeries.standardOptions.withUnit('µs'), + + /* + ------------------------- + Queue Manager Overview + ------------------------- + */ + + qmgrActiveListeners: + commonlib.panels.generic.stat.info.new('Active listeners', targets=[signals.queueManager.activeListeners.asTarget()]) + + g.panel.stat.panelOptions.withDescription('The number of active listeners for the queue manager.') + + g.panel.stat.standardOptions.withUnit('none') + + g.panel.stat.standardOptions.thresholds.withSteps([ + g.panel.stat.standardOptions.threshold.step.withColor('red') + + g.panel.stat.standardOptions.threshold.step.withValue(null), + g.panel.stat.standardOptions.threshold.step.withColor('green') + + g.panel.stat.standardOptions.threshold.step.withValue(1), + ]) + + g.panel.stat.options.withColorMode('value'), + + qmgrActiveConnections: + commonlib.panels.generic.stat.info.new('Active connections', targets=[signals.queueManager.activeConnections.asTarget()]) + + g.panel.stat.panelOptions.withDescription('The number of active connections for the queue manager.') + + g.panel.stat.standardOptions.withUnit('none') + + g.panel.stat.standardOptions.thresholds.withSteps([ + g.panel.stat.standardOptions.threshold.step.withColor('red') + + g.panel.stat.standardOptions.threshold.step.withValue(null), + g.panel.stat.standardOptions.threshold.step.withColor('green') + + g.panel.stat.standardOptions.threshold.step.withValue(1), + ]) + + g.panel.stat.options.withColorMode('value'), + + qmgrQueues: + commonlib.panels.generic.stat.info.new('Queues', targets=[signals.queueManager.queues.asTarget()]) + + g.panel.stat.panelOptions.withDescription('The unique number of queues being managed by the queue manager.') + + g.panel.stat.standardOptions.withUnit('none') + + g.panel.stat.standardOptions.thresholds.withSteps([ + g.panel.stat.standardOptions.threshold.step.withColor('red') + + g.panel.stat.standardOptions.threshold.step.withValue(null), + g.panel.stat.standardOptions.threshold.step.withColor('green') + + g.panel.stat.standardOptions.threshold.step.withValue(1), + ]) + + g.panel.stat.options.withColorMode('value'), + + qmgrEstimatedMemoryUtilization: + commonlib.panels.generic.timeSeries.base.new('Estimated memory utilization', targets=[ + signals.queueManager.estimatedMemoryUtilization.asTarget(), + ]) + + g.panel.timeSeries.panelOptions.withDescription('The estimated memory usage of the queue managers.') + + g.panel.timeSeries.standardOptions.withUnit('percentunit'), + + qmgrStatusTable: + commonlib.panels.generic.table.base.new('Queue manager status', targets=[signals.queueManager.queueManagerStatusUptime.asTarget(), signals.queueManager.queueManagerStatus.asTarget()]) + + g.panel.table.panelOptions.withDescription('A table showing the status and uptime of the queue manager.') + + { options+: { enablePagination: true } } + + g.panel.table.queryOptions.withTransformations([ + g.panel.table.transformation.withId('joinByField') + + g.panel.table.transformation.withOptions({ + byField: 'Time', + mode: 'inner', + }), + g.panel.table.transformation.withId('organize') + + g.panel.table.transformation.withOptions({ + excludeByName: { + Time: true, + __name__: true, + description: true, + hostname: true, + instance: true, + job: true, + platform: true, + }, + renameByName: { + Value: 'Uptime', + 'ibmmq_qmgr_status{job="$job", mq_cluster=~"$mq_cluster", qmgr="$qmgr"}': 'Status', + mq_cluster: 'MQ cluster', + qmgr: 'Queue manager', + }, + }), + g.panel.table.transformation.withId('reduce') + + g.panel.table.transformation.withOptions({ + includeTimeField: false, + mode: 'reduceFields', + reducers: ['lastNotNull'], + }), + ]) + + g.panel.table.standardOptions.withOverrides([ + g.panel.table.fieldOverride.byName.new('Uptime') + + g.panel.table.fieldOverride.byName.withProperty('unit', 's'), + g.panel.table.fieldOverride.byName.new('Status') + + g.panel.table.fieldOverride.byName.withProperty('custom.cellOptions', { type: 'color-text' }), + ]), + + qmgrCpuUsage: + commonlib.panels.generic.timeSeries.base.new('CPU usage', targets=[ + signals.queueManager.cpuUsageUser.asTarget(), + signals.queueManager.cpuUsageSystem.asTarget(), + ]) + + g.panel.timeSeries.panelOptions.withDescription('The system/user CPU usage of the queue manager.') + + g.panel.timeSeries.standardOptions.withUnit('percent') + + g.panel.timeSeries.fieldConfig.defaults.custom.stacking.withMode('normal'), + + qmgrDiskUsage: + commonlib.panels.generic.timeSeries.base.new('Disk usage', targets=[ + signals.queueManager.diskUsage.asTarget(), + ]) + + g.panel.timeSeries.panelOptions.withDescription('The disk allocated to the queue manager that is being used.') + + g.panel.timeSeries.standardOptions.withUnit('decbytes') + + g.panel.timeSeries.fieldConfig.defaults.custom.stacking.withMode('normal'), + + qmgrCommits: + commonlib.panels.generic.timeSeries.base.new('Commits', targets=[ + signals.queueManager.commits.asTarget(), + ]) + + g.panel.timeSeries.panelOptions.withDescription('The commits of the queue manager.') + + g.panel.timeSeries.fieldConfig.defaults.custom.stacking.withMode('normal'), + + qmgrPublishThroughput: + commonlib.panels.generic.timeSeries.base.new('Publish throughput', targets=[ + signals.queueManager.publishThroughput.asTarget(), + ]) + + g.panel.timeSeries.panelOptions.withDescription('The amount of data being pushed from the queue manager to subscribers.') + + g.panel.timeSeries.standardOptions.withUnit('decbytes'), + + qmgrPublishedMessages: + commonlib.panels.generic.timeSeries.base.new('Published messages', targets=[ + signals.queueManager.publishedMessages.asTarget(), + ]) + + g.panel.timeSeries.panelOptions.withDescription('The number of messages being published by the queue manager.') + + g.panel.timeSeries.fieldConfig.defaults.custom.stacking.withMode('normal'), + + qmgrExpiredMessages: + commonlib.panels.generic.timeSeries.base.new('Expired messages', targets=[ + signals.queueManager.expiredMessages.asTarget(), + ]) + + g.panel.timeSeries.panelOptions.withDescription('The expired messages of the queue manager.') + + g.panel.timeSeries.fieldConfig.defaults.custom.stacking.withMode('normal'), + + qmgrQueueOperations: + commonlib.panels.generic.timeSeries.base.new('Queue operations', targets=[ + signals.queueManager.queueOperationsMqset.asTarget(), + signals.queueManager.queueOperationsMqinq.asTarget(), + signals.queueManager.queueOperationsMqget.asTarget(), + signals.queueManager.queueOperationsMqopen.asTarget(), + signals.queueManager.queueOperationsMqclose.asTarget(), + signals.queueManager.queueOperationsMqput.asTarget(), + ]) + + g.panel.timeSeries.panelOptions.withDescription('The number of queue operations of the queue manager.') + + g.panel.timeSeries.standardOptions.withUnit('operations') + + g.panel.timeSeries.fieldConfig.defaults.custom.stacking.withMode('normal') + + g.panel.timeSeries.options.legend.withDisplayMode('table') + + g.panel.timeSeries.options.legend.withPlacement('right'), + + qmgrLogLatency: + commonlib.panels.generic.timeSeries.base.new('Log latency', targets=[ + signals.queueManager.logLatency.asTarget(), + ]) + + g.panel.timeSeries.panelOptions.withDescription('The recent latency of log writes.') + + g.panel.timeSeries.standardOptions.withUnit('s') + + g.panel.timeSeries.fieldConfig.defaults.custom.stacking.withMode('normal'), + + qmgrLogUsage: + commonlib.panels.generic.timeSeries.base.new('Log usage', targets=[ + signals.queueManager.logUsage.asTarget(), + ]) + + g.panel.timeSeries.panelOptions.withDescription('The amount of data on the filesystem occupied by queue manager logs.') + + g.panel.timeSeries.standardOptions.withUnit('decbytes') + + g.panel.timeSeries.fieldConfig.defaults.custom.stacking.withMode('normal'), + + qmgrErrorLogs: + g.panel.logs.new('Error logs') + + g.panel.logs.panelOptions.withDescription('Recent error logs from the queue manager.') + + g.panel.logs.options.withEnableLogDetails(true) + + g.panel.logs.options.withShowTime(false) + + g.panel.logs.options.withWrapLogMessage(false) + + g.panel.logs.options.withDedupStrategy('none') + + g.panel.logs.options.withPrettifyLogMessage(false) + + g.panel.logs.options.withShowCommonLabels(false) + + g.panel.logs.options.withShowLabels(false) + + g.panel.logs.options.withSortOrder('Descending') + + g.panel.logs.queryOptions.withDatasource('loki', '${loki_datasource}') + + g.panel.logs.queryOptions.withTargets([ + g.query.loki.new( + '${loki_datasource}', + '{job=~"$job", qmgr=~"$qmgr"} |= `` | (filename=~"/var/mqm/qmgrs/.*/errors/.*LOG" or log_type="mq-qmgr-error")' + ) + + g.query.loki.withRefId('A'), + ]), + + /* + ------------------------- + Queue Overview + ------------------------- + */ + + queueAverageQueueTime: + commonlib.panels.generic.timeSeries.base.new('Average queue time', targets=[ + signals.queue.averageQueueTime.asTarget(), + ]) + + g.panel.timeSeries.panelOptions.withDescription('The average amount of time a message spends in the queue.') + + g.panel.timeSeries.standardOptions.withUnit('s'), + + queueExpiredMessages: + commonlib.panels.generic.timeSeries.base.new('Expired messages', targets=[ + signals.queue.expiredMessages.asTarget(), + ]) + + g.panel.timeSeries.panelOptions.withDescription('The expired messages of the queue.') + + g.panel.timeSeries.standardOptions.withUnit('none'), + + queueDepth: + commonlib.panels.generic.timeSeries.base.new('Queue depth', targets=[ + signals.queue.queueDepth.asTarget(), + ]) + + g.panel.timeSeries.panelOptions.withDescription('The depth of the queue.') + + g.panel.timeSeries.standardOptions.withUnit('none'), + + queueOldestMessageAge: + commonlib.panels.generic.timeSeries.base.new('Oldest message age', targets=[ + signals.queue.oldestMessageAge.asTarget(), + ]) + + g.panel.timeSeries.panelOptions.withDescription('The oldest message age of the queue.') + + g.panel.timeSeries.standardOptions.withUnit('s'), + + queueInputOutputRate: + commonlib.panels.generic.timeSeries.base.new('Input/output rate', targets=[ + signals.queue.inputOutputRate.asTarget(), + ]) + + g.panel.timeSeries.panelOptions.withDescription('The input/output rate of the queue.') + + g.panel.timeSeries.standardOptions.withUnit('none'), + + queueTimeOnQueue: + commonlib.panels.generic.timeSeries.base.new('Time on queue', targets=[ + signals.queue.timeOnQueue.asTarget(), + ]) + + g.panel.timeSeries.panelOptions.withDescription('The average time messages spent on the queue.') + + g.panel.timeSeries.standardOptions.withUnit('µs'), + + queuePurgedMessages: + commonlib.panels.generic.timeSeries.base.new('Purged messages', targets=[ + signals.queue.purgedMessages.asTarget(), + ]) + + g.panel.timeSeries.panelOptions.withDescription('The purged messages from the queue.') + + g.panel.timeSeries.standardOptions.withUnit('none'), + + queueInputOutputBytes: + commonlib.panels.generic.timeSeries.base.new('Input/output bytes', targets=[ + signals.queue.inputMessagesBytes.asTarget(), + signals.queue.outputMessagesBytes.asTarget(), + ]) + + g.panel.timeSeries.panelOptions.withDescription('The input/output messages of the queue in bytes.') + + g.panel.timeSeries.standardOptions.withUnit('decbytes'), + + queueOperationThroughput: + commonlib.panels.generic.timeSeries.base.new('Operation throughput', targets=[ + signals.queue.mqgetBytes.asTarget(), + signals.queue.mqputBytes.asTarget(), + ]) + + g.panel.timeSeries.panelOptions.withDescription('The amount of throughput going through the queue via MQGETs and MQPUTs.') + + g.panel.timeSeries.standardOptions.withUnit('decbytes') + + g.panel.timeSeries.fieldConfig.defaults.custom.stacking.withMode('normal') + + g.panel.timeSeries.options.legend.withDisplayMode('list') + + g.panel.timeSeries.options.legend.withPlacement('right'), + + queueOperations: + commonlib.panels.generic.timeSeries.base.new('Operations', targets=[ + signals.queue.mqsetCount.asTarget(), + signals.queue.mqinqCount.asTarget(), + signals.queue.mqgetCount.asTarget(), + signals.queue.mqopenCount.asTarget(), + signals.queue.mqcloseCount.asTarget(), + signals.queue.mqputMqput1Count.asTarget(), + ]) + + g.panel.timeSeries.panelOptions.withDescription('The number of queue operations of the queue manager.') + + g.panel.timeSeries.standardOptions.withUnit('operations') + + g.panel.timeSeries.fieldConfig.defaults.custom.stacking.withMode('normal') + + g.panel.timeSeries.options.legend.withCalcs(['min', 'max', 'mean']) + + g.panel.timeSeries.options.legend.withDisplayMode('table') + + g.panel.timeSeries.options.legend.withPlacement('right'), + + /* + ------------------------- + Topics Overview + ------------------------- + */ + + topicMessagesReceived: + commonlib.panels.generic.timeSeries.base.new('Topic messages received', targets=[ + signals.topic.topicMessagesReceived.asTarget(), + ]) + + g.panel.timeSeries.panelOptions.withDescription('Received messages per topic.') + + g.panel.timeSeries.standardOptions.withUnit('none') + + g.panel.timeSeries.fieldConfig.defaults.custom.stacking.withMode('normal') + + g.panel.timeSeries.options.legend.withDisplayMode('list') + + g.panel.timeSeries.options.legend.withPlacement('right'), + + topicTimeSinceLastMessage: + g.panel.barGauge.new('Time since last message') + + g.panel.barGauge.queryOptions.withTargets([ + signals.topic.timeSinceLastMessage.asTarget(), + ]) + + g.panel.barGauge.panelOptions.withDescription('The time since the topic last received a message.') + + g.panel.barGauge.standardOptions.withUnit('s') + + g.panel.barGauge.options.withOrientation('horizontal') + + g.panel.barGauge.options.withDisplayMode('basic') + + g.panel.barGauge.options.withShowUnfilled(true) + + g.panel.barGauge.options.reduceOptions.withCalcs(['lastNotNull']), + + topicSubscribers: + commonlib.panels.generic.timeSeries.base.new('Topic subscribers', targets=[ + signals.topic.subscribers.asTarget(), + ]) + + g.panel.timeSeries.panelOptions.withDescription('The number of subscribers per topic.') + + g.panel.timeSeries.standardOptions.withUnit('none') + + g.panel.timeSeries.options.legend.withDisplayMode('list') + + g.panel.timeSeries.options.legend.withPlacement('bottom'), + + topicPublishers: + commonlib.panels.generic.timeSeries.base.new('Topic publishers', targets=[ + signals.topic.publishers.asTarget(), + ]) + + g.panel.timeSeries.panelOptions.withDescription('The number of publishers per topic.') + + g.panel.timeSeries.standardOptions.withUnit('none') + + g.panel.timeSeries.options.legend.withDisplayMode('list') + + g.panel.timeSeries.options.legend.withPlacement('bottom'), + + subscriptionMessagesReceived: + commonlib.panels.generic.timeSeries.base.new('Subscription messages received', targets=[ + signals.topic.subscriptionMessagesReceived.asTarget(), + ]) + + g.panel.timeSeries.panelOptions.withDescription('The number of messages a subscription receives.') + + g.panel.timeSeries.standardOptions.withUnit('none') + + g.panel.timeSeries.fieldConfig.defaults.custom.stacking.withMode('normal') + + g.panel.timeSeries.options.legend.withDisplayMode('list') + + g.panel.timeSeries.options.legend.withPlacement('right'), + + subscriptionStatus: + commonlib.panels.generic.table.base.new('Subscription status', targets=[signals.topic.subscriptionTimeSinceMessagePublished.asTableTarget()]) + + { options+: { enablePagination: true } } + + g.panel.table.panelOptions.withDescription('A table for at a glance information about a subscription.') + + g.panel.table.standardOptions.withUnit('s') + + g.panel.table.queryOptions.withTransformations([ + g.panel.table.transformation.withId('organize') + + g.panel.table.transformation.withOptions({ + excludeByName: { + Time: true, + __name__: true, + instance: true, + job: true, + platform: true, + subid: true, + }, + indexByName: { + Time: 6, + Value: 5, + __name__: 7, + instance: 8, + job: 9, + mq_cluster: 1, + platform: 10, + qmgr: 0, + subid: 11, + subscription: 2, + topic: 4, + type: 3, + }, + }), + g.panel.table.transformation.withId('groupBy') + + g.panel.table.transformation.withOptions({ + fields: { + Value: { + aggregations: ['last'], + operation: 'aggregate', + }, + mq_cluster: { + aggregations: [], + operation: 'groupby', + }, + qmgr: { + aggregations: [], + operation: 'groupby', + }, + subscription: { + aggregations: [], + operation: 'groupby', + }, + topic: { + aggregations: [], + operation: 'groupby', + }, + type: { + aggregations: [], + operation: 'groupby', + }, + }, + }), + g.panel.table.transformation.withId('organize') + + g.panel.table.transformation.withOptions({ + renameByName: { + 'Value (last)': 'Time since last subscription message', + 'Value (lastNotNull)': 'Time since last subscription message', + }, + }), + ]) + + g.panel.table.options.footer.withEnablePagination(false), + }, +} diff --git a/ibm-mq-mixin/prometheus_rules_out/prometheus_alerts.yaml b/ibm-mq-mixin/prometheus_rules_out/prometheus_alerts.yaml index 8e5ba8d4a..58ea0caf7 100644 --- a/ibm-mq-mixin/prometheus_rules_out/prometheus_alerts.yaml +++ b/ibm-mq-mixin/prometheus_rules_out/prometheus_alerts.yaml @@ -6,7 +6,7 @@ groups: description: The number of expired messages in the {{$labels.qmgr}} is {{$labels.value}} which is above the threshold of 2. summary: There are expired messages, which imply that application resilience is failing. expr: | - sum without (description,hostname,instance,job,platform) (ibmmq_qmgr_expired_message_count) > 2 + sum without (description,hostname,instance,job,platform) (ibmmq_qmgr_expired_message_count{job="integrations/ibm-mq"}) > 2 for: 5m labels: severity: critical @@ -15,7 +15,7 @@ groups: description: A stale message with an age of {{$labels.value}} has been sitting in the {{$labels.queue}} which is above the threshold of 300s. summary: Stale messages have been detected. expr: | - sum without (description,instance,job,platform) (ibmmq_queue_oldest_message_age) >= 300 + sum without (description,instance,job,platform) (ibmmq_queue_oldest_message_age{job="integrations/ibm-mq"}) >= 300 for: 5m labels: severity: warning @@ -24,7 +24,7 @@ groups: description: The amount of disk space available for {{$labels.qmgr}} is at {{$labels.value}}% which is below the threshold of 5%. summary: There is limited disk available for a queue manager. expr: | - sum without (description,hostname,instance,job,platform) (ibmmq_qmgr_queue_manager_file_system_free_space_percentage) <= 5 + sum without (description,hostname,instance,job,platform) (ibmmq_qmgr_queue_manager_file_system_free_space_percentage{job="integrations/ibm-mq"}) <= 5 for: 5m labels: severity: critical @@ -33,7 +33,7 @@ groups: description: The amount of CPU usage for the queue manager {{$labels.qmgr}} is at {{$labels.value}}% which is above the threshold of 85%. summary: There is a high CPU usage estimate for a queue manager. expr: | - sum without (description,hostname,instance,job,platform) (ibmmq_qmgr_user_cpu_time_estimate_for_queue_manager_percentage) >= 85 + sum without (description,hostname,instance,job,platform) (ibmmq_qmgr_user_cpu_time_estimate_for_queue_manager_percentage{job="integrations/ibm-mq"}) >= 85 for: 5m labels: severity: critical diff --git a/ibm-mq-mixin/rows.libsonnet b/ibm-mq-mixin/rows.libsonnet new file mode 100644 index 000000000..acf25c69f --- /dev/null +++ b/ibm-mq-mixin/rows.libsonnet @@ -0,0 +1,112 @@ +local g = import './g.libsonnet'; + +{ + new(this): { + local panels = this.grafana.panels, + + /* + ------------------------- + Cluster Overview Rows + ------------------------- + */ + + clusterOverview: + g.panel.row.new('Cluster overview') + + g.panel.row.withCollapsed(false) + + g.panel.row.withPanels( + [ + panels.clusterClusters { gridPos+: { h: 7, w: 4, x: 0, y: 0 } }, + panels.clusterQueueManagers { gridPos+: { h: 7, w: 4, x: 4, y: 0 } }, + panels.clusterTopics { gridPos+: { h: 7, w: 4, x: 8, y: 0 } }, + panels.clusterQueues { gridPos+: { h: 7, w: 4, x: 12, y: 0 } }, + panels.clusterQueueOperations { gridPos+: { h: 15, w: 8, x: 16, y: 0 } }, + panels.clusterStatusTable { gridPos+: { h: 4, w: 16, x: 0, y: 7 } }, + panels.clusterQueueManagerStatusTable { gridPos+: { h: 4, w: 16, x: 0, y: 11 } }, + panels.clusterTransmissionQueueTime { gridPos+: { h: 8, w: 24, x: 0, y: 15 } }, + ] + ), + + /* + ------------------------- + Queue Manager Overview Rows + ------------------------- + */ + + queueManagerOverview: + g.panel.row.new('Queue manager overview') + + g.panel.row.withCollapsed(false) + + g.panel.row.withPanels( + [ + panels.qmgrActiveListeners { gridPos+: { w: 4 } }, + panels.qmgrActiveConnections { gridPos+: { w: 4 } }, + panels.qmgrQueues { gridPos+: { w: 4 } }, + panels.qmgrEstimatedMemoryUtilization { gridPos+: { w: 12 } }, + panels.qmgrStatusTable { gridPos+: { w: 8 } }, + panels.qmgrCpuUsage { gridPos+: { w: 8 } }, + panels.qmgrDiskUsage { gridPos+: { w: 8 } }, + panels.qmgrCommits { gridPos+: { w: 8 } }, + panels.qmgrPublishThroughput { gridPos+: { w: 8 } }, + panels.qmgrPublishedMessages { gridPos+: { w: 8 } }, + panels.qmgrExpiredMessages { gridPos+: { w: 8 } }, + panels.qmgrQueueOperations { gridPos+: { w: 16 } }, + ] + ), + + queueManagerLogs: + g.panel.row.new('Logs') + + g.panel.row.withCollapsed(false) + + g.panel.row.withPanels( + [ + panels.qmgrLogLatency { gridPos+: { w: 12 } }, + panels.qmgrLogUsage { gridPos+: { w: 12 } }, + ] + ), + + /* + ------------------------- + Queue Overview Rows + ------------------------- + */ + + queueOverview: + g.panel.row.new('Queue overview') + + g.panel.row.withCollapsed(false) + + g.panel.row.withPanels( + [ + panels.queueAverageQueueTime { gridPos+: { h: 8, w: 12 } }, + panels.queueExpiredMessages { gridPos+: { h: 8, w: 12 } }, + panels.queueDepth { gridPos+: { h: 8, w: 24 } }, + panels.queueOperationThroughput { gridPos+: { h: 8, w: 9 } }, + panels.queueOperations { gridPos+: { h: 8, w: 15 } }, + ] + ), + + /* + ------------------------- + Topics Overview Rows + ------------------------- + */ + + topicsRow: + g.panel.row.new('Topics') + + g.panel.row.withCollapsed(false) + + g.panel.row.withPanels( + [ + panels.topicMessagesReceived { gridPos+: { h: 6, w: 16 } }, + panels.topicTimeSinceLastMessage { gridPos+: { h: 6, w: 8 } }, + panels.topicSubscribers { gridPos+: { h: 6, w: 12 } }, + panels.topicPublishers { gridPos+: { h: 6, w: 12 } }, + ] + ), + + subscriptionsRow: + g.panel.row.new('Subscriptions') + + g.panel.row.withCollapsed(false) + + g.panel.row.withPanels( + [ + panels.subscriptionMessagesReceived { gridPos+: { h: 6, w: 24 } }, + panels.subscriptionStatus { gridPos+: { h: 10, w: 24 } }, + ] + ), + }, +} diff --git a/ibm-mq-mixin/signals/cluster.libsonnet b/ibm-mq-mixin/signals/cluster.libsonnet new file mode 100644 index 000000000..c90d36c98 --- /dev/null +++ b/ibm-mq-mixin/signals/cluster.libsonnet @@ -0,0 +1,263 @@ +function(this) { + filteringSelector: this.filteringSelector, + groupLabels: this.groupLabels, + instanceLabels: this.instanceLabels, + enableLokiLogs: this.enableLokiLogs, + aggLevel: 'none', + aggFunction: 'avg', + alertsInterval: '5m', + discoveryMetric: { + prometheus: 'ibmmq_qmgr_commit_count', + }, + signals: { + + clusters: { + name: 'Clusters', + type: 'raw', + description: 'The unique number of clusters being reported.', + unit: 'none', + sources: { + prometheus: { + expr: 'count(count(ibmmq_qmgr_commit_count{%(queriesSelector)s}) by (mq_cluster))', + legendCustomTemplate: '{{job}} - {{mq_cluster}}', + }, + }, + }, + + queueManagers: { + name: 'Queue managers', + type: 'raw', + description: 'The unique number of queue managers in the cluster being reported.', + unit: 'none', + sources: { + prometheus: { + expr: 'count(count(ibmmq_qmgr_commit_count{%(queriesSelector)s}) by (qmgr, mq_cluster))', + legendCustomTemplate: '', + }, + }, + }, + + topics: { + name: 'Topics', + type: 'raw', + description: 'The unique number of topics in the cluster.', + unit: 'none', + sources: { + prometheus: { + expr: 'count(count(ibmmq_topic_messages_received{%(queriesSelector)s}) by (topic, mq_cluster))', + legendCustomTemplate: '{{job}} - {{mq_cluster}}', + }, + }, + }, + + queues: { + name: 'Queues', + type: 'raw', + description: 'The unique number of queues in the cluster.', + unit: 'none', + sources: { + prometheus: { + expr: 'count(count(ibmmq_queue_depth{%(queriesSelector)s}) by (queue, mq_cluster))', + legendCustomTemplate: '', + }, + }, + }, + + queueOperationsMqset: { + name: 'Queue operations - MQSET', + nameShort: 'MQSET', + type: 'raw', + description: 'The number of MQSET queue operations of the cluster.', + unit: 'operations', + sources: { + prometheus: { + expr: 'sum by (mq_cluster) (ibmmq_queue_mqset_count{%(queriesSelector)s})', + legendCustomTemplate: 'MQSET', + }, + }, + }, + + queueOperationsMqinq: { + name: 'Queue operations - MQINQ', + nameShort: 'MQINQ', + type: 'raw', + description: 'The number of MQINQ queue operations of the cluster.', + unit: 'operations', + sources: { + prometheus: { + expr: 'sum by (mq_cluster) (ibmmq_queue_mqinq_count{%(queriesSelector)s})', + legendCustomTemplate: 'MQINQ', + }, + }, + }, + + queueOperationsMqget: { + name: 'Queue operations - MQGET', + nameShort: 'MQGET', + type: 'raw', + description: 'The number of MQGET queue operations of the cluster.', + unit: 'operations', + sources: { + prometheus: { + expr: 'sum by (mq_cluster) (ibmmq_queue_mqget_count{%(queriesSelector)s})', + legendCustomTemplate: 'MQGET', + }, + }, + }, + + queueOperationsMqopen: { + name: 'Queue operations - MQOPEN', + nameShort: 'MQOPEN', + type: 'raw', + description: 'The number of MQOPEN queue operations of the cluster.', + unit: 'operations', + sources: { + prometheus: { + expr: 'sum by (mq_cluster) (ibmmq_queue_mqopen_count{%(queriesSelector)s})', + legendCustomTemplate: 'MQOPEN', + }, + }, + }, + + queueOperationsMqclose: { + name: 'Queue operations - MQCLOSE', + nameShort: 'MQCLOSE', + type: 'raw', + description: 'The number of MQCLOSE queue operations of the cluster.', + unit: 'operations', + sources: { + prometheus: { + expr: 'sum by (mq_cluster) (ibmmq_queue_mqclose_count{%(queriesSelector)s})', + legendCustomTemplate: 'MQCLOSE', + }, + }, + }, + + queueOperationsMqput: { + name: 'Queue operations - MQPUT/MQPUT1', + nameShort: 'MQPUT/MQPUT1', + type: 'raw', + description: 'The number of MQPUT/MQPUT1 queue operations of the cluster.', + unit: 'operations', + sources: { + prometheus: { + expr: 'sum by (mq_cluster) (ibmmq_queue_mqput_mqput1_count{%(queriesSelector)s})', + legendCustomTemplate: 'MQPUT/MQPUT1', + }, + }, + }, + + clusterStatus: { + name: 'Cluster status', + type: 'gauge', + description: 'The status of the cluster.', + unit: 'short', + sources: { + prometheus: { + expr: 'ibmmq_cluster_suspend{%(queriesSelector)s}', + legendCustomTemplate: '{{job}} - {{mq_cluster}}', + valueMappings: [ + { + type: 'value', + options: { + '0': { + text: 'Not suspended', + color: 'green', + index: 0, + }, + '1': { + text: 'Suspended', + color: 'red', + index: 1, + }, + }, + }, + ], + }, + }, + }, + + queueManagerStatus: { + name: 'Queue manager status', + type: 'gauge', + description: 'The queue managers of the cluster displayed in a table.', + unit: 'short', + sources: { + prometheus: { + expr: 'ibmmq_qmgr_status{%(queriesSelector)s}', + legendCustomTemplate: '', + valueMappings: [ + { + type: 'value', + options: { + '-1': { + text: 'N/A', + color: 'dark-red', + index: 0, + }, + '0': { + text: 'Stopped', + color: 'red', + index: 1, + }, + '1': { + text: 'Starting', + color: 'light-green', + index: 2, + }, + '2': { + text: 'Running', + color: 'green', + index: 3, + }, + '3': { + text: 'Quiescing', + color: 'yellow', + index: 4, + }, + '4': { + text: 'Stopping', + color: 'light-red', + index: 5, + }, + '5': { + text: 'Standby', + color: 'yellow', + index: 6, + }, + }, + }, + ], + }, + }, + }, + + transmissionQueueTimeShort: { + name: 'Transmission queue time - short', + nameShort: 'Short', + type: 'gauge', + description: 'The time it takes for the messages to get through the transmission queue. (Long) - total time taken for messages to be transmitted over the channel, (Short) - an average, minimum, or maximum time taken to transmit messages over the channel in recent intervals.', + unit: 'µs', + sources: { + prometheus: { + expr: 'ibmmq_channel_xmitq_time_short{type="SENDER", %(queriesSelector)s}', + legendCustomTemplate: '{{channel}} - short', + }, + }, + }, + + transmissionQueueTimeLong: { + name: 'Transmission queue time - long', + nameShort: 'Long', + type: 'gauge', + description: 'The time it takes for the messages to get through the transmission queue. (Long) - total time taken for messages to be transmitted over the channel, (Short) - an average, minimum, or maximum time taken to transmit messages over the channel in recent intervals.', + unit: 'µs', + sources: { + prometheus: { + expr: 'ibmmq_channel_xmitq_time_long{type=~"SENDER", %(queriesSelector)s}', + legendCustomTemplate: '{{channel}} - long', + }, + }, + }, + }, +} diff --git a/ibm-mq-mixin/signals/queue-manager.libsonnet b/ibm-mq-mixin/signals/queue-manager.libsonnet new file mode 100644 index 000000000..d36d31c9e --- /dev/null +++ b/ibm-mq-mixin/signals/queue-manager.libsonnet @@ -0,0 +1,322 @@ +function(this) { + filteringSelector: this.filteringSelector, + groupLabels: this.groupLabels, + instanceLabels: this.instanceLabels, + enableLokiLogs: this.enableLokiLogs, + aggLevel: 'none', + aggFunction: 'avg', + alertsInterval: '5m', + discoveryMetric: { + prometheus: 'ibmmq_qmgr_commit_count', + }, + signals: { + + activeListeners: { + name: 'Active listeners', + type: 'gauge', + description: 'The number of active listeners for the queue manager.', + unit: 'none', + sources: { + prometheus: { + expr: 'ibmmq_qmgr_active_listeners{%(queriesSelector)s}', + legendCustomTemplate: '', + }, + }, + }, + + averageQueueTime: { + name: 'Average queue time', + type: 'gauge', + description: 'The average amount of time a message spends in the queue.', + unit: 's', + sources: { + prometheus: { + expr: 'ibmmq_qmgr_average_queue_time{%(queriesSelector)s}', + legendCustomTemplate: '', + }, + }, + }, + + queueDepth: { + name: 'Queue depth', + type: 'gauge', + description: 'The depth of the queue.', + unit: 'none', + sources: { + prometheus: { + expr: 'ibmmq_qmgr_queue_depth{%(queriesSelector)s}', + legendCustomTemplate: '', + }, + }, + }, + + activeConnections: { + name: 'Active connections', + type: 'gauge', + description: 'The number of active connections for the queue manager.', + unit: 'none', + sources: { + prometheus: { + expr: 'ibmmq_qmgr_connection_count{%(queriesSelector)s}', + legendCustomTemplate: '', + }, + }, + }, + + queues: { + name: 'Queues', + type: 'raw', + description: 'The unique number of queues being managed by the queue manager.', + unit: 'none', + sources: { + prometheus: { + expr: 'count(count(ibmmq_queue_depth{%(queriesSelector)s}) by (queue, mq_cluster, qmgr))', + legendCustomTemplate: '', + }, + }, + }, + + estimatedMemoryUtilization: { + name: 'Estimated memory utilization', + type: 'raw', + description: 'The estimated memory usage of the queue managers.', + unit: 'percentunit', + sources: { + prometheus: { + expr: '(ibmmq_qmgr_ram_total_estimate_for_queue_manager_bytes{%(queriesSelector)s}/ibmmq_qmgr_ram_total_bytes{%(queriesSelector)s})', + legendCustomTemplate: '{{mq_cluster}} - {{qmgr}}', + }, + }, + }, + + queueManagerStatusUptime: { + name: 'Queue manager uptime', + nameShort: 'Uptime', + type: 'gauge', + description: 'The uptime of the queue manager.', + unit: 's', + sources: { + prometheus: { + expr: 'ibmmq_qmgr_uptime{%(queriesSelector)s}', + legendCustomTemplate: 'Uptime', + }, + }, + }, + + queueManagerStatus: { + name: 'Queue manager status', + type: 'gauge', + description: 'A table showing the status and uptime of the queue manager.', + unit: 'short', + sources: { + prometheus: { + expr: 'ibmmq_qmgr_status{%(queriesSelector)s}', + legendCustomTemplate: 'Status', + }, + }, + }, + + cpuUsageUser: { + name: 'CPU usage - user', + nameShort: 'User', + type: 'gauge', + description: 'The user CPU usage of the queue manager.', + unit: 'percent', + sources: { + prometheus: { + expr: 'ibmmq_qmgr_user_cpu_time_percentage{%(queriesSelector)s}', + legendCustomTemplate: '{{mq_cluster}} - {{qmgr}} - user', + }, + }, + }, + + cpuUsageSystem: { + name: 'CPU usage - system', + nameShort: 'System', + type: 'gauge', + description: 'The system CPU usage of the queue manager.', + unit: 'percent', + sources: { + prometheus: { + expr: 'ibmmq_qmgr_system_cpu_time_percentage{%(queriesSelector)s}', + legendCustomTemplate: '{{mq_cluster}} - {{qmgr}} - system', + }, + }, + }, + + diskUsage: { + name: 'Disk usage', + type: 'gauge', + description: 'The disk allocated to the queue manager that is being used.', + unit: 'decbytes', + sources: { + prometheus: { + expr: 'ibmmq_qmgr_queue_manager_file_system_in_use_bytes{%(queriesSelector)s}', + legendCustomTemplate: '{{mq_cluster}} - {{qmgr}}', + }, + }, + }, + + commits: { + name: 'Commits', + type: 'gauge', + description: 'The commits of the queue manager.', + unit: 'none', + sources: { + prometheus: { + expr: 'ibmmq_qmgr_commit_count{%(queriesSelector)s}', + legendCustomTemplate: '{{mq_cluster}} - {{qmgr}}', + }, + }, + }, + + publishThroughput: { + name: 'Publish throughput', + type: 'gauge', + description: 'The amount of data being pushed from the queue manager to subscribers.', + unit: 'decbytes', + sources: { + prometheus: { + expr: 'ibmmq_qmgr_published_to_subscribers_bytes{%(queriesSelector)s}', + legendCustomTemplate: '{{mq_cluster}} - {{qmgr}}', + }, + }, + }, + + publishedMessages: { + name: 'Published messages', + type: 'gauge', + description: 'The number of messages being published by the queue manager.', + unit: 'none', + sources: { + prometheus: { + expr: 'ibmmq_qmgr_published_to_subscribers_message_count{%(queriesSelector)s}', + legendCustomTemplate: '{{mq_cluster}} - {{qmgr}}', + }, + }, + }, + + expiredMessages: { + name: 'Expired messages', + type: 'gauge', + description: 'The expired messages of the queue manager.', + unit: 'none', + sources: { + prometheus: { + expr: 'ibmmq_qmgr_expired_message_count{%(queriesSelector)s}', + legendCustomTemplate: '{{mq_cluster}} - {{qmgr}}', + }, + }, + }, + + queueOperationsMqset: { + name: 'Queue operations - MQSET', + nameShort: 'MQSET', + type: 'raw', + description: 'The number of MQSET queue operations of the queue manager.', + unit: 'operations', + sources: { + prometheus: { + expr: 'sum by (mq_cluster, qmgr, job) (ibmmq_queue_mqset_count{%(queriesSelector)s})', + legendCustomTemplate: '{{mq_cluster}} - {{qmgr}} - MQSET', + }, + }, + }, + + queueOperationsMqinq: { + name: 'Queue operations - MQINQ', + nameShort: 'MQINQ', + type: 'raw', + description: 'The number of MQINQ queue operations of the queue manager.', + unit: 'operations', + sources: { + prometheus: { + expr: 'sum by (mq_cluster, qmgr, job) (ibmmq_queue_mqinq_count{%(queriesSelector)s})', + legendCustomTemplate: '{{mq_cluster}} - {{qmgr}} - MQINQ', + }, + }, + }, + + queueOperationsMqget: { + name: 'Queue operations - MQGET', + nameShort: 'MQGET', + type: 'raw', + description: 'The number of MQGET queue operations of the queue manager.', + unit: 'operations', + sources: { + prometheus: { + expr: 'sum by (mq_cluster, qmgr, job) (ibmmq_queue_mqget_count{%(queriesSelector)s})', + legendCustomTemplate: '{{mq_cluster}} - {{qmgr}} - MQGET', + }, + }, + }, + + queueOperationsMqopen: { + name: 'Queue operations - MQOPEN', + nameShort: 'MQOPEN', + type: 'raw', + description: 'The number of MQOPEN queue operations of the queue manager.', + unit: 'operations', + sources: { + prometheus: { + expr: 'sum by (mq_cluster, qmgr, job) (ibmmq_queue_mqopen_count{%(queriesSelector)s})', + legendCustomTemplate: '{{mq_cluster}} - {{qmgr}} - MQOPEN', + }, + }, + }, + + queueOperationsMqclose: { + name: 'Queue operations - MQCLOSE', + nameShort: 'MQCLOSE', + type: 'raw', + description: 'The number of MQCLOSE queue operations of the queue manager.', + unit: 'operations', + sources: { + prometheus: { + expr: 'sum by (mq_cluster, qmgr, job) (ibmmq_queue_mqclose_count{%(queriesSelector)s})', + legendCustomTemplate: '{{mq_cluster}} - {{qmgr}} - MQCLOSE', + }, + }, + }, + + queueOperationsMqput: { + name: 'Queue operations - MQPUT/MQPUT1', + nameShort: 'MQPUT/MQPUT1', + type: 'raw', + description: 'The number of MQPUT/MQPUT1 queue operations of the queue manager.', + unit: 'operations', + sources: { + prometheus: { + expr: 'sum by (mq_cluster, qmgr, job) (ibmmq_queue_mqput_mqput1_count{%(queriesSelector)s})', + legendCustomTemplate: '{{mq_cluster}} - {{qmgr}} - MQPUT/MQPUT1', + }, + }, + }, + + logLatency: { + name: 'Log latency', + type: 'gauge', + description: 'The recent latency of log writes.', + unit: 's', + sources: { + prometheus: { + expr: 'ibmmq_qmgr_log_write_latency_seconds{%(queriesSelector)s}', + legendCustomTemplate: '{{mq_cluster}} - {{qmgr}}', + }, + }, + }, + + logUsage: { + name: 'Log usage', + type: 'gauge', + description: 'The amount of data on the filesystem occupied by queue manager logs.', + unit: 'decbytes', + sources: { + prometheus: { + expr: 'ibmmq_qmgr_log_in_use_bytes{%(queriesSelector)s}', + legendCustomTemplate: '{{mq_cluster}} - {{qmgr}}', + }, + }, + }, + }, +} diff --git a/ibm-mq-mixin/signals/queue.libsonnet b/ibm-mq-mixin/signals/queue.libsonnet new file mode 100644 index 000000000..fb3db9554 --- /dev/null +++ b/ibm-mq-mixin/signals/queue.libsonnet @@ -0,0 +1,243 @@ +function(this) { + filteringSelector: this.filteringSelector, + groupLabels: this.groupLabels, + instanceLabels: this.instanceLabels, + enableLokiLogs: this.enableLokiLogs, + aggLevel: 'none', + aggFunction: 'avg', + alertsInterval: '5m', + discoveryMetric: { + prometheus: 'ibmmq_queue_depth', + }, + signals: { + + averageQueueTime: { + name: 'Average queue time', + type: 'gauge', + description: 'The average amount of time a message spends in the queue.', + unit: 's', + sources: { + prometheus: { + expr: 'ibmmq_queue_average_queue_time_seconds{%(queriesSelector)s, queue=~"$queue"}', + legendCustomTemplate: '{{mq_cluster}} - {{qmgr}} - {{queue}}', + }, + }, + }, + + expiredMessages: { + name: 'Expired messages', + type: 'gauge', + description: 'The expired messages of the queue.', + unit: 'none', + sources: { + prometheus: { + expr: 'ibmmq_queue_expired_messages{%(queriesSelector)s, queue=~"$queue"}', + legendCustomTemplate: '{{mq_cluster}} - {{qmgr}} - {{queue}}', + }, + }, + }, + + queueDepth: { + name: 'Queue depth', + type: 'gauge', + description: 'The depth of the queue.', + unit: 'none', + sources: { + prometheus: { + expr: 'ibmmq_queue_depth{%(queriesSelector)s, queue=~"$queue"}', + legendCustomTemplate: '{{mq_cluster}} - {{qmgr}} - {{queue}}', + }, + }, + }, + + oldestMessageAge: { + name: 'Oldest message age', + type: 'gauge', + description: 'The oldest message age of the queue.', + unit: 's', + sources: { + prometheus: { + expr: 'ibmmq_queue_oldest_message_age{%(queriesSelector)s, queue=~"$queue"}', + legendCustomTemplate: '{{mq_cluster}} - {{qmgr}} - {{queue}}', + }, + }, + }, + + inputOutputRate: { + name: 'Input/output rate', + type: 'gauge', + description: 'The input/output rate of the queue.', + unit: 'none', + sources: { + prometheus: { + expr: 'ibmmq_queue_input_output_rate{%(queriesSelector)s, queue=~"$queue"}', + legendCustomTemplate: '{{mq_cluster}} - {{qmgr}} - {{queue}}', + }, + }, + }, + + timeOnQueue: { + name: 'Time on queue', + type: 'gauge', + description: 'The average time messages spent on the queue.', + unit: 'µs', + sources: { + prometheus: { + expr: 'ibmmq_queue_time_on_queue_seconds{%(queriesSelector)s, queue=~"$queue"}', + legendCustomTemplate: '{{mq_cluster}} - {{qmgr}} - {{queue}}', + }, + }, + }, + + purgedMessages: { + name: 'Purged messages', + type: 'gauge', + description: 'The purged messages from the queue.', + unit: 'none', + sources: { + prometheus: { + expr: 'ibmmq_queue_purged_messages{%(queriesSelector)s, queue=~"$queue"}', + legendCustomTemplate: '{{mq_cluster}} - {{qmgr}} - {{queue}}', + }, + }, + }, + + inputMessagesBytes: { + name: 'Input messages - bytes', + nameShort: 'Input bytes', + type: 'gauge', + description: 'The input messages of the queue in bytes.', + unit: 'decbytes', + sources: { + prometheus: { + expr: 'ibmmq_queue_mqput_mqput1_bytes{%(queriesSelector)s, queue=~"$queue"}', + legendCustomTemplate: '{{mq_cluster}} - {{qmgr}} - {{queue}}', + }, + }, + }, + + outputMessagesBytes: { + name: 'Output messages - bytes', + nameShort: 'Output bytes', + type: 'gauge', + description: 'The output messages of the queue in bytes.', + unit: 'decbytes', + sources: { + prometheus: { + expr: 'ibmmq_queue_destructive_mqget_bytes{%(queriesSelector)s, queue=~"$queue"}', + legendCustomTemplate: '{{mq_cluster}} - {{qmgr}} - {{queue}}', + }, + }, + }, + + mqgetBytes: { + name: 'MQGET bytes', + type: 'gauge', + description: 'The amount of throughput going through the queue via MQGET operations.', + unit: 'decbytes', + sources: { + prometheus: { + expr: 'ibmmq_queue_mqget_bytes{%(queriesSelector)s, queue=~"$queue"}', + legendCustomTemplate: '{{qmgr}} - {{queue}} - MQGET', + }, + }, + }, + + mqputBytes: { + name: 'MQPUT bytes', + type: 'gauge', + description: 'The amount of throughput going through the queue via MQPUT operations.', + unit: 'decbytes', + sources: { + prometheus: { + expr: 'ibmmq_queue_mqput_bytes{%(queriesSelector)s, queue=~"$queue"}', + legendCustomTemplate: '{{qmgr}} - {{queue}} - MQPUT', + }, + }, + }, + + mqsetCount: { + name: 'MQSET operations', + nameShort: 'MQSET', + type: 'gauge', + description: 'The number of MQSET queue operations.', + unit: 'operations', + sources: { + prometheus: { + expr: 'ibmmq_queue_mqset_count{%(queriesSelector)s, queue=~"$queue"}', + legendCustomTemplate: '{{qmgr}} - {{queue}} - MQSET', + }, + }, + }, + + mqinqCount: { + name: 'MQINQ operations', + nameShort: 'MQINQ', + type: 'gauge', + description: 'The number of MQINQ queue operations.', + unit: 'operations', + sources: { + prometheus: { + expr: 'ibmmq_queue_mqinq_count{%(queriesSelector)s, queue=~"$queue"}', + legendCustomTemplate: '{{qmgr}} - {{queue}} - MQINQ', + }, + }, + }, + + mqgetCount: { + name: 'MQGET operations', + nameShort: 'MQGET', + type: 'gauge', + description: 'The number of MQGET queue operations.', + unit: 'operations', + sources: { + prometheus: { + expr: 'ibmmq_queue_mqget_count{%(queriesSelector)s, queue=~"$queue"}', + legendCustomTemplate: '{{qmgr}} - {{queue}} - MQGET', + }, + }, + }, + + mqopenCount: { + name: 'MQOPEN operations', + nameShort: 'MQOPEN', + type: 'gauge', + description: 'The number of MQOPEN queue operations.', + unit: 'operations', + sources: { + prometheus: { + expr: 'ibmmq_queue_mqopen_count{%(queriesSelector)s, queue=~"$queue"}', + legendCustomTemplate: '{{qmgr}} - {{queue}} - MQOPEN', + }, + }, + }, + + mqcloseCount: { + name: 'MQCLOSE operations', + nameShort: 'MQCLOSE', + type: 'gauge', + description: 'The number of MQCLOSE queue operations.', + unit: 'operations', + sources: { + prometheus: { + expr: 'ibmmq_queue_mqclose_count{%(queriesSelector)s, queue=~"$queue"}', + legendCustomTemplate: '{{qmgr}} - {{queue}} - MQCLOSE', + }, + }, + }, + + mqputMqput1Count: { + name: 'MQPUT/MQPUT1 operations', + nameShort: 'MQPUT/MQPUT1', + type: 'gauge', + description: 'The number of MQPUT/MQPUT1 queue operations.', + unit: 'operations', + sources: { + prometheus: { + expr: 'ibmmq_queue_mqput_mqput1_count{%(queriesSelector)s, queue=~"$queue"}', + legendCustomTemplate: '{{qmgr}} - {{queue}} - MQPUT/MQPUT1', + }, + }, + }, + }, +} diff --git a/ibm-mq-mixin/signals/topics.libsonnet b/ibm-mq-mixin/signals/topics.libsonnet new file mode 100644 index 000000000..8431426d0 --- /dev/null +++ b/ibm-mq-mixin/signals/topics.libsonnet @@ -0,0 +1,131 @@ +function(this) { + filteringSelector: this.filteringSelector, + groupLabels: this.groupLabels, + instanceLabels: this.instanceLabels, + enableLokiLogs: this.enableLokiLogs, + aggLevel: 'none', + aggFunction: 'avg', + alertsInterval: '5m', + discoveryMetric: { + prometheus: 'ibmmq_topic_messages_received', + }, + signals: { + + topicMessagesReceived: { + name: 'Topic messages received', + type: 'gauge', + description: 'Received messages per topic.', + unit: 'none', + sources: { + prometheus: { + expr: 'ibmmq_topic_messages_received{%(queriesSelector)s}', + legendCustomTemplate: '{{mq_cluster}} - {{qmgr}} - {{topic}}', + }, + }, + }, + + topicMessagesPut: { + name: 'Topic messages put', + type: 'gauge', + description: 'Put messages per topic.', + unit: 'none', + sources: { + prometheus: { + expr: 'ibmmq_topic_messages_put{%(queriesSelector)s}', + legendCustomTemplate: '{{mq_cluster}} - {{qmgr}} - {{topic}}', + }, + }, + }, + + topicBytesReceived: { + name: 'Topic bytes received', + type: 'gauge', + description: 'Received bytes per topic.', + unit: 'decbytes', + sources: { + prometheus: { + expr: 'ibmmq_topic_bytes_received{%(queriesSelector)s}', + legendCustomTemplate: '{{mq_cluster}} - {{qmgr}} - {{topic}}', + }, + }, + }, + + topicBytesPut: { + name: 'Topic bytes put', + type: 'gauge', + description: 'Put bytes per topic.', + unit: 'decbytes', + sources: { + prometheus: { + expr: 'ibmmq_topic_bytes_put{%(queriesSelector)s}', + legendCustomTemplate: '{{mq_cluster}} - {{qmgr}} - {{topic}}', + }, + }, + }, + + timeSinceLastMessage: { + name: 'Time since last message', + type: 'gauge', + description: 'The time since the topic last received a message.', + unit: 's', + sources: { + prometheus: { + expr: 'ibmmq_topic_time_since_msg_received{%(queriesSelector)s}', + legendCustomTemplate: '{{mq_cluster}} - {{qmgr}} - {{topic}}', + }, + }, + }, + + subscribers: { + name: 'Topic subscribers', + type: 'gauge', + description: 'The number of subscribers per topic.', + unit: 'none', + sources: { + prometheus: { + expr: 'ibmmq_topic_subscriber_count{%(queriesSelector)s}', + legendCustomTemplate: '{{mq_cluster}} - {{qmgr}} - {{topic}}', + }, + }, + }, + + publishers: { + name: 'Topic publishers', + type: 'gauge', + description: 'The number of publishers per topic.', + unit: 'none', + sources: { + prometheus: { + expr: 'ibmmq_topic_publisher_count{%(queriesSelector)s}', + legendCustomTemplate: '{{mq_cluster}} - {{qmgr}} - {{topic}}', + }, + }, + }, + + subscriptionMessagesReceived: { + name: 'Subscription messages received', + type: 'gauge', + description: 'The number of messages a subscription receives.', + unit: 'none', + sources: { + prometheus: { + expr: 'ibmmq_subscription_messsages_received{%(queriesSelector)s}', + legendCustomTemplate: '{{mq_cluster}} - {{qmgr}} - {{subscription}}', + }, + }, + }, + + subscriptionTimeSinceMessagePublished: { + name: 'Subscription time since message published', + type: 'gauge', + description: 'Time since last subscription message.', + unit: 's', + sources: { + prometheus: { + expr: 'ibmmq_subscription_time_since_message_published{%(queriesSelector)s}', + legendCustomTemplate: '{{label_name}}', + }, + }, + }, + }, +}