diff --git a/apache-activemq-mixin/.lint b/apache-activemq-mixin/.lint index 5ed377968..c9caaf914 100644 --- a/apache-activemq-mixin/.lint +++ b/apache-activemq-mixin/.lint @@ -17,4 +17,4 @@ exclusions: target-promql-rule: reason: "Linter does not support selector variable value as a scalar in top-k PromQL queries." template-label-promql-rule: - reason: "Defining a selector for the value of top-k requires a predefined label that the linter considers invalid." \ No newline at end of file + reason: "Defining a selector for the value of top-k requires a predefined label that the linter considers invalid." diff --git a/apache-activemq-mixin/alerts/alerts.libsonnet b/apache-activemq-mixin/alerts.libsonnet similarity index 89% rename from apache-activemq-mixin/alerts/alerts.libsonnet rename to apache-activemq-mixin/alerts.libsonnet index 92f062f92..d67ad59ff 100644 --- a/apache-activemq-mixin/alerts/alerts.libsonnet +++ b/apache-activemq-mixin/alerts.libsonnet @@ -1,14 +1,14 @@ { - prometheusAlerts+:: { - groups+: [ + new(this): { + groups: [ { name: 'apache-activemq-alerts', rules: [ { alert: 'ApacheActiveMQHighTopicMemoryUsage', expr: ||| - sum without (destination) (activemq_topic_memory_percent_usage{destination!~"ActiveMQ.Advisory.*"}) > %(alertsHighTopicMemoryUsage)s - ||| % $._config, + sum without (destination) (activemq_topic_memory_percent_usage) > %(alertsHighTopicMemoryUsage)s + ||| % this.config, 'for': '5m', labels: { severity: 'warning', @@ -19,14 +19,14 @@ ( '{{ printf "%%.0f" $value }} percent of memory used by topics on {{$labels.instance}} in cluster {{$labels.activemq_cluster}}, ' + 'which is above the threshold of %(alertsHighTopicMemoryUsage)s percent.' - ) % $._config, + ) % this.config, }, }, { alert: 'ApacheActiveMQHighQueueMemoryUsage', expr: ||| sum without (destination) (activemq_queue_memory_percent_usage) > %(alertsHighQueueMemoryUsage)s - ||| % $._config, + ||| % this.config, 'for': '5m', labels: { severity: 'warning', @@ -37,14 +37,14 @@ ( '{{ printf "%%.0f" $value }} percent of memory used by queues on {{$labels.instance}} in cluster {{$labels.activemq_cluster}}, ' + 'which is above the threshold of %(alertsHighQueueMemoryUsage)s percent.' - ) % $._config, + ) % this.config, }, }, { alert: 'ApacheActiveMQHighStoreMemoryUsage', expr: ||| activemq_store_usage_ratio > %(alertsHighStoreMemoryUsage)s - ||| % $._config, + ||| % this.config, 'for': '5m', labels: { severity: 'warning', @@ -55,14 +55,14 @@ ( '{{ printf "%%.0f" $value }} percent of store memory used on {{$labels.instance}} in cluster {{$labels.activemq_cluster}}, ' + 'which is above the threshold of %(alertsHighStoreMemoryUsage)s percent.' - ) % $._config, + ) % this.config, }, }, { alert: 'ApacheActiveMQHighTemporaryMemoryUsage', expr: ||| activemq_temp_usage_ratio > %(alertsHighTemporaryMemoryUsage)s - ||| % $._config, + ||| % this.config, 'for': '5m', labels: { severity: 'warning', @@ -73,7 +73,7 @@ ( '{{ printf "%%.0f" $value }} percent of temporary memory used on {{$labels.instance}} in cluster {{$labels.activemq_cluster}}, ' + 'which is above the threshold of %(alertsHighTemporaryMemoryUsage)s percent.' - ) % $._config, + ) % this.config, }, }, ], diff --git a/apache-activemq-mixin/config.libsonnet b/apache-activemq-mixin/config.libsonnet index fec15d93f..616369c77 100644 --- a/apache-activemq-mixin/config.libsonnet +++ b/apache-activemq-mixin/config.libsonnet @@ -1,23 +1,38 @@ { - _config+:: { - enableMultiCluster: false, - activemqSelector: if self.enableMultiCluster then 'job=~"$job", cluster=~"$cluster"' else 'job=~"$job"', - activemqAlertsSelector: if self.enableMultiCluster then 'job=~"${job:regex}", cluster=~"${cluster:regex}"' else 'job=~"${job:regex}"', - dashboardTags: ['apache-activemq-mixin'], - dashboardPeriod: 'now-30m', - dashboardTimezone: 'default', - dashboardRefresh: '1m', - grafanaDashboardIDs: { - 'apache-activemq-logs-overview.json': 'apache-activemq-logs', - }, + local this = self, + enableMultiCluster: false, + filteringSelector: 'job=~"integrations/apache-activemq"', + groupLabels: ['job', 'cluster'], + instanceLabels: ['instance'], + activemqLabels: ['activemq_cluster'], - // alerts thresholds - alertsHighTopicMemoryUsage: 70, // % - alertsHighQueueMemoryUsage: 70, // % - alertsHighStoreMemoryUsage: 70, // % - alertsHighTemporaryMemoryUsage: 70, // % + dashboardTags: [self.uid], + legendLabels: ['instance', 'activemq_cluster'], + uid: 'apache-activemq', + dashboardNamePrefix: 'Apache ActiveMQ', - enableLokiLogs: true, - filterSelector: 'job=~"integrations/apache-activemq"', + // additional params + dashboardPeriod: 'now-30m', + dashboardTimezone: 'default', + dashboardRefresh: '1m', + metricsSource: 'prometheus', + + // logs lib related + enableLokiLogs: true, + logLabels: self.groupLabels + self.instanceLabels + self.activemqLabels, + extraLogLabels: [], // Required by logs-lib + logsVolumeGroupBy: 'level', + showLogsVolume: true, + + // alert thresholds + alertsHighTopicMemoryUsage: 70, // % + alertsHighQueueMemoryUsage: 70, // % + alertsHighStoreMemoryUsage: 70, // % + alertsHighTemporaryMemoryUsage: 70, // % + + signals+: { + broker: (import './signals/broker.libsonnet')(this), + queues: (import './signals/queues.libsonnet')(this), + topics: (import './signals/topics.libsonnet')(this), }, } diff --git a/apache-activemq-mixin/dashboards.libsonnet b/apache-activemq-mixin/dashboards.libsonnet new file mode 100644 index 000000000..cc1204f60 --- /dev/null +++ b/apache-activemq-mixin/dashboards.libsonnet @@ -0,0 +1,131 @@ +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; + + { + 'apache-activemq-cluster-overview.json': + g.dashboard.new(prefix + ' overview') + + g.dashboard.withPanels( + g.util.panel.resolveCollapsedFlagOnRows( + g.util.grid.wrapPanels( + [ + this.grafana.rows.broker + g.panel.row.withCollapsed(false), + this.grafana.rows.queues + g.panel.row.withCollapsed(false), + this.grafana.rows.topics + g.panel.row.withCollapsed(false), + ], + ), + ) + ) + + root.applyCommon( + vars.multiInstance, + uid + '_overview', + tags, + links { activemqOverview+:: {} }, + annotations, + timezone, + refresh, + period + ), + + 'apache-activemq-queue-overview.json': + g.dashboard.new(prefix + ' queues') + + g.dashboard.withPanels( + g.util.panel.resolveCollapsedFlagOnRows( + g.util.grid.wrapPanels( + [ + this.grafana.rows.queues + g.panel.row.withCollapsed(false), + ] + ), + ) + ) + + root.applyCommon( + vars.multiInstance, + uid + '_queues', + tags, + links { activemqQueues+:: {} }, + annotations, + timezone, + refresh, + period + ), + + 'apache-activemq-topic-overview.json': + g.dashboard.new(prefix + ' topics') + + g.dashboard.withPanels( + g.util.panel.resolveCollapsedFlagOnRows( + g.util.grid.wrapPanels( + [ + this.grafana.rows.topics + g.panel.row.withCollapsed(false), + ] + ), + ) + ) + + root.applyCommon( + vars.multiInstance, + uid + '_topics', + tags, + links { activemqTopics+:: {} }, + annotations, + timezone, + refresh, + period + ), + + } + + + if this.config.enableLokiLogs then + { + 'apache-activemq-logs.json': + logslib.new( + prefix + ' logs', + datasourceName=this.grafana.variables.datasources.loki.name, + datasourceRegex=this.grafana.variables.datasources.loki.regex, + filterSelector=this.config.filteringSelector, + labels=this.config.groupLabels + this.config.extraLogLabels, + formatParser=null, + showLogsVolume=this.config.showLogsVolume, + ) + { + dashboards+: + { + logs+: + root.applyCommon(super.logs.templating.list, uid=uid + '-logs', tags=tags, links=links { logs+:: {} }, 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/apache-activemq-mixin/dashboards/apache-activemq-cluster-overview.libsonnet b/apache-activemq-mixin/dashboards/apache-activemq-cluster-overview.libsonnet deleted file mode 100644 index 8be239572..000000000 --- a/apache-activemq-mixin/dashboards/apache-activemq-cluster-overview.libsonnet +++ /dev/null @@ -1,623 +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 dashboardUid = 'apache-activemq-cluster-overview'; - -local promDatasourceName = 'prometheus_datasource'; - -local promDatasource = { - uid: '${%s}' % promDatasourceName, -}; - -local clusterCountPanel(matcher) = { - datasource: promDatasource, - targets: [ - prometheus.target( - 'count (activemq_memory_usage_ratio{' + matcher + '})', - datasource=promDatasource, - legendFormat='__auto', - ), - ], - type: 'stat', - title: 'Clusters', - description: 'Number of clusters that are reporting metrics from ActiveMQ.', - fieldConfig: { - defaults: { - color: { - mode: 'fixed', - }, - mappings: [], - thresholds: { - mode: 'absolute', - steps: [ - { - color: 'green', - value: null, - }, - ], - }, - unit: 'none', - }, - overrides: [], - }, - options: { - colorMode: 'none', - graphMode: 'area', - justifyMode: 'auto', - orientation: 'auto', - reduceOptions: { - calcs: [ - 'lastNotNull', - ], - fields: '', - values: false, - }, - textMode: 'auto', - }, - pluginVersion: '10.2.0-60139', -}; - -local brokerCountPanel(matcher) = { - datasource: promDatasource, - targets: [ - prometheus.target( - 'count (activemq_memory_usage_ratio{' + matcher + '})', - datasource=promDatasource, - legendFormat='__auto', - ), - ], - type: 'stat', - title: 'Brokers', - description: 'Number of broker instances across clusters.', - fieldConfig: { - defaults: { - color: { - mode: 'fixed', - }, - mappings: [], - thresholds: { - mode: 'absolute', - steps: [ - { - color: 'green', - value: null, - }, - ], - }, - unit: 'none', - }, - overrides: [], - }, - options: { - colorMode: 'none', - graphMode: 'area', - justifyMode: 'auto', - orientation: 'auto', - reduceOptions: { - calcs: [ - 'lastNotNull', - ], - fields: '', - values: false, - }, - textMode: 'auto', - }, - pluginVersion: '10.2.0-60139', -}; - -local producerCountPanel(matcher) = { - datasource: promDatasource, - targets: [ - prometheus.target( - 'sum (activemq_queue_producer_count{' + matcher + '}) + sum (activemq_topic_producer_count{' + matcher + ',destination!~"ActiveMQ.Advisory.*"})', - datasource=promDatasource, - legendFormat='__auto', - ), - ], - type: 'stat', - title: 'Producers', - description: 'Number of message producers active on destinations across clusters.', - fieldConfig: { - defaults: { - color: { - mode: 'fixed', - }, - mappings: [], - thresholds: { - mode: 'absolute', - steps: [ - { - color: 'green', - value: null, - }, - ], - }, - unit: 'none', - }, - overrides: [], - }, - options: { - colorMode: 'none', - graphMode: 'area', - justifyMode: 'auto', - orientation: 'auto', - reduceOptions: { - calcs: [ - 'lastNotNull', - ], - fields: '', - values: false, - }, - textMode: 'auto', - }, - pluginVersion: '10.2.0-60139', -}; - -local consumerCountPanel(matcher) = { - datasource: promDatasource, - targets: [ - prometheus.target( - 'sum (activemq_queue_consumer_count{' + matcher + '}) + sum (activemq_topic_consumer_count{' + matcher + ',destination!~"ActiveMQ.Advisory.*"})', - datasource=promDatasource, - legendFormat='__auto', - ), - ], - type: 'stat', - title: 'Consumers', - description: 'The number of consumers subscribed to destinations across clusters.', - fieldConfig: { - defaults: { - color: { - mode: 'fixed', - }, - mappings: [], - thresholds: { - mode: 'absolute', - steps: [ - { - color: 'green', - value: null, - }, - ], - }, - unit: 'none', - }, - overrides: [], - }, - options: { - colorMode: 'none', - graphMode: 'area', - justifyMode: 'auto', - orientation: 'auto', - reduceOptions: { - calcs: [ - 'lastNotNull', - ], - fields: '', - values: false, - }, - textMode: 'auto', - }, - pluginVersion: '10.2.0-60139', -}; - -local enqueueCountPanel(matcher) = { - datasource: promDatasource, - targets: [ - prometheus.target( - 'sum by (activemq_cluster, job) (increase(activemq_queue_enqueue_count{' + matcher + '}[$__interval:])) + sum by (activemq_cluster, job) (increase(activemq_topic_enqueue_count{' + matcher + ', destination!~"ActiveMQ.Advisory.*"}[$__interval:]))', - datasource=promDatasource, - legendFormat='{{activemq_cluster}}', - interval='1m', - ), - ], - type: 'timeseries', - title: 'Enqueue / $__interval', - description: 'Number of messages that have been sent to destinations in a cluster', - fieldConfig: { - defaults: { - color: { - fixedColor: '#C8F2C2', - mode: 'palette-classic', - }, - custom: { - axisCenteredZero: false, - axisColorMode: 'text', - axisLabel: '', - axisPlacement: 'auto', - axisShow: false, - barAlignment: 0, - drawStyle: 'line', - fillOpacity: 25, - gradientMode: 'none', - hideFrom: { - legend: false, - tooltip: false, - viz: false, - }, - insertNulls: false, - lineInterpolation: 'smooth', - lineWidth: 2, - 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, - }, - ], - }, - unit: 'none', - }, - overrides: [], - }, - options: { - legend: { - calcs: [], - displayMode: 'list', - placement: 'right', - showLegend: true, - }, - tooltip: { - mode: 'multi', - sort: 'desc', - }, - }, -}; - -local dequeueCountPanel(matcher) = { - datasource: promDatasource, - targets: [ - prometheus.target( - 'sum by (activemq_cluster, job) (increase(activemq_queue_dequeue_count{' + matcher + '}[$__interval:])) + sum by (activemq_cluster, job) (increase(activemq_topic_dequeue_count{' + matcher + ', destination!~"ActiveMQ.Advisory.*"}[$__interval:]))', - datasource=promDatasource, - legendFormat='{{activemq_cluster}}', - interval='1m', - ), - ], - type: 'timeseries', - title: 'Dequeue / $__interval', - description: 'Number of messages that have been acknowledged (and removed) from destinations in a cluster.', - fieldConfig: { - defaults: { - color: { - mode: 'palette-classic', - }, - custom: { - axisCenteredZero: false, - axisColorMode: 'text', - axisLabel: '', - axisPlacement: 'auto', - axisShow: false, - barAlignment: 0, - drawStyle: 'line', - fillOpacity: 25, - gradientMode: 'none', - hideFrom: { - legend: false, - tooltip: false, - viz: false, - }, - insertNulls: false, - lineInterpolation: 'smooth', - lineWidth: 2, - 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, - }, - ], - }, - unit: 'none', - }, - overrides: [], - }, - options: { - legend: { - calcs: [], - displayMode: 'list', - placement: 'right', - showLegend: true, - }, - tooltip: { - mode: 'multi', - sort: 'desc', - }, - }, -}; - -local averageTemporaryMemoryUsagePanel(matcher) = { - datasource: promDatasource, - targets: [ - prometheus.target( - 'avg by (activemq_cluster, job) (activemq_temp_usage_ratio{' + matcher + '})', - datasource=promDatasource, - legendFormat='{{activemq_cluster}}', - ), - ], - type: 'bargauge', - title: 'Average temporary memory usage', - description: 'Average percentage of temporary memory used across clusters.', - fieldConfig: { - defaults: { - color: { - mode: 'thresholds', - }, - mappings: [], - max: 1, - min: 0, - thresholds: { - mode: 'absolute', - steps: [ - { - color: 'green', - value: null, - }, - { - color: '#EAB839', - value: 50, - }, - { - color: 'red', - value: 70, - }, - ], - }, - unit: 'percentunit', - }, - overrides: [], - }, - options: { - displayMode: 'gradient', - minVizHeight: 10, - minVizWidth: 0, - orientation: 'horizontal', - reduceOptions: { - calcs: [ - 'lastNotNull', - ], - fields: '', - values: false, - }, - showUnfilled: false, - text: {}, - valueMode: 'color', - }, - pluginVersion: '10.2.0-60139', -}; - -local averageStoreMemoryUsagePanel(matcher) = { - datasource: promDatasource, - targets: [ - prometheus.target( - 'avg by (activemq_cluster, job) (activemq_store_usage_ratio{' + matcher + '})', - datasource=promDatasource, - legendFormat='{{activemq_cluster}}', - ), - ], - type: 'bargauge', - title: 'Average store memory usage', - description: 'Average percentage of store memory used across clusters.', - fieldConfig: { - defaults: { - color: { - mode: 'thresholds', - }, - mappings: [], - max: 1, - min: 0, - thresholds: { - mode: 'absolute', - steps: [ - { - color: 'green', - value: null, - }, - { - color: '#EAB839', - value: 50, - }, - { - color: 'red', - value: 70, - }, - ], - }, - unit: 'percentunit', - }, - overrides: [], - }, - options: { - displayMode: 'gradient', - minVizHeight: 10, - minVizWidth: 0, - orientation: 'horizontal', - reduceOptions: { - calcs: [ - 'lastNotNull', - ], - fields: '', - values: false, - }, - showUnfilled: false, - valueMode: 'color', - }, - pluginVersion: '10.2.0-60139', -}; - -local averageBrokerMemoryUsagePanel(matcher) = { - datasource: promDatasource, - targets: [ - prometheus.target( - 'avg by (activemq_cluster, job) (activemq_memory_usage_ratio{' + matcher + '})', - datasource=promDatasource, - legendFormat='{{activemq_cluster}}', - ), - ], - type: 'bargauge', - title: 'Average broker memory usage', - description: 'Average percentage of broker memory used across clusters.', - fieldConfig: { - defaults: { - color: { - mode: 'thresholds', - }, - mappings: [], - max: 1, - min: 0, - thresholds: { - mode: 'absolute', - steps: [ - { - color: 'green', - value: null, - }, - { - color: '#EAB839', - value: 50, - }, - { - color: 'red', - value: 70, - }, - ], - }, - unit: 'percentunit', - }, - overrides: [], - }, - options: { - displayMode: 'gradient', - minVizHeight: 10, - minVizWidth: 0, - orientation: 'horizontal', - reduceOptions: { - calcs: [ - 'lastNotNull', - ], - fields: '', - values: false, - }, - showUnfilled: false, - valueMode: 'color', - }, - pluginVersion: '10.2.0-60139', -}; - -local getMatcher(cfg) = '%(activemqSelector)s, activemq_cluster=~"$activemq_cluster"' % cfg; - -{ - grafanaDashboards+:: { - 'apache-activemq-cluster-overview.json': - dashboard.new( - 'Apache ActiveMQ 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(activemq_topic_producer_count,job)', - label='Job', - refresh=2, - includeAll=true, - multi=true, - allValues='.+', - sort=0 - ), - template.new( - 'cluster', - promDatasource, - 'label_values(activemq_memory_usage_ratio{job=~"$job", cluster=~"$cluster"},cluster)', - label='Cluster', - refresh=2, - includeAll=true, - multi=true, - allValues='.*', - hide=if $._config.enableMultiCluster then '' else 'variable', - sort=0 - ), - template.new( - 'activemq_cluster', - promDatasource, - 'label_values(activemq_memory_usage_ratio{%(activemqSelector)s},activemq_cluster)' % $._config, - label='ActiveMQ cluster', - refresh=2, - includeAll=true, - multi=true, - allValues='.+', - sort=0 - ), - ] - ) - .addLink(grafana.link.dashboards( - asDropdown=false, - title='Other Apache ActiveMQ dashboards', - includeVars=true, - keepTime=true, - tags=($._config.dashboardTags), - )) - .addPanels( - [ - clusterCountPanel(getMatcher($._config)) { gridPos: { h: 4, w: 6, x: 0, y: 0 } }, - brokerCountPanel(getMatcher($._config)) { gridPos: { h: 4, w: 6, x: 6, y: 0 } }, - producerCountPanel(getMatcher($._config)) { gridPos: { h: 4, w: 6, x: 12, y: 0 } }, - consumerCountPanel(getMatcher($._config)) { gridPos: { h: 4, w: 6, x: 18, y: 0 } }, - enqueueCountPanel(getMatcher($._config)) { gridPos: { h: 8, w: 12, x: 0, y: 6 } }, - dequeueCountPanel(getMatcher($._config)) { gridPos: { h: 8, w: 12, x: 12, y: 6 } }, - averageTemporaryMemoryUsagePanel(getMatcher($._config)) { gridPos: { h: 10, w: 8, x: 0, y: 14 } }, - averageStoreMemoryUsagePanel(getMatcher($._config)) { gridPos: { h: 10, w: 8, x: 8, y: 14 } }, - averageBrokerMemoryUsagePanel(getMatcher($._config)) { gridPos: { h: 10, w: 8, x: 16, y: 14 } }, - ] - ), - }, -} diff --git a/apache-activemq-mixin/dashboards/apache-activemq-instance-overview.libsonnet b/apache-activemq-mixin/dashboards/apache-activemq-instance-overview.libsonnet deleted file mode 100644 index ad30420a4..000000000 --- a/apache-activemq-mixin/dashboards/apache-activemq-instance-overview.libsonnet +++ /dev/null @@ -1,1111 +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 dashboardUid = 'apache-activemq-instance-overview'; - -local promDatasourceName = 'prometheus_datasource'; - -local promDatasource = { - uid: '${%s}' % promDatasourceName, -}; - -local averageBrokerMemoryUsagePanel(matcher) = { - datasource: promDatasource, - targets: [ - prometheus.target( - 'avg (activemq_memory_usage_ratio{' + matcher + ', instance=~"$instance"})', - datasource=promDatasource, - legendFormat='{{activemq_cluster}} - {{instance}}', - ), - ], - type: 'gauge', - title: 'Average broker memory usage', - description: 'The percentage of memory used by both topics and queues across brokers.', - fieldConfig: { - defaults: { - color: { - mode: 'thresholds', - }, - mappings: [], - thresholds: { - mode: 'absolute', - steps: [ - { - color: 'green', - value: null, - }, - { - color: '#EAB839', - value: 50, - }, - { - color: 'red', - value: 70, - }, - ], - }, - unit: 'percentunit', - }, - overrides: [], - }, - options: { - minVizHeight: 75, - minVizWidth: 75, - orientation: 'auto', - reduceOptions: { - calcs: [ - 'lastNotNull', - ], - fields: '', - values: false, - }, - showThresholdLabels: false, - showThresholdMarkers: true, - }, - pluginVersion: '10.2.0-60139', -}; - -local averageStoreMemoryUsagePanel(matcher) = { - datasource: promDatasource, - targets: [ - prometheus.target( - 'avg (activemq_store_usage_ratio{' + matcher + ', instance=~"$instance"})', - datasource=promDatasource, - legendFormat='__auto', - ), - ], - type: 'gauge', - title: 'Average store memory usage', - description: 'The percentage of store memory used by both topics and queues across brokers.', - fieldConfig: { - defaults: { - color: { - mode: 'thresholds', - }, - mappings: [], - thresholds: { - mode: 'absolute', - steps: [ - { - color: 'green', - value: null, - }, - { - color: '#EAB839', - value: 50, - }, - { - color: 'red', - value: 70, - }, - ], - }, - unit: 'percentunit', - }, - overrides: [], - }, - options: { - minVizHeight: 75, - minVizWidth: 75, - orientation: 'auto', - reduceOptions: { - calcs: [ - 'lastNotNull', - ], - fields: '', - values: false, - }, - showThresholdLabels: false, - showThresholdMarkers: true, - }, - pluginVersion: '10.2.0-60139', -}; - -local averageTemporaryMemoryUsagePanel(matcher) = { - datasource: promDatasource, - targets: [ - prometheus.target( - 'avg (activemq_temp_usage_ratio{' + matcher + ', instance=~"$instance"})', - datasource=promDatasource, - legendFormat='__auto', - ), - ], - type: 'gauge', - title: 'Average temporary memory usage', - description: 'The percentage of temporary memory used by both topics and queues across brokers.', - fieldConfig: { - defaults: { - color: { - mode: 'thresholds', - }, - mappings: [], - thresholds: { - mode: 'absolute', - steps: [ - { - color: 'green', - value: null, - }, - { - color: '#EAB839', - value: 50, - }, - { - color: 'red', - value: 70, - }, - ], - }, - unit: 'percentunit', - }, - overrides: [], - }, - options: { - minVizHeight: 75, - minVizWidth: 75, - orientation: 'auto', - reduceOptions: { - calcs: [ - 'lastNotNull', - ], - fields: '', - values: false, - }, - showThresholdLabels: false, - showThresholdMarkers: true, - }, - pluginVersion: '10.2.0-60139', -}; - -local producerCountPanel(matcher) = { - datasource: promDatasource, - targets: [ - prometheus.target( - 'sum (activemq_queue_producer_count{' + matcher + ', instance=~"$instance"}) + sum (activemq_topic_producer_count{' + matcher + ', instance=~"$instance", destination!~"ActiveMQ.Advisory.*"})', - datasource=promDatasource, - legendFormat='__auto', - ), - ], - type: 'stat', - title: 'Producers', - description: 'The number of producers attached to destinations.', - fieldConfig: { - defaults: { - color: { - mode: 'fixed', - }, - mappings: [], - thresholds: { - mode: 'absolute', - steps: [ - { - color: 'green', - value: null, - }, - ], - }, - unit: 'none', - }, - overrides: [], - }, - options: { - colorMode: 'none', - graphMode: 'area', - justifyMode: 'auto', - orientation: 'auto', - reduceOptions: { - calcs: [ - 'lastNotNull', - ], - fields: '', - values: false, - }, - textMode: 'auto', - }, - pluginVersion: '10.2.0-60139', -}; - -local consumerCountPanel(matcher) = { - datasource: promDatasource, - targets: [ - prometheus.target( - 'sum (activemq_queue_consumer_count{' + matcher + ', instance=~"$instance"}) + sum (activemq_topic_consumer_count{' + matcher + ', instance=~"$instance", destination!~"ActiveMQ.Advisory.*"})', - datasource=promDatasource, - legendFormat='__auto', - ), - ], - type: 'stat', - title: 'Consumers', - description: 'The number of consumers subscribed to destinations on the broker.', - fieldConfig: { - defaults: { - color: { - mode: 'fixed', - }, - mappings: [], - thresholds: { - mode: 'absolute', - steps: [ - { - color: 'green', - value: null, - }, - ], - }, - unit: 'none', - }, - overrides: [], - }, - options: { - colorMode: 'none', - graphMode: 'area', - justifyMode: 'auto', - orientation: 'auto', - reduceOptions: { - calcs: [ - 'lastNotNull', - ], - fields: '', - values: false, - }, - textMode: 'auto', - }, - pluginVersion: '10.2.0-60139', -}; - -local unacknowledgedMessagesPanel(matcher) = { - datasource: promDatasource, - targets: [ - prometheus.target( - 'sum (increase(activemq_message_total{' + matcher + ', instance=~"$instance"}[$__interval:]))', - datasource=promDatasource, - legendFormat='__auto', - interval='1m', - ), - ], - type: 'stat', - title: 'Unacknowledged messages / $__interval', - description: 'Recent number of unacknowledged messages on the broker.', - fieldConfig: { - defaults: { - color: { - mode: 'fixed', - }, - mappings: [], - thresholds: { - mode: 'absolute', - steps: [ - { - color: 'green', - value: null, - }, - ], - }, - unit: 'none', - }, - overrides: [], - }, - options: { - colorMode: 'none', - graphMode: 'area', - justifyMode: 'auto', - orientation: 'auto', - reduceOptions: { - calcs: [ - 'lastNotNull', - ], - fields: '', - values: false, - }, - textMode: 'auto', - }, - pluginVersion: '10.2.0-60139', -}; - -local queueSizePanel(matcher) = { - datasource: promDatasource, - targets: [ - prometheus.target( - 'sum by(instance, activemq_cluster, job) (activemq_queue_queue_size{' + matcher + ', instance=~"$instance"})', - datasource=promDatasource, - legendFormat='{{activemq_cluster}} - {{instance}}', - ), - ], - type: 'timeseries', - title: 'Queue size', - description: 'Number of messages on queue destinations, including any that have been dispatched but not acknowledged.', - fieldConfig: { - defaults: { - color: { - mode: 'palette-classic', - }, - custom: { - axisCenteredZero: false, - axisColorMode: 'text', - axisLabel: '', - axisPlacement: 'auto', - axisShow: false, - barAlignment: 0, - drawStyle: 'line', - fillOpacity: 25, - gradientMode: 'none', - hideFrom: { - legend: false, - tooltip: false, - viz: false, - }, - insertNulls: false, - lineInterpolation: 'smooth', - lineWidth: 2, - 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, - }, - ], - }, - unit: 'none', - }, - overrides: [], - }, - options: { - legend: { - calcs: [], - displayMode: 'list', - placement: 'right', - showLegend: true, - }, - tooltip: { - mode: 'multi', - sort: 'desc', - }, - }, -}; - -local destinationMemoryUsagePanel(matcher) = { - datasource: promDatasource, - targets: [ - prometheus.target( - 'sum by(instance, activemq_cluster, job) (activemq_queue_memory_percent_usage{' + matcher + ', instance=~"$instance"})', - datasource=promDatasource, - legendFormat='{{activemq_cluster}} - {{instance}} - queue', - ), - prometheus.target( - 'sum by(instance, activemq_cluster, job) (activemq_topic_memory_percent_usage{' + matcher + ', instance=~"$instance", destination!~"ActiveMQ.Advisory.*"})', - datasource=promDatasource, - legendFormat='{{activemq_cluster}} - {{instance}} - topic', - ), - ], - type: 'timeseries', - title: 'Destination memory usage', - description: 'The percentage of memory being used by topic and queue destinations.', - fieldConfig: { - defaults: { - color: { - mode: 'palette-classic', - }, - custom: { - axisCenteredZero: false, - axisColorMode: 'text', - axisLabel: '', - axisPlacement: 'auto', - axisShow: false, - barAlignment: 0, - drawStyle: 'line', - fillOpacity: 25, - gradientMode: 'opacity', - hideFrom: { - legend: false, - tooltip: false, - viz: false, - }, - insertNulls: false, - lineInterpolation: 'smooth', - lineWidth: 2, - pointSize: 5, - scaleDistribution: { - type: 'linear', - }, - showPoints: 'never', - spanNulls: false, - stacking: { - group: 'A', - mode: 'normal', - }, - thresholdsStyle: { - mode: 'off', - }, - }, - mappings: [], - max: 100, - min: 0, - thresholds: { - mode: 'absolute', - steps: [ - { - color: 'green', - value: null, - }, - ], - }, - unit: 'percent', - }, - overrides: [], - }, - options: { - legend: { - calcs: [], - displayMode: 'list', - placement: 'right', - showLegend: true, - }, - tooltip: { - mode: 'multi', - sort: 'desc', - }, - }, -}; - -local enqueueCountPanel(matcher) = { - datasource: promDatasource, - targets: [ - prometheus.target( - 'sum by(instance, activemq_cluster, job) (increase(activemq_queue_enqueue_count{' + matcher + ', instance=~"$instance"}[$__interval:]))', - datasource=promDatasource, - legendFormat='{{activemq_cluster}} - {{instance}} - queue', - interval='1m', - ), - prometheus.target( - 'sum by(instance, activemq_cluster, job) (increase(activemq_topic_enqueue_count{' + matcher + ', instance=~"$instance", destination!~"ActiveMQ.Advisory.*"}[$__interval:]))', - datasource=promDatasource, - legendFormat='{{activemq_cluster}} - {{instance}} - topic', - interval='1m', - ), - ], - type: 'timeseries', - title: 'Enqueue / $__interval', - description: 'Number of messages that have been sent to the destination.', - fieldConfig: { - defaults: { - color: { - mode: 'palette-classic', - }, - custom: { - axisCenteredZero: false, - axisColorMode: 'text', - axisLabel: '', - axisPlacement: 'auto', - axisShow: false, - barAlignment: 0, - drawStyle: 'line', - fillOpacity: 25, - gradientMode: 'none', - hideFrom: { - legend: false, - tooltip: false, - viz: false, - }, - insertNulls: false, - lineInterpolation: 'smooth', - lineWidth: 2, - 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, - }, - ], - }, - unit: 'none', - }, - overrides: [], - }, - options: { - legend: { - calcs: [], - displayMode: 'list', - placement: 'right', - showLegend: true, - }, - tooltip: { - mode: 'multi', - sort: 'desc', - }, - }, -}; - -local dequeueCountPanel(matcher) = { - datasource: promDatasource, - targets: [ - prometheus.target( - 'sum by(instance, activemq_cluster) (increase(activemq_queue_dequeue_count{' + matcher + ', instance=~"$instance"}[$__interval:]))', - datasource=promDatasource, - legendFormat='{{activemq_cluster}} - {{instance}} - queue', - interval='1m', - ), - prometheus.target( - 'sum by(instance, activemq_cluster) (increase(activemq_topic_dequeue_count{' + matcher + ', instance=~"$instance", destination!~"ActiveMQ.Advisory.*"}[$__interval:]))', - datasource=promDatasource, - legendFormat='{{activemq_cluster}} - {{instance}} - topic', - interval='1m', - ), - ], - type: 'timeseries', - title: 'Dequeue / $__interval', - description: 'Number of messages that have been acknowledged (and removed) from the destinations.', - fieldConfig: { - defaults: { - color: { - mode: 'palette-classic', - }, - custom: { - axisCenteredZero: false, - axisColorMode: 'text', - axisLabel: '', - axisPlacement: 'auto', - axisShow: false, - barAlignment: 0, - drawStyle: 'line', - fillOpacity: 25, - gradientMode: 'none', - hideFrom: { - legend: false, - tooltip: false, - viz: false, - }, - insertNulls: false, - lineInterpolation: 'smooth', - 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, - }, - ], - }, - unit: 'none', - }, - overrides: [], - }, - options: { - legend: { - calcs: [], - displayMode: 'list', - placement: 'right', - showLegend: true, - }, - tooltip: { - mode: 'multi', - sort: 'desc', - }, - }, -}; - -local averageEnqueueTimePanel(matcher) = { - datasource: promDatasource, - targets: [ - prometheus.target( - 'avg by (activemq_cluster, instance, job) (activemq_queue_average_enqueue_time{' + matcher + ', instance=~"$instance"})', - datasource=promDatasource, - legendFormat='{{activemq_cluster}} - {{instance}} - queue', - ), - prometheus.target( - 'avg by (activemq_cluster, instance, job) (activemq_topic_average_enqueue_time{' + matcher + ', instance=~"$instance", destination!~"ActiveMQ.Advisory.*"})', - datasource=promDatasource, - legendFormat='{{activemq_cluster}} - {{instance}} - topic', - ), - ], - type: 'timeseries', - title: 'Average enqueue time', - description: 'Average time a message was held across all destinations.', - fieldConfig: { - defaults: { - color: { - mode: 'palette-classic', - }, - custom: { - axisCenteredZero: false, - axisColorMode: 'text', - axisLabel: '', - axisPlacement: 'auto', - axisShow: false, - barAlignment: 0, - drawStyle: 'line', - fillOpacity: 25, - gradientMode: 'none', - hideFrom: { - legend: false, - tooltip: false, - viz: false, - }, - insertNulls: false, - lineInterpolation: 'smooth', - lineWidth: 2, - 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, - }, - ], - }, - unit: 'ms', - }, - overrides: [], - }, - options: { - legend: { - calcs: [], - displayMode: 'list', - placement: 'right', - showLegend: true, - }, - tooltip: { - mode: 'multi', - sort: 'desc', - }, - }, -}; - -local expiredMessagesPanel(matcher) = { - datasource: promDatasource, - targets: [ - prometheus.target( - 'sum by(instance, activemq_cluster, job) (increase(activemq_queue_expired_count{' + matcher + ', instance=~"$instance"}[$__interval:]))', - datasource=promDatasource, - legendFormat='{{activemq_cluster}} - {{instance}} - queue', - interval='1m', - ), - prometheus.target( - 'sum by(instance, activemq_cluster, job) (increase(activemq_topic_expired_count{' + matcher + ', instance=~"$instance", destination!~"ActiveMQ.Advisory.*"}[$__interval:]))', - datasource=promDatasource, - legendFormat='{{activemq_cluster}} - {{instance}} - topic', - interval='1m', - ), - ], - type: 'timeseries', - title: 'Expired messages / $__interval', - description: 'Number of messages across destinations that are expired.', - fieldConfig: { - defaults: { - color: { - mode: 'palette-classic', - }, - custom: { - axisCenteredZero: false, - axisColorMode: 'text', - axisLabel: '', - axisPlacement: 'auto', - axisShow: false, - barAlignment: 0, - drawStyle: 'line', - fillOpacity: 25, - gradientMode: 'none', - hideFrom: { - legend: false, - tooltip: false, - viz: false, - }, - insertNulls: false, - lineInterpolation: 'smooth', - lineWidth: 2, - 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, - }, - ], - }, - unit: 'none', - }, - overrides: [], - }, - options: { - legend: { - calcs: [], - displayMode: 'list', - placement: 'right', - showLegend: true, - }, - tooltip: { - mode: 'multi', - sort: 'desc', - }, - }, -}; - -local jvmResourcesRow = { - datasource: promDatasource, - targets: [], - type: 'row', - title: 'JVM resources', - collapsed: false, -}; - -local garbageCollectionDurationPanel(matcher) = { - datasource: promDatasource, - targets: [ - prometheus.target( - 'jvm_gc_duration_seconds{' + matcher + ', instance=~"$instance"}', - datasource=promDatasource, - legendFormat='{{activemq_cluster}} - {{instance}}', - interval='1m', - ), - ], - type: 'timeseries', - title: 'Garbage collection duration', - description: 'The time spent performing recent garbage collections', - fieldConfig: { - defaults: { - color: { - mode: 'palette-classic', - }, - custom: { - axisCenteredZero: false, - axisColorMode: 'text', - axisLabel: '', - axisPlacement: 'auto', - axisShow: false, - barAlignment: 0, - drawStyle: 'line', - fillOpacity: 25, - gradientMode: 'none', - hideFrom: { - legend: false, - tooltip: false, - viz: false, - }, - insertNulls: false, - lineInterpolation: 'smooth', - lineWidth: 2, - pointSize: 5, - scaleDistribution: { - type: 'linear', - }, - showPoints: 'never', - spanNulls: false, - stacking: { - group: 'A', - mode: 'none', - }, - thresholdsStyle: { - mode: 'off', - }, - }, - mappings: [], - thresholds: { - mode: 'absolute', - steps: [ - { - color: 'green', - }, - ], - }, - unit: 's', - }, - overrides: [], - }, - options: { - legend: { - calcs: [], - displayMode: 'list', - placement: 'right', - showLegend: true, - }, - tooltip: { - mode: 'multi', - sort: 'desc', - }, - }, -}; - -local garbageCollectionCountPanel(matcher) = { - datasource: promDatasource, - targets: [ - prometheus.target( - 'increase(jvm_gc_collection_count{' + matcher + ', instance=~"$instance", name="G1 Young Generation"}[$__interval:])', - datasource=promDatasource, - legendFormat='{{activemq_cluster}} - {{instance}}', - interval='1m', - ), - ], - type: 'timeseries', - title: 'Garbage collection count / $__interval', - description: 'The recent increase in the number of garbage collection events for the JVM.', - fieldConfig: { - defaults: { - color: { - mode: 'palette-classic', - }, - custom: { - axisCenteredZero: false, - axisColorMode: 'text', - axisLabel: '', - axisPlacement: 'auto', - axisShow: false, - barAlignment: 0, - drawStyle: 'line', - fillOpacity: 25, - gradientMode: 'none', - hideFrom: { - legend: false, - tooltip: false, - viz: false, - }, - insertNulls: false, - lineInterpolation: 'smooth', - lineWidth: 2, - pointSize: 5, - scaleDistribution: { - type: 'linear', - }, - showPoints: 'never', - spanNulls: false, - stacking: { - group: 'A', - mode: 'none', - }, - thresholdsStyle: { - mode: 'off', - }, - }, - mappings: [], - thresholds: { - mode: 'absolute', - steps: [ - { - color: 'green', - }, - ], - }, - unit: 'none', - }, - overrides: [], - }, - options: { - legend: { - calcs: [], - displayMode: 'list', - placement: 'right', - showLegend: true, - }, - tooltip: { - mode: 'multi', - sort: 'desc', - }, - }, -}; - -local activemqAlertsPanel(matcher) = { - datasource: promDatasource, - targets: [], - type: 'alertlist', - title: 'ActiveMQ alerts', - description: 'Firing alerts for Apache ActiveMQ environment.', - options: { - alertName: '', - dashboardAlerts: false, - alertInstanceLabelFilter: '{' + matcher + ', instance=~"${instance:regex}"}', - datasource: promDatasource, - groupBy: [], - groupMode: 'default', - maxItems: 5, - sortOrder: 1, - stateFilter: { - 'error': true, - firing: true, - noData: true, - normal: true, - pending: true, - }, - viewMode: 'list', - }, -}; - -local getMatcher(cfg) = '%(activemqSelector)s, activemq_cluster=~"$activemq_cluster"' % cfg; -local getAlertsMatcher(cfg) = '%(activemqAlertsSelector)s, activemq_cluster=~"${activemq_cluster:regex}"' % cfg; - -{ - grafanaDashboards+:: { - 'apache-activemq-instance-overview.json': - dashboard.new( - 'Apache ActiveMQ instance 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(activemq_topic_producer_count,job)', - label='Job', - refresh=2, - includeAll=true, - multi=true, - allValues='.+', - sort=0 - ), - template.new( - 'cluster', - promDatasource, - 'label_values(activemq_memory_usage_ratio{job=~"$job"},cluster)', - label='Cluster', - refresh=2, - includeAll=true, - multi=true, - allValues='.*', - hide=if $._config.enableMultiCluster then '' else 'variable', - sort=0 - ), - template.new( - 'activemq_cluster', - promDatasource, - 'label_values(activemq_memory_usage_ratio{%(activemqSelector)s},activemq_cluster)' % $._config, - label='ActiveMQ cluster', - refresh=2, - includeAll=true, - multi=true, - allValues='.+', - sort=0 - ), - template.new( - 'instance', - promDatasource, - 'label_values(activemq_topic_producer_count{%(activemqSelector)s, activemq_cluster=~"$activemq_cluster"},instance)' % $._config, - label='Instance', - refresh=2, - includeAll=true, - multi=true, - allValues='.+', - sort=0 - ), - ] - ) - .addLink(grafana.link.dashboards( - asDropdown=false, - title='Other Apache ActiveMQ dashboards', - includeVars=true, - keepTime=true, - tags=($._config.dashboardTags), - )) - .addPanels( - [ - averageBrokerMemoryUsagePanel(getMatcher($._config)) { gridPos: { h: 4, w: 6, x: 0, y: 0 } }, - averageStoreMemoryUsagePanel(getMatcher($._config)) { gridPos: { h: 4, w: 6, x: 6, y: 0 } }, - averageTemporaryMemoryUsagePanel(getMatcher($._config)) { gridPos: { h: 4, w: 6, x: 12, y: 0 } }, - unacknowledgedMessagesPanel(getMatcher($._config)) { gridPos: { h: 4, w: 6, x: 18, y: 0 } }, - activemqAlertsPanel(getAlertsMatcher($._config)) { gridPos: { h: 6, w: 12, x: 0, y: 4 } }, - producerCountPanel(getMatcher($._config)) { gridPos: { h: 6, w: 6, x: 12, y: 4 } }, - consumerCountPanel(getMatcher($._config)) { gridPos: { h: 6, w: 6, x: 18, y: 4 } }, - queueSizePanel(getMatcher($._config)) { gridPos: { h: 8, w: 12, x: 0, y: 10 } }, - destinationMemoryUsagePanel(getMatcher($._config)) { gridPos: { h: 8, w: 12, x: 12, y: 10 } }, - enqueueCountPanel(getMatcher($._config)) { gridPos: { h: 8, w: 12, x: 0, y: 18 } }, - dequeueCountPanel(getMatcher($._config)) { gridPos: { h: 8, w: 12, x: 12, y: 18 } }, - averageEnqueueTimePanel(getMatcher($._config)) { gridPos: { h: 8, w: 12, x: 0, y: 26 } }, - expiredMessagesPanel(getMatcher($._config)) { gridPos: { h: 8, w: 12, x: 12, y: 26 } }, - jvmResourcesRow { gridPos: { h: 1, w: 24, x: 0, y: 34 } }, - garbageCollectionDurationPanel(getMatcher($._config)) { gridPos: { h: 8, w: 12, x: 0, y: 35 } }, - garbageCollectionCountPanel(getMatcher($._config)) { gridPos: { h: 8, w: 12, x: 12, y: 35 } }, - ] - ), - }, -} diff --git a/apache-activemq-mixin/dashboards/apache-activemq-logs-overview.libsonnet b/apache-activemq-mixin/dashboards/apache-activemq-logs-overview.libsonnet deleted file mode 100644 index 9bbf37d12..000000000 --- a/apache-activemq-mixin/dashboards/apache-activemq-logs-overview.libsonnet +++ /dev/null @@ -1,33 +0,0 @@ -local g = import 'github.com/grafana/grafonnet/gen/grafonnet-latest/main.libsonnet'; -local logsDashboard = import 'github.com/grafana/jsonnet-libs/logs-lib/logs/main.libsonnet'; - -{ - local activemqLogs = - logsDashboard.new( - 'Apache ActiveMQ logs', - datasourceName='loki_datasource', - datasourceRegex='', - filterSelector=$._config.filterSelector, - labels=['job', 'activemq_cluster', 'instance', 'level'], - formatParser=null, - showLogsVolume=true - ) - { - panels+: - { - logs+: - // ActiveMQ logs already have timestamp - g.panel.logs.options.withShowTime(false), - }, - dashboards+: - { - logs+: g.dashboard.withLinksMixin($.grafanaDashboards['apache-activemq-cluster-overview.json'].links) - + g.dashboard.withUid($._config.grafanaDashboardIDs['apache-activemq-logs-overview.json']) - + g.dashboard.withTags($._config.dashboardTags) - + g.dashboard.withRefresh($._config.dashboardRefresh), - }, - }, - grafanaDashboards+:: if $._config.enableLokiLogs then { - 'apache-activemq-logs.json': activemqLogs.dashboards.logs, - } else {}, -} diff --git a/apache-activemq-mixin/dashboards/apache-activemq-queue-overview.libsonnet b/apache-activemq-mixin/dashboards/apache-activemq-queue-overview.libsonnet deleted file mode 100644 index 980ae8ca6..000000000 --- a/apache-activemq-mixin/dashboards/apache-activemq-queue-overview.libsonnet +++ /dev/null @@ -1,895 +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 dashboardUid = 'apache-activemq-queue-overview'; - -local promDatasourceName = 'prometheus_datasource'; - -local promDatasource = { - uid: '${%s}' % promDatasourceName, -}; - -local numberOfQueuesPanel(matcher) = { - datasource: promDatasource, - targets: [ - prometheus.target( - 'count (activemq_queue_queue_size{' + matcher + ', instance=~"$instance"})', - datasource=promDatasource, - legendFormat='__auto', - ), - ], - type: 'stat', - title: 'Queues', - description: 'Number of queues connected with the broker instance.', - fieldConfig: { - defaults: { - color: { - mode: 'fixed', - }, - mappings: [], - thresholds: { - mode: 'absolute', - steps: [ - { - color: 'green', - value: null, - }, - ], - }, - unit: 'none', - }, - overrides: [], - }, - options: { - colorMode: 'none', - graphMode: 'area', - justifyMode: 'auto', - orientation: 'auto', - reduceOptions: { - calcs: [ - 'lastNotNull', - ], - fields: '', - values: false, - }, - textMode: 'auto', - }, - pluginVersion: '10.2.0-60139', -}; - -local queueSizePanel(matcher) = { - datasource: promDatasource, - targets: [ - prometheus.target( - 'sum (activemq_queue_queue_size{' + matcher + ', instance=~"$instance"})', - datasource=promDatasource, - legendFormat='__auto', - ), - ], - type: 'stat', - title: 'Queue size', - description: 'Number of messages in queue destinations.', - fieldConfig: { - defaults: { - color: { - mode: 'fixed', - }, - mappings: [], - thresholds: { - mode: 'absolute', - steps: [ - { - color: 'green', - value: null, - }, - ], - }, - }, - overrides: [], - }, - options: { - colorMode: 'none', - graphMode: 'area', - justifyMode: 'auto', - orientation: 'auto', - reduceOptions: { - calcs: [ - 'lastNotNull', - ], - fields: '', - values: false, - }, - textMode: 'auto', - }, - pluginVersion: '10.2.0-60139', -}; - -local producerCountPanel(matcher) = { - datasource: promDatasource, - targets: [ - prometheus.target( - 'sum (activemq_queue_producer_count{' + matcher + ', instance=~"$instance"})', - datasource=promDatasource, - legendFormat='__auto', - ), - ], - type: 'stat', - title: 'Producers', - description: 'The number of producers attached to queue destinations.', - fieldConfig: { - defaults: { - color: { - mode: 'fixed', - }, - mappings: [], - thresholds: { - mode: 'absolute', - steps: [ - { - color: 'green', - value: null, - }, - ], - }, - unit: 'none', - }, - overrides: [], - }, - options: { - colorMode: 'none', - graphMode: 'area', - justifyMode: 'auto', - orientation: 'auto', - reduceOptions: { - calcs: [ - 'lastNotNull', - ], - fields: '', - values: false, - }, - textMode: 'auto', - }, - pluginVersion: '10.2.0-60139', -}; - -local consumerCountPanel(matcher) = { - datasource: promDatasource, - targets: [ - prometheus.target( - 'sum (activemq_queue_consumer_count{' + matcher + ', instance=~"$instance"})', - datasource=promDatasource, - legendFormat='__auto', - ), - ], - type: 'stat', - title: 'Consumers', - description: 'The number of consumers subscribed to queue destinations.', - fieldConfig: { - defaults: { - color: { - mode: 'fixed', - }, - mappings: [], - thresholds: { - mode: 'absolute', - steps: [ - { - color: 'green', - value: null, - }, - ], - }, - unit: 'none', - }, - overrides: [], - }, - options: { - colorMode: 'none', - graphMode: 'area', - justifyMode: 'auto', - orientation: 'auto', - reduceOptions: { - calcs: [ - 'lastNotNull', - ], - fields: '', - values: false, - }, - textMode: 'auto', - }, - pluginVersion: '10.2.0-60139', -}; - -local topQueuesByEnqueueRatePanel(matcher) = { - datasource: promDatasource, - targets: [ - prometheus.target( - 'topk by(instance, activemq_cluster, job) ($k_selector, rate(activemq_queue_enqueue_count{' + matcher + ', instance=~"$instance", destination=~".*$name.*"}[$__rate_interval]))', - datasource=promDatasource, - legendFormat='{{activemq_cluster}} - {{instance}} - {{destination}}', - ), - ], - type: 'timeseries', - title: 'Top queues by enqueue rate', - description: 'The rate messages sent to queue destinations.', - fieldConfig: { - defaults: { - color: { - mode: 'palette-classic', - }, - custom: { - axisCenteredZero: false, - axisColorMode: 'text', - axisLabel: '', - axisPlacement: 'auto', - axisShow: false, - barAlignment: 0, - drawStyle: 'line', - fillOpacity: 25, - gradientMode: 'none', - hideFrom: { - legend: false, - tooltip: false, - viz: false, - }, - insertNulls: false, - lineInterpolation: 'smooth', - lineWidth: 2, - 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: 'mps', - }, - overrides: [], - }, - options: { - legend: { - calcs: [], - displayMode: 'list', - placement: 'right', - showLegend: true, - }, - tooltip: { - mode: 'multi', - sort: 'desc', - }, - }, -}; - -local topQueuesByDequeueRatePanel(matcher) = { - datasource: promDatasource, - targets: [ - prometheus.target( - 'topk by(instance, activemq_cluster) ($k_selector, rate(activemq_queue_dequeue_count{' + matcher + ',instance=~"$instance", destination=~".*$name.*"}[$__rate_interval]))', - datasource=promDatasource, - legendFormat='{{activemq_cluster}} - {{instance}} - {{destination}}', - ), - ], - type: 'timeseries', - title: 'Top queues by dequeue rate', - description: 'The rate messages have been acknowledged (and removed) from queue destinations.', - fieldConfig: { - defaults: { - color: { - mode: 'palette-classic', - }, - custom: { - axisCenteredZero: false, - axisColorMode: 'text', - axisLabel: '', - axisPlacement: 'auto', - axisShow: false, - barAlignment: 0, - drawStyle: 'line', - fillOpacity: 25, - gradientMode: 'none', - hideFrom: { - legend: false, - tooltip: false, - viz: false, - }, - insertNulls: false, - lineInterpolation: 'smooth', - lineWidth: 2, - 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: 'mps', - }, - overrides: [], - }, - options: { - legend: { - calcs: [], - displayMode: 'list', - placement: 'right', - showLegend: true, - }, - tooltip: { - mode: 'multi', - sort: 'desc', - }, - }, -}; - -local topQueuesByAverageEnqueueTimePanel(matcher) = { - datasource: promDatasource, - targets: [ - prometheus.target( - 'topk by(instance, activemq_cluster) ($k_selector, activemq_queue_average_enqueue_time{' + matcher + ', instance=~"$instance", destination=~".*$name.*"})', - datasource=promDatasource, - legendFormat='{{activemq_cluster}} - {{instance}} - {{destination}}', - ), - ], - type: 'timeseries', - title: 'Top queues by average enqueue time', - description: 'Average time a message was held on queue destinations.', - fieldConfig: { - defaults: { - color: { - mode: 'palette-classic', - }, - custom: { - axisCenteredZero: false, - axisColorMode: 'text', - axisLabel: '', - axisPlacement: 'auto', - axisShow: false, - barAlignment: 0, - drawStyle: 'line', - fillOpacity: 25, - gradientMode: 'none', - hideFrom: { - legend: false, - tooltip: false, - viz: false, - }, - insertNulls: false, - lineInterpolation: 'smooth', - lineWidth: 2, - 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: 'ms', - }, - overrides: [], - }, - options: { - legend: { - calcs: [], - displayMode: 'list', - placement: 'right', - showLegend: true, - }, - tooltip: { - mode: 'multi', - sort: 'desc', - }, - }, -}; - -local topQueuesByExpiredMessageRatePanel(matcher) = { - datasource: promDatasource, - targets: [ - prometheus.target( - 'topk by(instance, activemq_cluster, job) ($k_selector, rate(activemq_queue_expired_count{' + matcher + ', instance=~"$instance", destination=~".*$name.*"}[$__rate_interval]))', - datasource=promDatasource, - legendFormat='{{activemq_cluster}} - {{instance}} - {{destination}}', - ), - ], - type: 'timeseries', - title: 'Top queues by expired message rate', - description: 'The rate messages have expired on queue destinations.', - fieldConfig: { - defaults: { - color: { - mode: 'palette-classic', - }, - custom: { - axisCenteredZero: false, - axisColorMode: 'text', - axisLabel: '', - axisPlacement: 'auto', - axisShow: false, - barAlignment: 0, - drawStyle: 'line', - fillOpacity: 25, - gradientMode: 'none', - hideFrom: { - legend: false, - tooltip: false, - viz: false, - }, - insertNulls: false, - lineInterpolation: 'smooth', - lineWidth: 2, - 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: 'mps', - }, - overrides: [], - }, - options: { - legend: { - calcs: [], - displayMode: 'list', - placement: 'right', - showLegend: true, - }, - tooltip: { - mode: 'multi', - sort: 'desc', - }, - }, -}; - -local topQueuesByAverageMessageSizePanel(matcher) = { - datasource: promDatasource, - targets: [ - prometheus.target( - 'topk by(instance, activemq_cluster, job) ($k_selector, activemq_queue_average_message_size{' + matcher + ', instance=~"$instance", destination=~".*$name.*"})', - datasource=promDatasource, - legendFormat='{{activemq_cluster}} - {{instance}} - {{destination}}', - ), - ], - type: 'timeseries', - title: 'Top queues by average message size', - description: 'Average message size on queue destinations.', - fieldConfig: { - defaults: { - color: { - mode: 'palette-classic', - }, - custom: { - axisCenteredZero: false, - axisColorMode: 'text', - axisLabel: '', - axisPlacement: 'auto', - axisShow: false, - axisSoftMin: 0, - barAlignment: 0, - drawStyle: 'line', - fillOpacity: 25, - gradientMode: 'none', - hideFrom: { - legend: false, - tooltip: false, - viz: false, - }, - insertNulls: false, - lineInterpolation: 'smooth', - lineWidth: 2, - pointSize: 5, - scaleDistribution: { - type: 'linear', - }, - showPoints: 'never', - spanNulls: false, - stacking: { - group: 'A', - mode: 'none', - }, - thresholdsStyle: { - mode: 'off', - }, - }, - mappings: [], - min: 0, - thresholds: { - mode: 'absolute', - steps: [ - { - color: 'green', - value: null, - }, - ], - }, - unit: 'decbytes', - }, - overrides: [], - }, - options: { - legend: { - calcs: [], - displayMode: 'list', - placement: 'right', - showLegend: true, - }, - tooltip: { - mode: 'multi', - sort: 'desc', - }, - }, -}; - -local queueSummaryPanel(matcher) = { - datasource: promDatasource, - targets: [ - prometheus.target( - 'rate(activemq_queue_enqueue_count{' + matcher + ', instance=~"$instance", destination=~".*$name.*"}[$__rate_interval:])', - datasource=promDatasource, - legendFormat='{{instance}}', - format='table', - ), - prometheus.target( - 'rate(activemq_queue_dequeue_count{' + matcher + ', instance=~"$instance", destination=~".*$name.*"}[$__rate_interval:])', - datasource=promDatasource, - legendFormat='{{instance}}', - format='table', - ), - prometheus.target( - 'activemq_queue_average_enqueue_time{' + matcher + ', instance=~"$instance", destination=~".*$name.*"}', - datasource=promDatasource, - legendFormat='{{instance}}', - format='table', - ), - prometheus.target( - 'activemq_queue_average_message_size{' + matcher + ', instance=~"$instance", destination=~".*$name.*"}', - datasource=promDatasource, - legendFormat='{{instance}}', - format='table', - ), - ], - type: 'table', - title: 'Queue summary', - description: 'Summary of queues showing queue name, enqueue and dequeue rate, average enqueue time, and average message size.', - fieldConfig: { - defaults: { - color: { - mode: 'thresholds', - }, - custom: { - align: 'center', - cellOptions: { - type: 'auto', - }, - inspect: false, - }, - mappings: [], - thresholds: { - mode: 'absolute', - steps: [ - { - color: 'green', - }, - ], - }, - }, - overrides: [ - { - matcher: { - id: 'byName', - options: 'Average message size', - }, - properties: [ - { - id: 'unit', - value: 'decbytes', - }, - ], - }, - { - matcher: { - id: 'byName', - options: 'Enqueue rate', - }, - properties: [ - { - id: 'unit', - value: 'mps', - }, - ], - }, - { - matcher: { - id: 'byName', - options: 'Dequeue rate', - }, - properties: [ - { - id: 'unit', - value: 'mps', - }, - ], - }, - { - matcher: { - id: 'byName', - options: 'Average enqueue time', - }, - properties: [ - { - id: 'unit', - value: 'ms', - }, - ], - }, - { - matcher: { - id: 'byName', - options: 'ActiveMQ cluster', - }, - properties: [ - { - id: 'links', - value: [ - { - title: 'Cluster link', - url: 'd/apache-activemq-cluster-overview?var-activemq_cluster=${__data.fields.activemq_cluster}&${__url_time_range}&var-datasource=${datasource}', - }, - ], - }, - ], - }, - { - matcher: { - id: 'byName', - options: 'Instance', - }, - properties: [ - { - id: 'links', - value: [ - { - title: 'Instance link', - url: 'd/apache-activemq-instance-overview?var-instance=${__data.fields.instance}&${__url_time_range}&var-datasource=${datasource}', - }, - ], - }, - ], - }, - ], - }, - options: { - cellHeight: 'sm', - footer: { - countRows: false, - fields: '', - reducer: [ - 'sum', - ], - show: false, - }, - showHeader: true, - sortBy: [], - }, - pluginVersion: '10.2.0-60139', - transformations: [ - { - id: 'joinByField', - options: { - byField: 'destination', - mode: 'outer', - }, - }, - { - id: 'organize', - options: { - indexByName: {}, - renameByName: { - 'Time 1': '', - 'Value #A': 'Enqueue rate', - 'Value #B': 'Dequeue rate', - 'Value #C': 'Average enqueue time', - 'Value #D': 'Average message size', - 'activemq_cluster 1': 'ActiveMQ cluster', - destination: 'Destination', - 'instance 1': 'Instance', - }, - }, - }, - { - id: 'filterFieldsByName', - options: { - include: { - names: [ - 'ActiveMQ cluster', - 'Instance', - 'Enqueue rate', - 'Dequeue rate', - 'Average enqueue time', - 'Average message size', - 'Destination', - ], - }, - }, - }, - ], -}; - -local getMatcher(cfg) = '%(activemqSelector)s, activemq_cluster=~"$activemq_cluster"' % cfg; - -{ - grafanaDashboards+:: { - 'apache-activemq-queue-overview.json': - dashboard.new( - 'Apache ActiveMQ 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(activemq_topic_producer_count,job)', - label='Job', - refresh=2, - includeAll=true, - multi=true, - allValues='.+', - sort=0 - ), - template.new( - 'cluster', - promDatasource, - 'label_values(activemq_memory_usage_ratio{job=~"$job"},cluster)', - label='Cluster', - refresh=2, - includeAll=true, - multi=true, - allValues='.*', - hide=if $._config.enableMultiCluster then '' else 'variable', - sort=0 - ), - template.new( - 'activemq_cluster', - promDatasource, - 'label_values(activemq_memory_usage_ratio{%(activemqSelector)s},activemq_cluster)' % $._config, - label='ActiveMQ cluster', - refresh=2, - includeAll=true, - multi=true, - allValues='.+', - sort=0 - ), - template.new( - 'instance', - promDatasource, - 'label_values(activemq_topic_producer_count{%(activemqSelector)s, activemq_cluster=~"$activemq_cluster"},instance)' % $._config, - label='Instance', - refresh=2, - includeAll=true, - multi=true, - allValues='.+', - sort=0 - ), - template.custom( - 'k_selector', - query='2,4,6,8,10', - current='4', - label='Top queue count', - refresh='never', - includeAll=false, - multi=false, - allValues='' - ), - template.text( - 'name', - label='Queue by name', - ), - ] - ) - .addLink(grafana.link.dashboards( - asDropdown=false, - title='Other Apache ActiveMQ dashboards', - includeVars=true, - keepTime=true, - tags=($._config.dashboardTags), - )) - .addPanels( - [ - numberOfQueuesPanel(getMatcher($._config)) { gridPos: { h: 4, w: 6, x: 0, y: 0 } }, - queueSizePanel(getMatcher($._config)) { gridPos: { h: 4, w: 6, x: 6, y: 0 } }, - producerCountPanel(getMatcher($._config)) { gridPos: { h: 4, w: 6, x: 12, y: 0 } }, - consumerCountPanel(getMatcher($._config)) { gridPos: { h: 4, w: 6, x: 18, y: 0 } }, - topQueuesByEnqueueRatePanel(getMatcher($._config)) { gridPos: { h: 8, w: 12, x: 0, y: 4 } }, - topQueuesByDequeueRatePanel(getMatcher($._config)) { gridPos: { h: 8, w: 12, x: 12, y: 4 } }, - topQueuesByAverageEnqueueTimePanel(getMatcher($._config)) { gridPos: { h: 8, w: 12, x: 0, y: 12 } }, - topQueuesByExpiredMessageRatePanel(getMatcher($._config)) { gridPos: { h: 8, w: 12, x: 12, y: 12 } }, - topQueuesByAverageMessageSizePanel(getMatcher($._config)) { gridPos: { h: 7, w: 24, x: 0, y: 20 } }, - queueSummaryPanel(getMatcher($._config)) { gridPos: { h: 7, w: 24, x: 0, y: 27 } }, - ] - ), - }, -} diff --git a/apache-activemq-mixin/dashboards/apache-activemq-topic-overview.libsonnet b/apache-activemq-mixin/dashboards/apache-activemq-topic-overview.libsonnet deleted file mode 100644 index 2bdc02c98..000000000 --- a/apache-activemq-mixin/dashboards/apache-activemq-topic-overview.libsonnet +++ /dev/null @@ -1,945 +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 dashboardUid = 'apache-activemq-topic-overview'; - -local promDatasourceName = 'prometheus_datasource'; - -local promDatasource = { - uid: '${%s}' % promDatasourceName, -}; - -local numberOfTopicsPanel(matcher) = { - datasource: promDatasource, - targets: [ - prometheus.target( - 'count (activemq_topic_queue_size{' + matcher + ', instance=~"$instance", destination!~"ActiveMQ.Advisory.*"})', - datasource=promDatasource, - legendFormat='__auto', - ), - ], - type: 'stat', - title: 'Topics', - description: 'Number of topics connected with the broker instance.', - fieldConfig: { - defaults: { - color: { - mode: 'fixed', - }, - mappings: [], - thresholds: { - mode: 'absolute', - steps: [ - { - color: 'green', - value: null, - }, - ], - }, - unit: 'none', - }, - overrides: [], - }, - options: { - colorMode: 'none', - graphMode: 'area', - justifyMode: 'auto', - orientation: 'auto', - reduceOptions: { - calcs: [ - 'lastNotNull', - ], - fields: '', - values: false, - }, - textMode: 'auto', - }, - pluginVersion: '10.2.0-60139', -}; - -local producerCountPanel(matcher) = { - datasource: promDatasource, - targets: [ - prometheus.target( - 'sum (activemq_topic_producer_count{' + matcher + ', instance=~"$instance", destination!~"ActiveMQ.Advisory.*"})', - datasource=promDatasource, - legendFormat='__auto', - ), - ], - type: 'stat', - title: 'Producers', - description: 'The number of producers attached to topic destinations.', - fieldConfig: { - defaults: { - color: { - mode: 'fixed', - }, - mappings: [], - thresholds: { - mode: 'absolute', - steps: [ - { - color: 'green', - value: null, - }, - ], - }, - unit: 'none', - }, - overrides: [], - }, - options: { - colorMode: 'none', - graphMode: 'area', - justifyMode: 'auto', - orientation: 'auto', - reduceOptions: { - calcs: [ - 'lastNotNull', - ], - fields: '', - values: false, - }, - textMode: 'auto', - }, - pluginVersion: '10.2.0-60139', -}; - -local consumerCountPanel(matcher) = { - datasource: promDatasource, - targets: [ - prometheus.target( - 'sum (activemq_topic_consumer_count{' + matcher + ', instance=~"$instance", destination!~"ActiveMQ.Advisory.*"})', - datasource=promDatasource, - legendFormat='__auto', - ), - ], - type: 'stat', - title: 'Consumers', - description: 'The number of consumers subscribed to topic destinations.', - fieldConfig: { - defaults: { - color: { - mode: 'fixed', - }, - mappings: [], - thresholds: { - mode: 'absolute', - steps: [ - { - color: 'green', - value: null, - }, - ], - }, - unit: 'none', - }, - overrides: [], - }, - options: { - colorMode: 'none', - graphMode: 'area', - justifyMode: 'auto', - orientation: 'auto', - reduceOptions: { - calcs: [ - 'lastNotNull', - ], - fields: '', - values: false, - }, - textMode: 'auto', - }, - pluginVersion: '10.2.0-60139', -}; - -local averageConsumersPerTopicPanel(matcher) = { - datasource: promDatasource, - targets: [ - prometheus.target( - 'avg (activemq_topic_consumer_count{' + matcher + ', instance=~"$instance", destination!~"ActiveMQ.Advisory.*"})', - datasource=promDatasource, - legendFormat='__auto', - ), - ], - type: 'stat', - title: 'Average consumers per topic', - description: 'Average number of consumers per topic.', - fieldConfig: { - defaults: { - color: { - mode: 'fixed', - }, - mappings: [], - thresholds: { - mode: 'absolute', - steps: [ - { - color: 'green', - value: null, - }, - ], - }, - unit: 'none', - }, - overrides: [], - }, - options: { - colorMode: 'none', - graphMode: 'area', - justifyMode: 'auto', - orientation: 'auto', - reduceOptions: { - calcs: [ - 'lastNotNull', - ], - fields: '', - values: false, - }, - textMode: 'auto', - }, - pluginVersion: '10.2.0-60139', -}; - -local topTopicsByEnqueueRatePanel(matcher) = { - datasource: promDatasource, - targets: [ - prometheus.target( - 'topk by(instance, activemq_cluster, job) ($k_selector, rate(activemq_topic_enqueue_count{' + matcher + ', instance=~"$instance", destination!~"ActiveMQ.Advisory.*", destination=~".*$name.*"}[$__rate_interval]))', - datasource=promDatasource, - legendFormat='{{activemq_cluster}} - {{instance}} - {{destination}}', - ), - ], - type: 'timeseries', - title: 'Top topics by enqueue rate', - description: 'The rate messages are sent to topic destinations.', - fieldConfig: { - defaults: { - color: { - mode: 'palette-classic', - }, - custom: { - axisCenteredZero: false, - axisColorMode: 'text', - axisLabel: '', - axisPlacement: 'auto', - axisShow: false, - barAlignment: 0, - drawStyle: 'line', - fillOpacity: 25, - gradientMode: 'none', - hideFrom: { - legend: false, - tooltip: false, - viz: false, - }, - insertNulls: false, - lineInterpolation: 'smooth', - lineWidth: 2, - 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: 'mps', - }, - overrides: [], - }, - options: { - legend: { - calcs: [], - displayMode: 'list', - placement: 'right', - showLegend: true, - }, - tooltip: { - mode: 'multi', - sort: 'desc', - }, - }, -}; - -local topTopicsByDequeueRatePanel(matcher) = { - datasource: promDatasource, - targets: [ - prometheus.target( - 'topk by(instance, activemq_cluster, job) ($k_selector, rate(activemq_topic_dequeue_count{' + matcher + ', instance=~"$instance", destination!~"ActiveMQ.Advisory.*", destination=~".*$name.*"}[$__rate_interval]))', - datasource=promDatasource, - legendFormat='{{activemq_cluster}} - {{instance}} - {{destination}}', - ), - ], - type: 'timeseries', - title: 'Top topics by dequeue rate', - description: 'The rate messages have been acknowledged (and removed) from topic destinations', - fieldConfig: { - defaults: { - color: { - mode: 'palette-classic', - }, - custom: { - axisCenteredZero: false, - axisColorMode: 'text', - axisLabel: '', - axisPlacement: 'auto', - axisShow: false, - barAlignment: 0, - drawStyle: 'line', - fillOpacity: 25, - gradientMode: 'none', - hideFrom: { - legend: false, - tooltip: false, - viz: false, - }, - insertNulls: false, - lineInterpolation: 'smooth', - lineWidth: 2, - 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: 'mps', - }, - overrides: [], - }, - options: { - legend: { - calcs: [], - displayMode: 'list', - placement: 'right', - showLegend: true, - }, - tooltip: { - mode: 'multi', - sort: 'desc', - }, - }, -}; - -local topTopicsByAverageEnqueueTimePanel(matcher) = { - datasource: promDatasource, - targets: [ - prometheus.target( - 'topk by(instance, activemq_cluster, job) ($k_selector, activemq_topic_average_enqueue_time{' + matcher + ', instance=~"$instance", destination!~"ActiveMQ.Advisory.*", destination=~".*$name.*"})', - datasource=promDatasource, - legendFormat='{{activemq_cluster}} - {{instance}} - {{destination}}', - ), - ], - type: 'timeseries', - title: 'Top topics by average enqueue time', - description: 'Average time a message was held across all topic destinations.', - fieldConfig: { - defaults: { - color: { - mode: 'palette-classic', - }, - custom: { - axisCenteredZero: false, - axisColorMode: 'text', - axisLabel: '', - axisPlacement: 'auto', - axisShow: false, - barAlignment: 0, - drawStyle: 'line', - fillOpacity: 25, - gradientMode: 'none', - hideFrom: { - legend: false, - tooltip: false, - viz: false, - }, - insertNulls: false, - lineInterpolation: 'smooth', - lineWidth: 2, - 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: 'ms', - }, - overrides: [], - }, - options: { - legend: { - calcs: [], - displayMode: 'list', - placement: 'right', - showLegend: true, - }, - tooltip: { - mode: 'multi', - sort: 'desc', - }, - }, -}; - -local topTopicsByExpiredMessageRatePanel(matcher) = { - datasource: promDatasource, - targets: [ - prometheus.target( - 'topk by(instance, activemq_cluster, job) ($k_selector, rate(activemq_topic_expired_count{' + matcher + ', instance=~"$instance", destination!~"ActiveMQ.Advisory.*", destination=~".*$name.*"}[$__rate_interval]))', - datasource=promDatasource, - legendFormat='{{activemq_cluster}} - {{instance}} - {{destination}}', - ), - ], - type: 'timeseries', - title: 'Top topics by expired message rate', - description: 'The rate messages have expired on topic destinations.', - fieldConfig: { - defaults: { - color: { - mode: 'palette-classic', - }, - custom: { - axisCenteredZero: false, - axisColorMode: 'text', - axisLabel: '', - axisPlacement: 'auto', - axisShow: false, - barAlignment: 0, - drawStyle: 'line', - fillOpacity: 25, - gradientMode: 'none', - hideFrom: { - legend: false, - tooltip: false, - viz: false, - }, - insertNulls: false, - lineInterpolation: 'smooth', - lineWidth: 2, - 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: 'mps', - }, - overrides: [], - }, - options: { - legend: { - calcs: [], - displayMode: 'list', - placement: 'right', - showLegend: true, - }, - tooltip: { - mode: 'multi', - sort: 'desc', - }, - }, -}; - -local topTopicsByConsumersPanel(matcher) = { - datasource: promDatasource, - targets: [ - prometheus.target( - 'topk by(instance, activemq_cluster, job) ($k_selector, activemq_topic_consumer_count{' + matcher + ', instance=~"$instance", destination!~"ActiveMQ.Advisory.*", destination=~".*$name.*"})', - datasource=promDatasource, - legendFormat='{{activemq_cluster}} - {{instance}} - {{destination}}', - ), - ], - type: 'bargauge', - title: 'Top topics by consumers', - description: 'The number of consumers subscribed to the most active/used topics.', - fieldConfig: { - defaults: { - color: { - mode: 'fixed', - }, - mappings: [], - thresholds: { - mode: 'absolute', - steps: [ - { - color: 'green', - value: null, - }, - ], - }, - unit: 'none', - }, - overrides: [], - }, - options: { - displayMode: 'gradient', - minVizHeight: 10, - minVizWidth: 0, - orientation: 'horizontal', - reduceOptions: { - calcs: [ - 'lastNotNull', - ], - fields: '', - values: false, - }, - showUnfilled: true, - valueMode: 'color', - }, - pluginVersion: '10.2.0-60139', -}; - -local topTopicsByAverageMessageSizePanel(matcher) = { - datasource: promDatasource, - targets: [ - prometheus.target( - 'topk by(instance, activemq_cluster, job) ($k_selector, activemq_topic_average_message_size{' + matcher + ', instance=~"$instance", destination!~"ActiveMQ.Advisory.*", destination=~".*$name.*"})', - datasource=promDatasource, - legendFormat='{{activemq_cluster}} - {{instance}} - {{destination}}', - ), - ], - type: 'timeseries', - title: 'Top topics by average message size', - description: 'Average message size on topic destinations.', - fieldConfig: { - defaults: { - color: { - mode: 'palette-classic', - }, - custom: { - axisCenteredZero: false, - axisColorMode: 'text', - axisLabel: '', - axisPlacement: 'auto', - axisShow: false, - axisSoftMin: 0, - barAlignment: 0, - drawStyle: 'line', - fillOpacity: 25, - gradientMode: 'none', - hideFrom: { - legend: false, - tooltip: false, - viz: false, - }, - insertNulls: false, - lineInterpolation: 'smooth', - lineWidth: 2, - pointSize: 5, - scaleDistribution: { - type: 'linear', - }, - showPoints: 'never', - spanNulls: false, - stacking: { - group: 'A', - mode: 'normal', - }, - thresholdsStyle: { - mode: 'off', - }, - }, - mappings: [], - min: 0, - thresholds: { - mode: 'absolute', - steps: [ - { - color: 'green', - value: null, - }, - ], - }, - unit: 'decbytes', - }, - overrides: [], - }, - options: { - legend: { - calcs: [], - displayMode: 'list', - placement: 'right', - showLegend: true, - }, - tooltip: { - mode: 'multi', - sort: 'desc', - }, - }, -}; - -local topicSummaryPanel(matcher) = { - datasource: promDatasource, - targets: [ - prometheus.target( - 'rate(activemq_topic_enqueue_count{' + matcher + ', instance=~"$instance", destination!~"ActiveMQ.Advisory.*", destination=~".*$name.*"}[$__rate_interval])', - datasource=promDatasource, - legendFormat='{{instance}}', - format='table', - ), - prometheus.target( - 'rate(activemq_topic_dequeue_count{' + matcher + ', instance=~"$instance", destination!~"ActiveMQ.Advisory.*", destination=~".*$name.*"}[$__rate_interval])', - datasource=promDatasource, - legendFormat='{{instance}}', - format='table', - ), - prometheus.target( - 'activemq_topic_average_enqueue_time{' + matcher + ', instance=~"$instance", destination!~"ActiveMQ.Advisory.*", destination=~".*$name.*"}', - datasource=promDatasource, - legendFormat='{{instance}}', - format='table', - ), - prometheus.target( - 'activemq_topic_average_message_size{' + matcher + ', instance=~"$instance", destination!~"ActiveMQ.Advisory.*", destination=~".*$name.*"}', - datasource=promDatasource, - legendFormat='{{instance}}', - format='table', - ), - ], - type: 'table', - title: 'Topic summary', - description: 'Summary of topics showing topic name, enqueue and dequeue rate, average enqueue time, and average message size.', - fieldConfig: { - defaults: { - color: { - mode: 'thresholds', - }, - custom: { - align: 'left', - cellOptions: { - type: 'auto', - }, - inspect: false, - }, - mappings: [], - thresholds: { - mode: 'absolute', - steps: [ - { - color: 'green', - }, - ], - }, - }, - overrides: [ - { - matcher: { - id: 'byName', - options: 'Enqueue rate', - }, - properties: [ - { - id: 'unit', - value: 'mps', - }, - ], - }, - { - matcher: { - id: 'byName', - options: 'Dequeue rate', - }, - properties: [ - { - id: 'unit', - value: 'mps', - }, - ], - }, - { - matcher: { - id: 'byName', - options: 'Average enqueue time', - }, - properties: [ - { - id: 'unit', - value: 'ms', - }, - ], - }, - { - matcher: { - id: 'byName', - options: 'Average message size', - }, - properties: [ - { - id: 'unit', - value: 'decbytes', - }, - ], - }, - { - matcher: { - id: 'byName', - options: 'ActiveMQ cluster', - }, - properties: [ - { - id: 'links', - value: [ - { - title: 'Cluster link', - url: 'd/apache-activemq-cluster-overview?var-activemq_cluster=${__data.fields.activemq_cluster}&${__url_time_range}&var-datasource=${datasource}', - }, - ], - }, - ], - }, - { - matcher: { - id: 'byName', - options: 'Instance', - }, - properties: [ - { - id: 'links', - value: [ - { - title: 'Instance link', - url: 'd/apache-activemq-instance-overview?var-instance=${__data.fields.instance}&${__url_time_range}&var-datasource=${datasource}', - }, - ], - }, - ], - }, - ], - }, - options: { - cellHeight: 'sm', - footer: { - countRows: false, - fields: '', - reducer: [ - 'sum', - ], - show: false, - }, - showHeader: true, - }, - pluginVersion: '10.2.0-60139', - transformations: [ - { - id: 'joinByField', - options: { - byField: 'destination', - mode: 'outer', - }, - }, - { - id: 'organize', - options: { - indexByName: {}, - renameByName: { - 'Time 3': '', - 'Value #A': 'Enqueue rate', - 'Value #B': 'Dequeue rate', - 'Value #C': 'Average enqueue time', - 'Value #D': 'Average message size', - 'activemq_cluster 1': 'ActiveMQ cluster', - destination: 'Destination', - 'instance 1': 'Instance', - }, - }, - }, - { - id: 'filterFieldsByName', - options: { - include: { - names: [ - 'ActiveMQ cluster', - 'Instance', - 'Enqueue rate', - 'Dequeue rate', - 'Average enqueue time', - 'Average message size', - 'Destination', - ], - }, - }, - }, - ], -}; - -local getMatcher(cfg) = '%(activemqSelector)s, activemq_cluster=~"$activemq_cluster"' % cfg; - -{ - grafanaDashboards+:: { - 'apache-activemq-topic-overview.json': - dashboard.new( - 'Apache ActiveMQ topic 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(activemq_topic_producer_count,job)', - label='Job', - refresh=2, - includeAll=true, - multi=true, - allValues='.+', - sort=0 - ), - template.new( - 'cluster', - promDatasource, - 'label_values(activemq_memory_usage_ratio{job=~"$job"},cluster)', - label='Cluster', - refresh=2, - includeAll=true, - multi=true, - allValues='.*', - hide=if $._config.enableMultiCluster then '' else 'variable', - sort=0 - ), - template.new( - 'activemq_cluster', - promDatasource, - 'label_values(activemq_memory_usage_ratio{%(activemqSelector)s},activemq_cluster)' % $._config, - label='ActiveMQ cluster', - refresh=2, - includeAll=true, - multi=true, - allValues='.+', - sort=0 - ), - template.new( - 'instance', - promDatasource, - 'label_values(activemq_topic_producer_count{%(activemqSelector)s,activemq_cluster=~"$activemq_cluster"},instance)' % $._config, - label='Instance', - refresh=2, - includeAll=true, - multi=true, - allValues='.+', - sort=0 - ), - template.custom( - 'k_selector', - query='2,4,6,8,10', - current='4', - label='Top topic count', - refresh='never', - includeAll=false, - multi=false, - allValues='', - ), - template.text( - 'name', - label='Topic by name', - ), - ] - ) - .addLink(grafana.link.dashboards( - asDropdown=false, - title='Other Apache ActiveMQ dashboards', - includeVars=true, - keepTime=true, - tags=($._config.dashboardTags), - )) - .addPanels( - [ - numberOfTopicsPanel(getMatcher($._config)) { gridPos: { h: 4, w: 6, x: 0, y: 0 } }, - producerCountPanel(getMatcher($._config)) { gridPos: { h: 4, w: 6, x: 6, y: 0 } }, - consumerCountPanel(getMatcher($._config)) { gridPos: { h: 4, w: 6, x: 12, y: 0 } }, - averageConsumersPerTopicPanel(getMatcher($._config)) { gridPos: { h: 4, w: 6, x: 18, y: 0 } }, - topTopicsByEnqueueRatePanel(getMatcher($._config)) { gridPos: { h: 8, w: 12, x: 0, y: 4 } }, - topTopicsByDequeueRatePanel(getMatcher($._config)) { gridPos: { h: 8, w: 12, x: 12, y: 4 } }, - topTopicsByAverageEnqueueTimePanel(getMatcher($._config)) { gridPos: { h: 8, w: 12, x: 0, y: 12 } }, - topTopicsByExpiredMessageRatePanel(getMatcher($._config)) { gridPos: { h: 8, w: 12, x: 12, y: 12 } }, - topTopicsByConsumersPanel(getMatcher($._config)) { gridPos: { h: 8, w: 12, x: 0, y: 20 } }, - topTopicsByAverageMessageSizePanel(getMatcher($._config)) { gridPos: { h: 8, w: 12, x: 12, y: 20 } }, - topicSummaryPanel(getMatcher($._config)) { gridPos: { h: 8, w: 24, x: 0, y: 28 } }, - ] - ), - }, -} diff --git a/apache-activemq-mixin/dashboards/dashboards.libsonnet b/apache-activemq-mixin/dashboards/dashboards.libsonnet deleted file mode 100644 index 79d37edbd..000000000 --- a/apache-activemq-mixin/dashboards/dashboards.libsonnet +++ /dev/null @@ -1,5 +0,0 @@ -(import 'apache-activemq-cluster-overview.libsonnet') + -(import 'apache-activemq-instance-overview.libsonnet') + -(import 'apache-activemq-queue-overview.libsonnet') + -(import 'apache-activemq-topic-overview.libsonnet') + -(import 'apache-activemq-logs-overview.libsonnet') diff --git a/apache-activemq-mixin/dashboards_out/apache-activemq-cluster-overview.json b/apache-activemq-mixin/dashboards_out/apache-activemq-cluster-overview.json index 9fe0d4c21..7c386af9a 100644 --- a/apache-activemq-mixin/dashboards_out/apache-activemq-cluster-overview.json +++ b/apache-activemq-mixin/dashboards_out/apache-activemq-cluster-overview.json @@ -1,752 +1,1187 @@ { - "__inputs": [ ], - "__requires": [ ], "annotations": { "list": [ ] }, - "description": "", - "editable": false, - "gnetId": null, - "graphTooltip": 0, - "hideControls": false, - "id": null, "links": [ { - "asDropdown": false, - "icon": "external link", + "keepTime": true, + "title": "Apache ActiveMQ Queues", + "type": "link", + "url": "/d/apacheactivemq_queues" + }, + { + "keepTime": true, + "title": "Apache ActiveMQ Topics", + "type": "link", + "url": "/d/apacheactivemq_topics" + }, + { + "keepTime": true, + "title": "Logs", + "type": "link", + "url": "/d/apacheactivemq-logs" + }, + { + "asDropdown": true, "includeVars": true, "keepTime": true, "tags": [ - "apache-activemq-mixin" + "apache-activemq" + ], + "title": "All dashboards", + "type": "dashboards" + } + ], + "panels": [ + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 0, + "x": 0, + "y": 0 + }, + "id": 1, + "panels": [ ], + "title": "Broker Overview", + "type": "row" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${prometheus_datasource}" + }, + "description": "Number of Apache ActiveMQ brokers that are online.", + "fieldConfig": { + "defaults": { + "color": { + "fixedColor": "text", + "mode": "fixed" + } + } + }, + "gridPos": { + "h": 8, + "w": 6, + "x": 0, + "y": 1 + }, + "id": 2, + "pluginVersion": "v11.0.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${prometheus_datasource}" + }, + "expr": "count by () (activemq_memory_usage_ratio{job=~\"integrations/apache-activemq\",job=~\"$job\",cluster=~\"$cluster\",instance=~\"$instance\"})", + "format": "time_series", + "instant": false, + "legendFormat": "__auto", + "refId": "Brokers online" + } + ], + "title": "Brokers online", + "type": "stat" + }, + { + "datasource": { + "type": "datasource", + "uid": "-- Mixed --" + }, + "description": "The percentage of memory used by both topics and queues across brokers.", + "fieldConfig": { + "defaults": { + "thresholds": { + "steps": [ + { + "color": "green" + }, + { + "color": "#EAB839", + "value": 50 + }, + { + "color": "red", + "value": 70 + } + ] + }, + "unit": "percentunit" + } + }, + "gridPos": { + "h": 8, + "w": 6, + "x": 6, + "y": 1 + }, + "id": 3, + "pluginVersion": "v11.4.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${prometheus_datasource}" + }, + "expr": "activemq_memory_usage_ratio{job=~\"integrations/apache-activemq\",job=~\"$job\",cluster=~\"$cluster\",instance=~\"$instance\"}", + "format": "time_series", + "instant": false, + "legendFormat": "{{activemq_cluster}} - {{instance}}", + "refId": "Broker memory usage" + } + ], + "title": "Average broker memory usage", + "type": "gauge" + }, + { + "datasource": { + "type": "datasource", + "uid": "-- Mixed --" + }, + "description": "The percentage of store used by both topics and queues across brokers.", + "fieldConfig": { + "defaults": { + "thresholds": { + "steps": [ + { + "color": "green" + }, + { + "color": "#EAB839", + "value": 50 + }, + { + "color": "red", + "value": 70 + } + ] + }, + "unit": "percentunit" + } + }, + "gridPos": { + "h": 8, + "w": 6, + "x": 12, + "y": 1 + }, + "id": 4, + "pluginVersion": "v11.4.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${prometheus_datasource}" + }, + "expr": "activemq_store_usage_ratio{job=~\"integrations/apache-activemq\",job=~\"$job\",cluster=~\"$cluster\",instance=~\"$instance\"}", + "format": "time_series", + "instant": false, + "legendFormat": "{{activemq_cluster}} - {{instance}}", + "refId": "Broker store usage" + } + ], + "title": "Average broker store usage", + "type": "gauge" + }, + { + "datasource": { + "type": "datasource", + "uid": "-- Mixed --" + }, + "description": "The percentage of temporary storage used by both topics and queues across brokers.", + "fieldConfig": { + "defaults": { + "thresholds": { + "steps": [ + { + "color": "green" + }, + { + "color": "#EAB839", + "value": 50 + }, + { + "color": "red", + "value": 70 + } + ] + }, + "unit": "percentunit" + } + }, + "gridPos": { + "h": 8, + "w": 6, + "x": 18, + "y": 1 + }, + "id": 5, + "pluginVersion": "v11.4.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${prometheus_datasource}" + }, + "expr": "activemq_temp_usage_ratio{job=~\"integrations/apache-activemq\",job=~\"$job\",cluster=~\"$cluster\",instance=~\"$instance\"}", + "format": "time_series", + "instant": false, + "legendFormat": "{{activemq_cluster}} - {{instance}}", + "refId": "Broker temporary usage" + } + ], + "title": "Average broker temporary usage", + "type": "gauge" + }, + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 0, + "x": 0, + "y": 9 + }, + "id": 6, + "panels": [ ], + "title": "Queues", + "type": "row" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${prometheus_datasource}" + }, + "description": "Number of active queues.", + "fieldConfig": { + "defaults": { + "color": { + "fixedColor": "text", + "mode": "fixed" + } + } + }, + "gridPos": { + "h": 8, + "w": 6, + "x": 0, + "y": 10 + }, + "id": 7, + "pluginVersion": "v11.0.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${prometheus_datasource}" + }, + "expr": "count (activemq_queue_queue_size{job=~\"integrations/apache-activemq\",job=~\"$job\",cluster=~\"$cluster\",instance=~\"$instance\"})", + "format": "time_series", + "instant": false, + "legendFormat": "__auto", + "refId": "Queue count" + } + ], + "title": "Queue count", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${prometheus_datasource}" + }, + "description": "Total number of messages in all queues.", + "fieldConfig": { + "defaults": { + "color": { + "fixedColor": "text", + "mode": "fixed" + } + } + }, + "gridPos": { + "h": 8, + "w": 6, + "x": 6, + "y": 10 + }, + "id": 8, + "pluginVersion": "v11.0.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${prometheus_datasource}" + }, + "expr": "sum (activemq_queue_queue_size{job=~\"integrations/apache-activemq\",job=~\"$job\",cluster=~\"$cluster\",instance=~\"$instance\"})", + "format": "time_series", + "instant": false, + "legendFormat": "__auto", + "refId": "Total queue size" + } + ], + "title": "Total queue size", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${prometheus_datasource}" + }, + "description": "Total number of queue producers.", + "fieldConfig": { + "defaults": { + "color": { + "fixedColor": "text", + "mode": "fixed" + } + } + }, + "gridPos": { + "h": 8, + "w": 6, + "x": 12, + "y": 10 + }, + "id": 9, + "pluginVersion": "v11.0.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${prometheus_datasource}" + }, + "expr": "sum (activemq_queue_producer_count{job=~\"integrations/apache-activemq\",job=~\"$job\",cluster=~\"$cluster\",instance=~\"$instance\"})", + "format": "time_series", + "instant": false, + "legendFormat": "__auto", + "refId": "Total producers" + } + ], + "title": "Total queue producers", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${prometheus_datasource}" + }, + "description": "Total number of queue consumers.", + "fieldConfig": { + "defaults": { + "color": { + "fixedColor": "text", + "mode": "fixed" + } + } + }, + "gridPos": { + "h": 8, + "w": 6, + "x": 18, + "y": 10 + }, + "id": 10, + "pluginVersion": "v11.0.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${prometheus_datasource}" + }, + "expr": "sum (activemq_queue_consumer_count{job=~\"integrations/apache-activemq\",job=~\"$job\",cluster=~\"$cluster\",instance=~\"$instance\"})", + "format": "time_series", + "instant": false, + "legendFormat": "__auto", + "refId": "Total consumers" + } + ], + "title": "Total queue consumers", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${prometheus_datasource}" + }, + "description": "Rate of messages being enqueued to queues.", + "fieldConfig": { + "defaults": { + "custom": { + "fillOpacity": 0, + "gradientMode": "opacity", + "lineInterpolation": "smooth", + "lineWidth": 2, + "showPoints": "never", + "spanNulls": false + }, + "unit": "/ sec" + } + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 18 + }, + "id": 11, + "options": { + "legend": { + "calcs": [ ], + "displayMode": "list" + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "pluginVersion": "v11.0.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${prometheus_datasource}" + }, + "expr": "rate(activemq_queue_enqueue_count{job=~\"integrations/apache-activemq\",job=~\"$job\",cluster=~\"$cluster\",instance=~\"$instance\"}[$__rate_interval])", + "format": "time_series", + "instant": false, + "interval": "1m", + "legendFormat": "{{activemq_cluster}} - {{instance}} - {{destination}}", + "refId": "Enqueue rate" + } + ], + "title": "Queue enqueue rate", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${prometheus_datasource}" + }, + "description": "Rate of messages being dequeued from queues.", + "fieldConfig": { + "defaults": { + "custom": { + "fillOpacity": 0, + "gradientMode": "opacity", + "lineInterpolation": "smooth", + "lineWidth": 2, + "showPoints": "never", + "spanNulls": false + }, + "unit": "/ sec" + } + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 18 + }, + "id": 12, + "options": { + "legend": { + "calcs": [ ], + "displayMode": "list" + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "pluginVersion": "v11.0.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${prometheus_datasource}" + }, + "expr": "rate(activemq_queue_dequeue_count{job=~\"integrations/apache-activemq\",job=~\"$job\",cluster=~\"$cluster\",instance=~\"$instance\"}[$__rate_interval])", + "format": "time_series", + "instant": false, + "interval": "1m", + "legendFormat": "{{activemq_cluster}} - {{instance}} - {{destination}}", + "refId": "Dequeue rate" + } + ], + "title": "Queue dequeue rate", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${prometheus_datasource}" + }, + "description": "Average time to enqueue messages to queues.", + "fieldConfig": { + "defaults": { + "custom": { + "fillOpacity": 0, + "gradientMode": "opacity", + "lineInterpolation": "smooth", + "lineWidth": 2, + "showPoints": "never", + "spanNulls": false + }, + "unit": "ms" + } + }, + "gridPos": { + "h": 8, + "w": 8, + "x": 0, + "y": 26 + }, + "id": 13, + "options": { + "legend": { + "calcs": [ ], + "displayMode": "list" + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "pluginVersion": "v11.0.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${prometheus_datasource}" + }, + "expr": "activemq_queue_average_enqueue_time{job=~\"integrations/apache-activemq\",job=~\"$job\",cluster=~\"$cluster\",instance=~\"$instance\"}", + "format": "time_series", + "instant": false, + "legendFormat": "{{activemq_cluster}} - {{instance}} - {{destination}}", + "refId": "Average enqueue time" + } + ], + "title": "Queue average enqueue time", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${prometheus_datasource}" + }, + "description": "Rate of messages expiring in queues.", + "fieldConfig": { + "defaults": { + "custom": { + "fillOpacity": 0, + "gradientMode": "opacity", + "lineInterpolation": "smooth", + "lineWidth": 2, + "showPoints": "never", + "spanNulls": false + }, + "unit": "/ sec" + } + }, + "gridPos": { + "h": 8, + "w": 8, + "x": 8, + "y": 26 + }, + "id": 14, + "options": { + "legend": { + "calcs": [ ], + "displayMode": "list" + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "pluginVersion": "v11.0.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${prometheus_datasource}" + }, + "expr": "rate(activemq_queue_expired_count{job=~\"integrations/apache-activemq\",job=~\"$job\",cluster=~\"$cluster\",instance=~\"$instance\"}[$__rate_interval])", + "format": "time_series", + "instant": false, + "interval": "1m", + "legendFormat": "{{activemq_cluster}} - {{instance}} - {{destination}}", + "refId": "Expired rate" + } ], - "targetBlank": false, - "title": "Other Apache ActiveMQ dashboards", - "type": "dashboards", - "url": "" - } - ], - "panels": [ + "title": "Queue expired rate", + "type": "timeseries" + }, { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, - "description": "Number of clusters that are reporting metrics from ActiveMQ.", + "description": "Average size of messages in queues.", "fieldConfig": { "defaults": { - "color": { - "mode": "fixed" - }, - "mappings": [ ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] + "custom": { + "fillOpacity": 54, + "gradientMode": "opacity", + "lineInterpolation": "smooth", + "lineWidth": 2, + "showPoints": "never", + "spanNulls": false }, - "unit": "none" - }, - "overrides": [ ] + "unit": "bytes" + } }, "gridPos": { - "h": 4, - "w": 6, - "x": 0, - "y": 0 + "h": 8, + "w": 8, + "x": 16, + "y": 26 }, - "id": 2, + "id": 15, "options": { - "colorMode": "none", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false + "legend": { + "calcs": [ ], + "displayMode": "list" }, - "textMode": "auto" + "tooltip": { + "mode": "multi", + "sort": "desc" + } }, - "pluginVersion": "10.2.0-60139", + "pluginVersion": "v11.0.0", "targets": [ { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, - "expr": "count (activemq_memory_usage_ratio{job=~\"$job\", activemq_cluster=~\"$activemq_cluster\"})", + "expr": "activemq_queue_average_message_size{job=~\"integrations/apache-activemq\",job=~\"$job\",cluster=~\"$cluster\",instance=~\"$instance\"}", "format": "time_series", - "intervalFactor": 2, - "legendFormat": "__auto" + "instant": false, + "legendFormat": "{{activemq_cluster}} - {{instance}} - {{destination}}", + "refId": "Average message size" } ], - "title": "Clusters", - "type": "stat" + "title": "Queue average message size", + "type": "timeseries" + }, + { + "collapsed": false, + "gridPos": { + "h": 1, + "w": 0, + "x": 0, + "y": 34 + }, + "id": 16, + "panels": [ ], + "title": "Topics", + "type": "row" }, { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, - "description": "Number of broker instances across clusters.", + "description": "Number of active topics (excluding advisory topics).", "fieldConfig": { "defaults": { "color": { + "fixedColor": "text", "mode": "fixed" + } + } + }, + "gridPos": { + "h": 8, + "w": 6, + "x": 0, + "y": 35 + }, + "id": 17, + "pluginVersion": "v11.0.0", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${prometheus_datasource}" }, - "mappings": [ ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [ ] + "expr": "count (activemq_topic_queue_size{job=~\"integrations/apache-activemq\",job=~\"$job\",cluster=~\"$cluster\",instance=~\"$instance\", destination!~\"ActiveMQ.Advisory.*\"})", + "format": "time_series", + "instant": false, + "legendFormat": "__auto", + "refId": "Topic count" + } + ], + "title": "Topic count", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${prometheus_datasource}" + }, + "description": "Total number of topic producers.", + "fieldConfig": { + "defaults": { + "color": { + "fixedColor": "text", + "mode": "fixed" + } + } }, "gridPos": { - "h": 4, + "h": 8, "w": 6, "x": 6, - "y": 0 + "y": 35 }, - "id": 3, - "options": { - "colorMode": "none", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "10.2.0-60139", + "id": 18, + "pluginVersion": "v11.0.0", "targets": [ { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, - "expr": "count (activemq_memory_usage_ratio{job=~\"$job\", activemq_cluster=~\"$activemq_cluster\"})", + "expr": "sum (activemq_topic_producer_count{job=~\"integrations/apache-activemq\",job=~\"$job\",cluster=~\"$cluster\",instance=~\"$instance\", destination!~\"ActiveMQ.Advisory.*\"})", "format": "time_series", - "intervalFactor": 2, - "legendFormat": "__auto" + "instant": false, + "legendFormat": "__auto", + "refId": "Total producers" } ], - "title": "Brokers", + "title": "Total topic producers", "type": "stat" }, { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, - "description": "Number of message producers active on destinations across clusters.", + "description": "Total number of topic consumers.", "fieldConfig": { "defaults": { "color": { + "fixedColor": "text", "mode": "fixed" - }, - "mappings": [ ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [ ] + } + } }, "gridPos": { - "h": 4, + "h": 8, "w": 6, "x": 12, - "y": 0 - }, - "id": 4, - "options": { - "colorMode": "none", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "textMode": "auto" + "y": 35 }, - "pluginVersion": "10.2.0-60139", + "id": 19, + "pluginVersion": "v11.0.0", "targets": [ { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, - "expr": "sum (activemq_queue_producer_count{job=~\"$job\", activemq_cluster=~\"$activemq_cluster\"}) + sum (activemq_topic_producer_count{job=~\"$job\", activemq_cluster=~\"$activemq_cluster\",destination!~\"ActiveMQ.Advisory.*\"})", + "expr": "sum (activemq_topic_consumer_count{job=~\"integrations/apache-activemq\",job=~\"$job\",cluster=~\"$cluster\",instance=~\"$instance\", destination!~\"ActiveMQ.Advisory.*\"})", "format": "time_series", - "intervalFactor": 2, - "legendFormat": "__auto" + "instant": false, + "legendFormat": "__auto", + "refId": "Total consumers" } ], - "title": "Producers", + "title": "Total topic consumers", "type": "stat" }, { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, - "description": "The number of consumers subscribed to destinations across clusters.", + "description": "Average number of consumers per topic.", "fieldConfig": { "defaults": { "color": { + "fixedColor": "text", "mode": "fixed" - }, - "mappings": [ ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [ ] + } + } }, "gridPos": { - "h": 4, + "h": 8, "w": 6, "x": 18, - "y": 0 - }, - "id": 5, - "options": { - "colorMode": "none", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "textMode": "auto" + "y": 35 }, - "pluginVersion": "10.2.0-60139", + "id": 20, + "pluginVersion": "v11.0.0", "targets": [ { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, - "expr": "sum (activemq_queue_consumer_count{job=~\"$job\", activemq_cluster=~\"$activemq_cluster\"}) + sum (activemq_topic_consumer_count{job=~\"$job\", activemq_cluster=~\"$activemq_cluster\",destination!~\"ActiveMQ.Advisory.*\"})", + "expr": "avg (activemq_topic_consumer_count{job=~\"integrations/apache-activemq\",job=~\"$job\",cluster=~\"$cluster\",instance=~\"$instance\", destination!~\"ActiveMQ.Advisory.*\"})", "format": "time_series", - "intervalFactor": 2, - "legendFormat": "__auto" + "instant": false, + "legendFormat": "__auto", + "refId": "Average consumers per topic" } ], - "title": "Consumers", + "title": "Average consumers per topic", "type": "stat" }, { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, - "description": "Number of messages that have been sent to destinations in a cluster", + "description": "Rate of messages being enqueued to topics.", "fieldConfig": { "defaults": { - "color": { - "fixedColor": "#C8F2C2", - "mode": "palette-classic" - }, "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "axisShow": false, - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 25, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, + "fillOpacity": 0, + "gradientMode": "opacity", "lineInterpolation": "smooth", "lineWidth": 2, - "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 - } - ] + "spanNulls": false }, - "unit": "none" - }, - "overrides": [ ] + "unit": "/ sec" + } }, "gridPos": { "h": 8, "w": 12, "x": 0, - "y": 6 + "y": 43 }, - "id": 6, + "id": 21, "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": "sum by (activemq_cluster, job) (increase(activemq_queue_enqueue_count{job=~\"$job\", activemq_cluster=~\"$activemq_cluster\"}[$__interval:])) + sum by (activemq_cluster, job) (increase(activemq_topic_enqueue_count{job=~\"$job\", activemq_cluster=~\"$activemq_cluster\", destination!~\"ActiveMQ.Advisory.*\"}[$__interval:]))", + "expr": "rate(activemq_topic_enqueue_count{job=~\"integrations/apache-activemq\",job=~\"$job\",cluster=~\"$cluster\",instance=~\"$instance\", destination!~\"ActiveMQ.Advisory.*\"}[$__rate_interval])", "format": "time_series", + "instant": false, "interval": "1m", - "intervalFactor": 2, - "legendFormat": "{{activemq_cluster}}" + "legendFormat": "{{activemq_cluster}} - {{instance}} - {{destination}}", + "refId": "Enqueue rate" } ], - "title": "Enqueue / $__interval", + "title": "Topic enqueue rate", "type": "timeseries" }, { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, - "description": "Number of messages that have been acknowledged (and removed) from destinations in a cluster.", + "description": "Rate of messages being dequeued from topics.", "fieldConfig": { "defaults": { - "color": { - "mode": "palette-classic" - }, "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "axisShow": false, - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 25, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, + "fillOpacity": 0, + "gradientMode": "opacity", "lineInterpolation": "smooth", "lineWidth": 2, - "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 - } - ] + "spanNulls": false }, - "unit": "none" - }, - "overrides": [ ] + "unit": "/ sec" + } }, "gridPos": { "h": 8, "w": 12, "x": 12, - "y": 6 + "y": 43 }, - "id": 7, + "id": 22, "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": "sum by (activemq_cluster, job) (increase(activemq_queue_dequeue_count{job=~\"$job\", activemq_cluster=~\"$activemq_cluster\"}[$__interval:])) + sum by (activemq_cluster, job) (increase(activemq_topic_dequeue_count{job=~\"$job\", activemq_cluster=~\"$activemq_cluster\", destination!~\"ActiveMQ.Advisory.*\"}[$__interval:]))", + "expr": "rate(activemq_topic_dequeue_count{job=~\"integrations/apache-activemq\",job=~\"$job\",cluster=~\"$cluster\",instance=~\"$instance\", destination!~\"ActiveMQ.Advisory.*\"}[$__rate_interval])", "format": "time_series", + "instant": false, "interval": "1m", - "intervalFactor": 2, - "legendFormat": "{{activemq_cluster}}" + "legendFormat": "{{activemq_cluster}} - {{instance}} - {{destination}}", + "refId": "Dequeue rate" } ], - "title": "Dequeue / $__interval", + "title": "Topic dequeue rate", "type": "timeseries" }, { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, - "description": "Average percentage of temporary memory used across clusters.", + "description": "Average time to enqueue messages to topics.", "fieldConfig": { "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [ ], - "max": 1, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "#EAB839", - "value": 50 - }, - { - "color": "red", - "value": 70 - } - ] + "custom": { + "fillOpacity": 0, + "gradientMode": "opacity", + "lineInterpolation": "smooth", + "lineWidth": 2, + "showPoints": "never", + "spanNulls": false }, - "unit": "percentunit" - }, - "overrides": [ ] + "unit": "ms" + } }, "gridPos": { - "h": 10, + "h": 8, "w": 8, "x": 0, - "y": 14 + "y": 51 }, - "id": 8, + "id": 23, "options": { - "displayMode": "gradient", - "minVizHeight": 10, - "minVizWidth": 0, - "orientation": "horizontal", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false + "legend": { + "calcs": [ ], + "displayMode": "list" }, - "showUnfilled": false, - "text": { }, - "valueMode": "color" + "tooltip": { + "mode": "multi", + "sort": "desc" + } }, - "pluginVersion": "10.2.0-60139", + "pluginVersion": "v11.0.0", "targets": [ { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, - "expr": "avg by (activemq_cluster, job) (activemq_temp_usage_ratio{job=~\"$job\", activemq_cluster=~\"$activemq_cluster\"})", + "expr": "activemq_topic_average_enqueue_time{job=~\"integrations/apache-activemq\",job=~\"$job\",cluster=~\"$cluster\",instance=~\"$instance\", destination!~\"ActiveMQ.Advisory.*\"}", "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{activemq_cluster}}" + "instant": false, + "legendFormat": "{{activemq_cluster}} - {{instance}} - {{destination}}", + "refId": "Average enqueue time" } ], - "title": "Average temporary memory usage", - "type": "bargauge" + "title": "Topic average enqueue time", + "type": "timeseries" }, { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, - "description": "Average percentage of store memory used across clusters.", + "description": "Rate of messages expiring in topics.", "fieldConfig": { "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [ ], - "max": 1, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "#EAB839", - "value": 50 - }, - { - "color": "red", - "value": 70 - } - ] + "custom": { + "fillOpacity": 0, + "gradientMode": "opacity", + "lineInterpolation": "smooth", + "lineWidth": 2, + "showPoints": "never", + "spanNulls": false }, - "unit": "percentunit" - }, - "overrides": [ ] + "unit": "/ sec" + } }, "gridPos": { - "h": 10, + "h": 8, "w": 8, "x": 8, - "y": 14 + "y": 51 }, - "id": 9, + "id": 24, "options": { - "displayMode": "gradient", - "minVizHeight": 10, - "minVizWidth": 0, - "orientation": "horizontal", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false + "legend": { + "calcs": [ ], + "displayMode": "list" }, - "showUnfilled": false, - "valueMode": "color" + "tooltip": { + "mode": "multi", + "sort": "desc" + } }, - "pluginVersion": "10.2.0-60139", + "pluginVersion": "v11.0.0", "targets": [ { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, - "expr": "avg by (activemq_cluster, job) (activemq_store_usage_ratio{job=~\"$job\", activemq_cluster=~\"$activemq_cluster\"})", + "expr": "rate(activemq_topic_expired_count{job=~\"integrations/apache-activemq\",job=~\"$job\",cluster=~\"$cluster\",instance=~\"$instance\", destination!~\"ActiveMQ.Advisory.*\"}[$__rate_interval])", "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{activemq_cluster}}" + "instant": false, + "interval": "1m", + "legendFormat": "{{activemq_cluster}} - {{instance}} - {{destination}}", + "refId": "Expired rate" } ], - "title": "Average store memory usage", - "type": "bargauge" + "title": "Topic expired rate", + "type": "timeseries" }, { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, - "description": "Average percentage of broker memory used across clusters.", + "description": "Average size of messages in topics.", "fieldConfig": { "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [ ], - "max": 1, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "#EAB839", - "value": 50 - }, - { - "color": "red", - "value": 70 - } - ] + "custom": { + "fillOpacity": 54, + "gradientMode": "opacity", + "lineInterpolation": "smooth", + "lineWidth": 2, + "showPoints": "never", + "spanNulls": false }, - "unit": "percentunit" - }, - "overrides": [ ] + "unit": "bytes" + } }, "gridPos": { - "h": 10, + "h": 8, "w": 8, "x": 16, - "y": 14 + "y": 51 }, - "id": 10, + "id": 25, "options": { - "displayMode": "gradient", - "minVizHeight": 10, - "minVizWidth": 0, - "orientation": "horizontal", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false + "legend": { + "calcs": [ ], + "displayMode": "list" }, - "showUnfilled": false, - "valueMode": "color" + "tooltip": { + "mode": "multi", + "sort": "desc" + } }, - "pluginVersion": "10.2.0-60139", + "pluginVersion": "v11.0.0", "targets": [ { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, - "expr": "avg by (activemq_cluster, job) (activemq_memory_usage_ratio{job=~\"$job\", activemq_cluster=~\"$activemq_cluster\"})", + "expr": "activemq_topic_average_message_size{job=~\"integrations/apache-activemq\",job=~\"$job\",cluster=~\"$cluster\",instance=~\"$instance\", destination!~\"ActiveMQ.Advisory.*\"}", "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{activemq_cluster}}" + "instant": false, + "legendFormat": "{{activemq_cluster}} - {{instance}} - {{destination}}", + "refId": "Average message size" } ], - "title": "Average broker memory usage", - "type": "bargauge" + "title": "Topic average message size", + "type": "timeseries" } ], "refresh": "1m", - "rows": [ ], - "schemaVersion": 14, - "style": "dark", + "schemaVersion": 39, "tags": [ - "apache-activemq-mixin" + "apache-activemq" ], "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(activemq_topic_producer_count,job)", + "query": "label_values(activemq_memory_usage_ratio{job=~\"integrations/apache-activemq\"}, 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": 2, "includeAll": true, "label": "Cluster", "multi": true, "name": "cluster", - "options": [ ], - "query": "label_values(activemq_memory_usage_ratio{job=~\"$job\", cluster=~\"$cluster\"},cluster)", + "query": "label_values(activemq_memory_usage_ratio{job=~\"integrations/apache-activemq\",job=~\"$job\"}, cluster)", "refresh": 2, - "regex": "", - "sort": 0, - "tagValuesQuery": "", - "tags": [ ], - "tagsQuery": "", - "type": "query", - "useTags": false + "sort": 1, + "type": "query" + }, + { + "allValue": ".+", + "datasource": { + "type": "prometheus", + "uid": "${prometheus_datasource}" + }, + "includeAll": true, + "label": "Instance", + "multi": true, + "name": "instance", + "query": "label_values(activemq_memory_usage_ratio{job=~\"integrations/apache-activemq\",job=~\"$job\",cluster=~\"$cluster\"}, instance)", + "refresh": 2, + "sort": 1, + "type": "query" }, { "allValue": ".+", - "current": { }, "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, - "hide": 0, "includeAll": true, - "label": "ActiveMQ cluster", + "label": "Activemq_cluster", "multi": true, "name": "activemq_cluster", - "options": [ ], - "query": "label_values(activemq_memory_usage_ratio{job=~\"$job\"},activemq_cluster)", + "query": "label_values(activemq_memory_usage_ratio{job=~\"integrations/apache-activemq\",job=~\"$job\",cluster=~\"$cluster\",instance=~\"$instance\"}, activemq_cluster)", "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" } ] }, @@ -754,33 +1189,7 @@ "from": "now-30m", "to": "now" }, - "timepicker": { - "refresh_intervals": [ - "5s", - "10s", - "30s", - "1m", - "5m", - "15m", - "30m", - "1h", - "2h", - "1d" - ], - "time_options": [ - "5m", - "15m", - "1h", - "6h", - "12h", - "24h", - "2d", - "7d", - "30d" - ] - }, "timezone": "default", - "title": "Apache ActiveMQ cluster overview", - "uid": "apache-activemq-cluster-overview", - "version": 0 + "title": "Apache ActiveMQ overview", + "uid": "apacheactivemq_overview" } \ No newline at end of file diff --git a/apache-activemq-mixin/dashboards_out/apache-activemq-instance-overview.json b/apache-activemq-mixin/dashboards_out/apache-activemq-instance-overview.json deleted file mode 100644 index c55f2c7dc..000000000 --- a/apache-activemq-mixin/dashboards_out/apache-activemq-instance-overview.json +++ /dev/null @@ -1,1375 +0,0 @@ -{ - "__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, - "tags": [ - "apache-activemq-mixin" - ], - "targetBlank": false, - "title": "Other Apache ActiveMQ dashboards", - "type": "dashboards", - "url": "" - } - ], - "panels": [ - { - "datasource": { - "uid": "${prometheus_datasource}" - }, - "description": "The percentage of memory used by both topics and queues across brokers.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [ ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "#EAB839", - "value": 50 - }, - { - "color": "red", - "value": 70 - } - ] - }, - "unit": "percentunit" - }, - "overrides": [ ] - }, - "gridPos": { - "h": 4, - "w": 6, - "x": 0, - "y": 0 - }, - "id": 2, - "options": { - "minVizHeight": 75, - "minVizWidth": 75, - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showThresholdLabels": false, - "showThresholdMarkers": true - }, - "pluginVersion": "10.2.0-60139", - "targets": [ - { - "datasource": { - "uid": "${prometheus_datasource}" - }, - "expr": "avg (activemq_memory_usage_ratio{job=~\"$job\", activemq_cluster=~\"$activemq_cluster\", instance=~\"$instance\"})", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{activemq_cluster}} - {{instance}}" - } - ], - "title": "Average broker memory usage", - "type": "gauge" - }, - { - "datasource": { - "uid": "${prometheus_datasource}" - }, - "description": "The percentage of store memory used by both topics and queues across brokers.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [ ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "#EAB839", - "value": 50 - }, - { - "color": "red", - "value": 70 - } - ] - }, - "unit": "percentunit" - }, - "overrides": [ ] - }, - "gridPos": { - "h": 4, - "w": 6, - "x": 6, - "y": 0 - }, - "id": 3, - "options": { - "minVizHeight": 75, - "minVizWidth": 75, - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showThresholdLabels": false, - "showThresholdMarkers": true - }, - "pluginVersion": "10.2.0-60139", - "targets": [ - { - "datasource": { - "uid": "${prometheus_datasource}" - }, - "expr": "avg (activemq_store_usage_ratio{job=~\"$job\", activemq_cluster=~\"$activemq_cluster\", instance=~\"$instance\"})", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "__auto" - } - ], - "title": "Average store memory usage", - "type": "gauge" - }, - { - "datasource": { - "uid": "${prometheus_datasource}" - }, - "description": "The percentage of temporary memory used by both topics and queues across brokers.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [ ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "#EAB839", - "value": 50 - }, - { - "color": "red", - "value": 70 - } - ] - }, - "unit": "percentunit" - }, - "overrides": [ ] - }, - "gridPos": { - "h": 4, - "w": 6, - "x": 12, - "y": 0 - }, - "id": 4, - "options": { - "minVizHeight": 75, - "minVizWidth": 75, - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showThresholdLabels": false, - "showThresholdMarkers": true - }, - "pluginVersion": "10.2.0-60139", - "targets": [ - { - "datasource": { - "uid": "${prometheus_datasource}" - }, - "expr": "avg (activemq_temp_usage_ratio{job=~\"$job\", activemq_cluster=~\"$activemq_cluster\", instance=~\"$instance\"})", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "__auto" - } - ], - "title": "Average temporary memory usage", - "type": "gauge" - }, - { - "datasource": { - "uid": "${prometheus_datasource}" - }, - "description": "Recent number of unacknowledged messages on the broker.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "fixed" - }, - "mappings": [ ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [ ] - }, - "gridPos": { - "h": 4, - "w": 6, - "x": 18, - "y": 0 - }, - "id": 5, - "options": { - "colorMode": "none", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "10.2.0-60139", - "targets": [ - { - "datasource": { - "uid": "${prometheus_datasource}" - }, - "expr": "sum (increase(activemq_message_total{job=~\"$job\", activemq_cluster=~\"$activemq_cluster\", instance=~\"$instance\"}[$__interval:]))", - "format": "time_series", - "interval": "1m", - "intervalFactor": 2, - "legendFormat": "__auto" - } - ], - "title": "Unacknowledged messages / $__interval", - "type": "stat" - }, - { - "datasource": { - "uid": "${prometheus_datasource}" - }, - "description": "Firing alerts for Apache ActiveMQ environment.", - "gridPos": { - "h": 6, - "w": 12, - "x": 0, - "y": 4 - }, - "id": 6, - "options": { - "alertInstanceLabelFilter": "{job=~\"${job:regex}\", activemq_cluster=~\"${activemq_cluster:regex}\", instance=~\"${instance:regex}\"}", - "alertName": "", - "dashboardAlerts": false, - "datasource": { - "uid": "${prometheus_datasource}" - }, - "groupBy": [ ], - "groupMode": "default", - "maxItems": 5, - "sortOrder": 1, - "stateFilter": { - "error": true, - "firing": true, - "noData": true, - "normal": true, - "pending": true - }, - "viewMode": "list" - }, - "targets": [ ], - "title": "ActiveMQ alerts", - "type": "alertlist" - }, - { - "datasource": { - "uid": "${prometheus_datasource}" - }, - "description": "The number of producers attached to destinations.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "fixed" - }, - "mappings": [ ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [ ] - }, - "gridPos": { - "h": 6, - "w": 6, - "x": 12, - "y": 4 - }, - "id": 7, - "options": { - "colorMode": "none", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "10.2.0-60139", - "targets": [ - { - "datasource": { - "uid": "${prometheus_datasource}" - }, - "expr": "sum (activemq_queue_producer_count{job=~\"$job\", activemq_cluster=~\"$activemq_cluster\", instance=~\"$instance\"}) + sum (activemq_topic_producer_count{job=~\"$job\", activemq_cluster=~\"$activemq_cluster\", instance=~\"$instance\", destination!~\"ActiveMQ.Advisory.*\"})", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "__auto" - } - ], - "title": "Producers", - "type": "stat" - }, - { - "datasource": { - "uid": "${prometheus_datasource}" - }, - "description": "The number of consumers subscribed to destinations on the broker.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "fixed" - }, - "mappings": [ ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [ ] - }, - "gridPos": { - "h": 6, - "w": 6, - "x": 18, - "y": 4 - }, - "id": 8, - "options": { - "colorMode": "none", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "10.2.0-60139", - "targets": [ - { - "datasource": { - "uid": "${prometheus_datasource}" - }, - "expr": "sum (activemq_queue_consumer_count{job=~\"$job\", activemq_cluster=~\"$activemq_cluster\", instance=~\"$instance\"}) + sum (activemq_topic_consumer_count{job=~\"$job\", activemq_cluster=~\"$activemq_cluster\", instance=~\"$instance\", destination!~\"ActiveMQ.Advisory.*\"})", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "__auto" - } - ], - "title": "Consumers", - "type": "stat" - }, - { - "datasource": { - "uid": "${prometheus_datasource}" - }, - "description": "Number of messages on queue destinations, including any that have been dispatched but not acknowledged.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "axisShow": false, - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 25, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "smooth", - "lineWidth": 2, - "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 - } - ] - }, - "unit": "none" - }, - "overrides": [ ] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 10 - }, - "id": 9, - "options": { - "legend": { - "calcs": [ ], - "displayMode": "list", - "placement": "right", - "showLegend": true - }, - "tooltip": { - "mode": "multi", - "sort": "desc" - } - }, - "targets": [ - { - "datasource": { - "uid": "${prometheus_datasource}" - }, - "expr": "sum by(instance, activemq_cluster, job) (activemq_queue_queue_size{job=~\"$job\", activemq_cluster=~\"$activemq_cluster\", instance=~\"$instance\"})", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{activemq_cluster}} - {{instance}}" - } - ], - "title": "Queue size", - "type": "timeseries" - }, - { - "datasource": { - "uid": "${prometheus_datasource}" - }, - "description": "The percentage of memory being used by topic and queue destinations.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "axisShow": false, - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 25, - "gradientMode": "opacity", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "smooth", - "lineWidth": 2, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "normal" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [ ], - "max": 100, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - }, - "unit": "percent" - }, - "overrides": [ ] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 10 - }, - "id": 10, - "options": { - "legend": { - "calcs": [ ], - "displayMode": "list", - "placement": "right", - "showLegend": true - }, - "tooltip": { - "mode": "multi", - "sort": "desc" - } - }, - "targets": [ - { - "datasource": { - "uid": "${prometheus_datasource}" - }, - "expr": "sum by(instance, activemq_cluster, job) (activemq_queue_memory_percent_usage{job=~\"$job\", activemq_cluster=~\"$activemq_cluster\", instance=~\"$instance\"})", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{activemq_cluster}} - {{instance}} - queue" - }, - { - "datasource": { - "uid": "${prometheus_datasource}" - }, - "expr": "sum by(instance, activemq_cluster, job) (activemq_topic_memory_percent_usage{job=~\"$job\", activemq_cluster=~\"$activemq_cluster\", instance=~\"$instance\", destination!~\"ActiveMQ.Advisory.*\"})", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{activemq_cluster}} - {{instance}} - topic" - } - ], - "title": "Destination memory usage", - "type": "timeseries" - }, - { - "datasource": { - "uid": "${prometheus_datasource}" - }, - "description": "Number of messages that have been sent to the destination.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "axisShow": false, - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 25, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "smooth", - "lineWidth": 2, - "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 - } - ] - }, - "unit": "none" - }, - "overrides": [ ] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 18 - }, - "id": 11, - "options": { - "legend": { - "calcs": [ ], - "displayMode": "list", - "placement": "right", - "showLegend": true - }, - "tooltip": { - "mode": "multi", - "sort": "desc" - } - }, - "targets": [ - { - "datasource": { - "uid": "${prometheus_datasource}" - }, - "expr": "sum by(instance, activemq_cluster, job) (increase(activemq_queue_enqueue_count{job=~\"$job\", activemq_cluster=~\"$activemq_cluster\", instance=~\"$instance\"}[$__interval:]))", - "format": "time_series", - "interval": "1m", - "intervalFactor": 2, - "legendFormat": "{{activemq_cluster}} - {{instance}} - queue" - }, - { - "datasource": { - "uid": "${prometheus_datasource}" - }, - "expr": "sum by(instance, activemq_cluster, job) (increase(activemq_topic_enqueue_count{job=~\"$job\", activemq_cluster=~\"$activemq_cluster\", instance=~\"$instance\", destination!~\"ActiveMQ.Advisory.*\"}[$__interval:]))", - "format": "time_series", - "interval": "1m", - "intervalFactor": 2, - "legendFormat": "{{activemq_cluster}} - {{instance}} - topic" - } - ], - "title": "Enqueue / $__interval", - "type": "timeseries" - }, - { - "datasource": { - "uid": "${prometheus_datasource}" - }, - "description": "Number of messages that have been acknowledged (and removed) from the destinations.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "axisShow": false, - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 25, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "smooth", - "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 - } - ] - }, - "unit": "none" - }, - "overrides": [ ] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 18 - }, - "id": 12, - "options": { - "legend": { - "calcs": [ ], - "displayMode": "list", - "placement": "right", - "showLegend": true - }, - "tooltip": { - "mode": "multi", - "sort": "desc" - } - }, - "targets": [ - { - "datasource": { - "uid": "${prometheus_datasource}" - }, - "expr": "sum by(instance, activemq_cluster) (increase(activemq_queue_dequeue_count{job=~\"$job\", activemq_cluster=~\"$activemq_cluster\", instance=~\"$instance\"}[$__interval:]))", - "format": "time_series", - "interval": "1m", - "intervalFactor": 2, - "legendFormat": "{{activemq_cluster}} - {{instance}} - queue" - }, - { - "datasource": { - "uid": "${prometheus_datasource}" - }, - "expr": "sum by(instance, activemq_cluster) (increase(activemq_topic_dequeue_count{job=~\"$job\", activemq_cluster=~\"$activemq_cluster\", instance=~\"$instance\", destination!~\"ActiveMQ.Advisory.*\"}[$__interval:]))", - "format": "time_series", - "interval": "1m", - "intervalFactor": 2, - "legendFormat": "{{activemq_cluster}} - {{instance}} - topic" - } - ], - "title": "Dequeue / $__interval", - "type": "timeseries" - }, - { - "datasource": { - "uid": "${prometheus_datasource}" - }, - "description": "Average time a message was held across all destinations.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "axisShow": false, - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 25, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "smooth", - "lineWidth": 2, - "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 - } - ] - }, - "unit": "ms" - }, - "overrides": [ ] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 26 - }, - "id": 13, - "options": { - "legend": { - "calcs": [ ], - "displayMode": "list", - "placement": "right", - "showLegend": true - }, - "tooltip": { - "mode": "multi", - "sort": "desc" - } - }, - "targets": [ - { - "datasource": { - "uid": "${prometheus_datasource}" - }, - "expr": "avg by (activemq_cluster, instance, job) (activemq_queue_average_enqueue_time{job=~\"$job\", activemq_cluster=~\"$activemq_cluster\", instance=~\"$instance\"})", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{activemq_cluster}} - {{instance}} - queue" - }, - { - "datasource": { - "uid": "${prometheus_datasource}" - }, - "expr": "avg by (activemq_cluster, instance, job) (activemq_topic_average_enqueue_time{job=~\"$job\", activemq_cluster=~\"$activemq_cluster\", instance=~\"$instance\", destination!~\"ActiveMQ.Advisory.*\"})", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{activemq_cluster}} - {{instance}} - topic" - } - ], - "title": "Average enqueue time", - "type": "timeseries" - }, - { - "datasource": { - "uid": "${prometheus_datasource}" - }, - "description": "Number of messages across destinations that are expired.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "axisShow": false, - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 25, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "smooth", - "lineWidth": 2, - "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 - } - ] - }, - "unit": "none" - }, - "overrides": [ ] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 26 - }, - "id": 14, - "options": { - "legend": { - "calcs": [ ], - "displayMode": "list", - "placement": "right", - "showLegend": true - }, - "tooltip": { - "mode": "multi", - "sort": "desc" - } - }, - "targets": [ - { - "datasource": { - "uid": "${prometheus_datasource}" - }, - "expr": "sum by(instance, activemq_cluster, job) (increase(activemq_queue_expired_count{job=~\"$job\", activemq_cluster=~\"$activemq_cluster\", instance=~\"$instance\"}[$__interval:]))", - "format": "time_series", - "interval": "1m", - "intervalFactor": 2, - "legendFormat": "{{activemq_cluster}} - {{instance}} - queue" - }, - { - "datasource": { - "uid": "${prometheus_datasource}" - }, - "expr": "sum by(instance, activemq_cluster, job) (increase(activemq_topic_expired_count{job=~\"$job\", activemq_cluster=~\"$activemq_cluster\", instance=~\"$instance\", destination!~\"ActiveMQ.Advisory.*\"}[$__interval:]))", - "format": "time_series", - "interval": "1m", - "intervalFactor": 2, - "legendFormat": "{{activemq_cluster}} - {{instance}} - topic" - } - ], - "title": "Expired messages / $__interval", - "type": "timeseries" - }, - { - "collapsed": false, - "datasource": { - "uid": "${prometheus_datasource}" - }, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 34 - }, - "id": 15, - "targets": [ ], - "title": "JVM resources", - "type": "row" - }, - { - "datasource": { - "uid": "${prometheus_datasource}" - }, - "description": "The time spent performing recent garbage collections", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "axisShow": false, - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 25, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "smooth", - "lineWidth": 2, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [ ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" - } - ] - }, - "unit": "s" - }, - "overrides": [ ] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 35 - }, - "id": 16, - "options": { - "legend": { - "calcs": [ ], - "displayMode": "list", - "placement": "right", - "showLegend": true - }, - "tooltip": { - "mode": "multi", - "sort": "desc" - } - }, - "targets": [ - { - "datasource": { - "uid": "${prometheus_datasource}" - }, - "expr": "jvm_gc_duration_seconds{job=~\"$job\", activemq_cluster=~\"$activemq_cluster\", instance=~\"$instance\"}", - "format": "time_series", - "interval": "1m", - "intervalFactor": 2, - "legendFormat": "{{activemq_cluster}} - {{instance}}" - } - ], - "title": "Garbage collection duration", - "type": "timeseries" - }, - { - "datasource": { - "uid": "${prometheus_datasource}" - }, - "description": "The recent increase in the number of garbage collection events for the JVM.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "axisShow": false, - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 25, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "smooth", - "lineWidth": 2, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [ ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" - } - ] - }, - "unit": "none" - }, - "overrides": [ ] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 35 - }, - "id": 17, - "options": { - "legend": { - "calcs": [ ], - "displayMode": "list", - "placement": "right", - "showLegend": true - }, - "tooltip": { - "mode": "multi", - "sort": "desc" - } - }, - "targets": [ - { - "datasource": { - "uid": "${prometheus_datasource}" - }, - "expr": "increase(jvm_gc_collection_count{job=~\"$job\", activemq_cluster=~\"$activemq_cluster\", instance=~\"$instance\", name=\"G1 Young Generation\"}[$__interval:])", - "format": "time_series", - "interval": "1m", - "intervalFactor": 2, - "legendFormat": "{{activemq_cluster}} - {{instance}}" - } - ], - "title": "Garbage collection count / $__interval", - "type": "timeseries" - } - ], - "refresh": "1m", - "rows": [ ], - "schemaVersion": 14, - "style": "dark", - "tags": [ - "apache-activemq-mixin" - ], - "templating": { - "list": [ - { - "current": { }, - "hide": 0, - "label": "Data source", - "name": "prometheus_datasource", - "options": [ ], - "query": "prometheus", - "refresh": 1, - "regex": "", - "type": "datasource" - }, - { - "allValue": ".+", - "current": { }, - "datasource": { - "uid": "${prometheus_datasource}" - }, - "hide": 0, - "includeAll": true, - "label": "Job", - "multi": true, - "name": "job", - "options": [ ], - "query": "label_values(activemq_topic_producer_count,job)", - "refresh": 2, - "regex": "", - "sort": 0, - "tagValuesQuery": "", - "tags": [ ], - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "allValue": ".*", - "current": { }, - "datasource": { - "uid": "${prometheus_datasource}" - }, - "hide": 2, - "includeAll": true, - "label": "Cluster", - "multi": true, - "name": "cluster", - "options": [ ], - "query": "label_values(activemq_memory_usage_ratio{job=~\"$job\"},cluster)", - "refresh": 2, - "regex": "", - "sort": 0, - "tagValuesQuery": "", - "tags": [ ], - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "allValue": ".+", - "current": { }, - "datasource": { - "uid": "${prometheus_datasource}" - }, - "hide": 0, - "includeAll": true, - "label": "ActiveMQ cluster", - "multi": true, - "name": "activemq_cluster", - "options": [ ], - "query": "label_values(activemq_memory_usage_ratio{job=~\"$job\"},activemq_cluster)", - "refresh": 2, - "regex": "", - "sort": 0, - "tagValuesQuery": "", - "tags": [ ], - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "allValue": ".+", - "current": { }, - "datasource": { - "uid": "${prometheus_datasource}" - }, - "hide": 0, - "includeAll": true, - "label": "Instance", - "multi": true, - "name": "instance", - "options": [ ], - "query": "label_values(activemq_topic_producer_count{job=~\"$job\", activemq_cluster=~\"$activemq_cluster\"},instance)", - "refresh": 2, - "regex": "", - "sort": 0, - "tagValuesQuery": "", - "tags": [ ], - "tagsQuery": "", - "type": "query", - "useTags": false - } - ] - }, - "time": { - "from": "now-30m", - "to": "now" - }, - "timepicker": { - "refresh_intervals": [ - "5s", - "10s", - "30s", - "1m", - "5m", - "15m", - "30m", - "1h", - "2h", - "1d" - ], - "time_options": [ - "5m", - "15m", - "1h", - "6h", - "12h", - "24h", - "2d", - "7d", - "30d" - ] - }, - "timezone": "default", - "title": "Apache ActiveMQ instance overview", - "uid": "apache-activemq-instance-overview", - "version": 0 - } \ No newline at end of file diff --git a/apache-activemq-mixin/dashboards_out/apache-activemq-logs.json b/apache-activemq-mixin/dashboards_out/apache-activemq-logs.json index 468ad1ded..cc88df51e 100644 --- a/apache-activemq-mixin/dashboards_out/apache-activemq-logs.json +++ b/apache-activemq-mixin/dashboards_out/apache-activemq-logs.json @@ -1,17 +1,35 @@ { + "annotations": { + "list": [ ] + }, "links": [ { - "asDropdown": false, - "icon": "external link", + "keepTime": true, + "title": "Apache ActiveMQ Cluster Overview", + "type": "link", + "url": "/d/apacheactivemq_overview" + }, + { + "keepTime": true, + "title": "Apache ActiveMQ Queues", + "type": "link", + "url": "/d/apacheactivemq_queues" + }, + { + "keepTime": true, + "title": "Apache ActiveMQ Topics", + "type": "link", + "url": "/d/apacheactivemq_topics" + }, + { + "asDropdown": true, "includeVars": true, "keepTime": true, "tags": [ - "apache-activemq-mixin" + "apache-activemq" ], - "targetBlank": false, - "title": "Other Apache ActiveMQ dashboards", - "type": "dashboards", - "url": "" + "title": "All dashboards", + "type": "dashboards" } ], "panels": [ @@ -161,7 +179,7 @@ "type": "loki", "uid": "${loki_datasource}" }, - "expr": "sum by (level) (count_over_time({job=~\"integrations/apache-activemq\",job=~\"$job\",activemq_cluster=~\"$activemq_cluster\",instance=~\"$instance\",level=~\"$level\"}\n|~ \"$regex_search\"\n\n[$__auto]))\n", + "expr": "sum by (level) (count_over_time({job=~\"integrations/apache-activemq\",job=~\"$job\",cluster=~\"$cluster\"}\n|~ \"$regex_search\"\n\n[$__auto]))\n", "legendFormat": "{{ level }}" } ], @@ -194,7 +212,7 @@ "enableLogDetails": true, "prettifyLogMessage": true, "showTime": false, - "wrapLogMessage": true + "wrapLogMessage": false }, "pluginVersion": "v11.0.0", "targets": [ @@ -203,7 +221,7 @@ "type": "loki", "uid": "${loki_datasource}" }, - "expr": "{job=~\"integrations/apache-activemq\",job=~\"$job\",activemq_cluster=~\"$activemq_cluster\",instance=~\"$instance\",level=~\"$level\"} \n|~ \"$regex_search\"\n\n\n" + "expr": "{job=~\"integrations/apache-activemq\",job=~\"$job\",cluster=~\"$cluster\"} \n|~ \"$regex_search\"\n\n\n" } ], "title": "Logs", @@ -213,7 +231,7 @@ "refresh": "1m", "schemaVersion": 39, "tags": [ - "apache-activemq-mixin" + "apache-activemq" ], "templating": { "list": [ @@ -246,40 +264,10 @@ "uid": "${loki_datasource}" }, "includeAll": true, - "label": "Activemq_cluster", - "multi": true, - "name": "activemq_cluster", - "query": "label_values({job=~\"integrations/apache-activemq\",job=~\"$job\"}, activemq_cluster)", - "refresh": 2, - "sort": 1, - "type": "query" - }, - { - "allValue": ".*", - "datasource": { - "type": "loki", - "uid": "${loki_datasource}" - }, - "includeAll": true, - "label": "Instance", + "label": "Cluster", "multi": true, - "name": "instance", - "query": "label_values({job=~\"integrations/apache-activemq\",job=~\"$job\",activemq_cluster=~\"$activemq_cluster\"}, instance)", - "refresh": 2, - "sort": 1, - "type": "query" - }, - { - "allValue": ".*", - "datasource": { - "type": "loki", - "uid": "${loki_datasource}" - }, - "includeAll": true, - "label": "Level", - "multi": true, - "name": "level", - "query": "label_values({job=~\"integrations/apache-activemq\",job=~\"$job\",activemq_cluster=~\"$activemq_cluster\",instance=~\"$instance\"}, level)", + "name": "cluster", + "query": "label_values({job=~\"integrations/apache-activemq\",job=~\"$job\"}, cluster)", "refresh": 2, "sort": 1, "type": "query" @@ -301,14 +289,22 @@ ], "query": "", "type": "textbox" + }, + { + "hide": 2, + "label": "Prometheus data source", + "name": "prometheus_datasource", + "query": "prometheus", + "regex": "", + "type": "datasource" } ] }, "time": { - "from": "now-6h", + "from": "now-30m", "to": "now" }, - "timezone": "utc", + "timezone": "default", "title": "Apache ActiveMQ logs", - "uid": "apache-activemq-logs" + "uid": "apacheactivemq-logs" } \ No newline at end of file diff --git a/apache-activemq-mixin/dashboards_out/apache-activemq-queue-overview.json b/apache-activemq-mixin/dashboards_out/apache-activemq-queue-overview.json index c4d1cc424..ae1d4af36 100644 --- a/apache-activemq-mixin/dashboards_out/apache-activemq-queue-overview.json +++ b/apache-activemq-mixin/dashboards_out/apache-activemq-queue-overview.json @@ -1,1088 +1,553 @@ { - "__inputs": [ ], - "__requires": [ ], "annotations": { "list": [ ] }, - "description": "", - "editable": false, - "gnetId": null, - "graphTooltip": 0, - "hideControls": false, - "id": null, "links": [ { - "asDropdown": false, - "icon": "external link", + "keepTime": true, + "title": "Apache ActiveMQ Cluster Overview", + "type": "link", + "url": "/d/apacheactivemq_overview" + }, + { + "keepTime": true, + "title": "Apache ActiveMQ Topics", + "type": "link", + "url": "/d/apacheactivemq_topics" + }, + { + "keepTime": true, + "title": "Logs", + "type": "link", + "url": "/d/apacheactivemq-logs" + }, + { + "asDropdown": true, "includeVars": true, "keepTime": true, "tags": [ - "apache-activemq-mixin" + "apache-activemq" ], - "targetBlank": false, - "title": "Other Apache ActiveMQ 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": "Queues", + "type": "row" + }, { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, - "description": "Number of queues connected with the broker instance.", + "description": "Number of active queues.", "fieldConfig": { "defaults": { "color": { + "fixedColor": "text", "mode": "fixed" - }, - "mappings": [ ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [ ] + } + } }, "gridPos": { - "h": 4, + "h": 8, "w": 6, "x": 0, - "y": 0 + "y": 1 }, "id": 2, - "options": { - "colorMode": "none", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "10.2.0-60139", + "pluginVersion": "v11.0.0", "targets": [ { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, - "expr": "count (activemq_queue_queue_size{job=~\"$job\", activemq_cluster=~\"$activemq_cluster\", instance=~\"$instance\"})", + "expr": "count (activemq_queue_queue_size{job=~\"integrations/apache-activemq\",job=~\"$job\",cluster=~\"$cluster\",instance=~\"$instance\"})", "format": "time_series", - "intervalFactor": 2, - "legendFormat": "__auto" + "instant": false, + "legendFormat": "__auto", + "refId": "Queue count" } ], - "title": "Queues", + "title": "Queue count", "type": "stat" }, { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, - "description": "Number of messages in queue destinations.", + "description": "Total number of messages in all queues.", "fieldConfig": { "defaults": { "color": { + "fixedColor": "text", "mode": "fixed" - }, - "mappings": [ ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] } - }, - "overrides": [ ] + } }, "gridPos": { - "h": 4, + "h": 8, "w": 6, "x": 6, - "y": 0 + "y": 1 }, "id": 3, - "options": { - "colorMode": "none", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "10.2.0-60139", + "pluginVersion": "v11.0.0", "targets": [ { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, - "expr": "sum (activemq_queue_queue_size{job=~\"$job\", activemq_cluster=~\"$activemq_cluster\", instance=~\"$instance\"})", + "expr": "sum (activemq_queue_queue_size{job=~\"integrations/apache-activemq\",job=~\"$job\",cluster=~\"$cluster\",instance=~\"$instance\"})", "format": "time_series", - "intervalFactor": 2, - "legendFormat": "__auto" + "instant": false, + "legendFormat": "__auto", + "refId": "Total queue size" } ], - "title": "Queue size", + "title": "Total queue size", "type": "stat" }, { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, - "description": "The number of producers attached to queue destinations.", + "description": "Total number of queue producers.", "fieldConfig": { "defaults": { "color": { + "fixedColor": "text", "mode": "fixed" - }, - "mappings": [ ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [ ] + } + } }, "gridPos": { - "h": 4, + "h": 8, "w": 6, "x": 12, - "y": 0 + "y": 1 }, "id": 4, - "options": { - "colorMode": "none", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "10.2.0-60139", + "pluginVersion": "v11.0.0", "targets": [ { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, - "expr": "sum (activemq_queue_producer_count{job=~\"$job\", activemq_cluster=~\"$activemq_cluster\", instance=~\"$instance\"})", + "expr": "sum (activemq_queue_producer_count{job=~\"integrations/apache-activemq\",job=~\"$job\",cluster=~\"$cluster\",instance=~\"$instance\"})", "format": "time_series", - "intervalFactor": 2, - "legendFormat": "__auto" + "instant": false, + "legendFormat": "__auto", + "refId": "Total producers" } ], - "title": "Producers", + "title": "Total queue producers", "type": "stat" }, { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, - "description": "The number of consumers subscribed to queue destinations.", + "description": "Total number of queue consumers.", "fieldConfig": { "defaults": { "color": { + "fixedColor": "text", "mode": "fixed" - }, - "mappings": [ ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [ ] + } + } }, "gridPos": { - "h": 4, + "h": 8, "w": 6, "x": 18, - "y": 0 + "y": 1 }, "id": 5, - "options": { - "colorMode": "none", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "10.2.0-60139", + "pluginVersion": "v11.0.0", "targets": [ { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, - "expr": "sum (activemq_queue_consumer_count{job=~\"$job\", activemq_cluster=~\"$activemq_cluster\", instance=~\"$instance\"})", + "expr": "sum (activemq_queue_consumer_count{job=~\"integrations/apache-activemq\",job=~\"$job\",cluster=~\"$cluster\",instance=~\"$instance\"})", "format": "time_series", - "intervalFactor": 2, - "legendFormat": "__auto" + "instant": false, + "legendFormat": "__auto", + "refId": "Total consumers" } ], - "title": "Consumers", + "title": "Total queue consumers", "type": "stat" }, { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, - "description": "The rate messages sent to queue destinations.", + "description": "Rate of messages being enqueued to queues.", "fieldConfig": { "defaults": { - "color": { - "mode": "palette-classic" - }, "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "axisShow": false, - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 25, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, + "fillOpacity": 0, + "gradientMode": "opacity", "lineInterpolation": "smooth", "lineWidth": 2, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } + "spanNulls": false }, - "mappings": [ ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - }, - "unit": "mps" - }, - "overrides": [ ] + "unit": "/ sec" + } }, "gridPos": { "h": 8, "w": 12, "x": 0, - "y": 4 + "y": 9 }, "id": 6, "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": "topk by(instance, activemq_cluster, job) ($k_selector, rate(activemq_queue_enqueue_count{job=~\"$job\", activemq_cluster=~\"$activemq_cluster\", instance=~\"$instance\", destination=~\".*$name.*\"}[$__rate_interval]))", + "expr": "rate(activemq_queue_enqueue_count{job=~\"integrations/apache-activemq\",job=~\"$job\",cluster=~\"$cluster\",instance=~\"$instance\"}[$__rate_interval])", "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{activemq_cluster}} - {{instance}} - {{destination}}" + "instant": false, + "interval": "1m", + "legendFormat": "{{activemq_cluster}} - {{instance}} - {{destination}}", + "refId": "Enqueue rate" } ], - "title": "Top queues by enqueue rate", + "title": "Queue enqueue rate", "type": "timeseries" }, { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, - "description": "The rate messages have been acknowledged (and removed) from queue destinations.", + "description": "Rate of messages being dequeued from queues.", "fieldConfig": { "defaults": { - "color": { - "mode": "palette-classic" - }, "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "axisShow": false, - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 25, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, + "fillOpacity": 0, + "gradientMode": "opacity", "lineInterpolation": "smooth", "lineWidth": 2, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } + "spanNulls": false }, - "mappings": [ ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - }, - "unit": "mps" - }, - "overrides": [ ] + "unit": "/ sec" + } }, "gridPos": { "h": 8, "w": 12, "x": 12, - "y": 4 + "y": 9 }, "id": 7, "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": "topk by(instance, activemq_cluster) ($k_selector, rate(activemq_queue_dequeue_count{job=~\"$job\", activemq_cluster=~\"$activemq_cluster\",instance=~\"$instance\", destination=~\".*$name.*\"}[$__rate_interval]))", + "expr": "rate(activemq_queue_dequeue_count{job=~\"integrations/apache-activemq\",job=~\"$job\",cluster=~\"$cluster\",instance=~\"$instance\"}[$__rate_interval])", "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{activemq_cluster}} - {{instance}} - {{destination}}" + "instant": false, + "interval": "1m", + "legendFormat": "{{activemq_cluster}} - {{instance}} - {{destination}}", + "refId": "Dequeue rate" } ], - "title": "Top queues by dequeue rate", + "title": "Queue dequeue rate", "type": "timeseries" }, { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, - "description": "Average time a message was held on queue destinations.", + "description": "Average time to enqueue messages to queues.", "fieldConfig": { "defaults": { - "color": { - "mode": "palette-classic" - }, "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "axisShow": false, - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 25, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, + "fillOpacity": 0, + "gradientMode": "opacity", "lineInterpolation": "smooth", "lineWidth": 2, - "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 - } - ] + "spanNulls": false }, "unit": "ms" - }, - "overrides": [ ] + } }, "gridPos": { "h": 8, - "w": 12, + "w": 8, "x": 0, - "y": 12 + "y": 17 }, "id": 8, "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": "topk by(instance, activemq_cluster) ($k_selector, activemq_queue_average_enqueue_time{job=~\"$job\", activemq_cluster=~\"$activemq_cluster\", instance=~\"$instance\", destination=~\".*$name.*\"})", + "expr": "activemq_queue_average_enqueue_time{job=~\"integrations/apache-activemq\",job=~\"$job\",cluster=~\"$cluster\",instance=~\"$instance\"}", "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{activemq_cluster}} - {{instance}} - {{destination}}" + "instant": false, + "legendFormat": "{{activemq_cluster}} - {{instance}} - {{destination}}", + "refId": "Average enqueue time" } ], - "title": "Top queues by average enqueue time", + "title": "Queue average enqueue time", "type": "timeseries" }, { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, - "description": "The rate messages have expired on queue destinations.", + "description": "Rate of messages expiring in queues.", "fieldConfig": { "defaults": { - "color": { - "mode": "palette-classic" - }, "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "axisShow": false, - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 25, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, + "fillOpacity": 0, + "gradientMode": "opacity", "lineInterpolation": "smooth", "lineWidth": 2, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } + "spanNulls": false }, - "mappings": [ ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - }, - "unit": "mps" - }, - "overrides": [ ] + "unit": "/ sec" + } }, "gridPos": { "h": 8, - "w": 12, - "x": 12, - "y": 12 + "w": 8, + "x": 8, + "y": 17 }, "id": 9, "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": "topk by(instance, activemq_cluster, job) ($k_selector, rate(activemq_queue_expired_count{job=~\"$job\", activemq_cluster=~\"$activemq_cluster\", instance=~\"$instance\", destination=~\".*$name.*\"}[$__rate_interval]))", + "expr": "rate(activemq_queue_expired_count{job=~\"integrations/apache-activemq\",job=~\"$job\",cluster=~\"$cluster\",instance=~\"$instance\"}[$__rate_interval])", "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{activemq_cluster}} - {{instance}} - {{destination}}" + "instant": false, + "interval": "1m", + "legendFormat": "{{activemq_cluster}} - {{instance}} - {{destination}}", + "refId": "Expired rate" } ], - "title": "Top queues by expired message rate", + "title": "Queue expired rate", "type": "timeseries" }, { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, - "description": "Average message size on queue destinations.", + "description": "Average size of messages in queues.", "fieldConfig": { "defaults": { - "color": { - "mode": "palette-classic" - }, "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "axisShow": false, - "axisSoftMin": 0, - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 25, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, + "fillOpacity": 54, + "gradientMode": "opacity", "lineInterpolation": "smooth", "lineWidth": 2, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } + "spanNulls": false }, - "mappings": [ ], - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - }, - "unit": "decbytes" - }, - "overrides": [ ] + "unit": "bytes" + } }, "gridPos": { - "h": 7, - "w": 24, - "x": 0, - "y": 20 + "h": 8, + "w": 8, + "x": 16, + "y": 17 }, "id": 10, "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": "topk by(instance, activemq_cluster, job) ($k_selector, activemq_queue_average_message_size{job=~\"$job\", activemq_cluster=~\"$activemq_cluster\", instance=~\"$instance\", destination=~\".*$name.*\"})", + "expr": "activemq_queue_average_message_size{job=~\"integrations/apache-activemq\",job=~\"$job\",cluster=~\"$cluster\",instance=~\"$instance\"}", "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{activemq_cluster}} - {{instance}} - {{destination}}" + "instant": false, + "legendFormat": "{{activemq_cluster}} - {{instance}} - {{destination}}", + "refId": "Average message size" } ], - "title": "Top queues by average message size", + "title": "Queue average message size", "type": "timeseries" - }, - { - "datasource": { - "uid": "${prometheus_datasource}" - }, - "description": "Summary of queues showing queue name, enqueue and dequeue rate, average enqueue time, and average message size.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": { - "align": "center", - "cellOptions": { - "type": "auto" - }, - "inspect": false - }, - "mappings": [ ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Average message size" - }, - "properties": [ - { - "id": "unit", - "value": "decbytes" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Enqueue rate" - }, - "properties": [ - { - "id": "unit", - "value": "mps" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Dequeue rate" - }, - "properties": [ - { - "id": "unit", - "value": "mps" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Average enqueue time" - }, - "properties": [ - { - "id": "unit", - "value": "ms" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "ActiveMQ cluster" - }, - "properties": [ - { - "id": "links", - "value": [ - { - "title": "Cluster link", - "url": "d/apache-activemq-cluster-overview?var-activemq_cluster=${__data.fields.activemq_cluster}&${__url_time_range}&var-datasource=${datasource}" - } - ] - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Instance" - }, - "properties": [ - { - "id": "links", - "value": [ - { - "title": "Instance link", - "url": "d/apache-activemq-instance-overview?var-instance=${__data.fields.instance}&${__url_time_range}&var-datasource=${datasource}" - } - ] - } - ] - } - ] - }, - "gridPos": { - "h": 7, - "w": 24, - "x": 0, - "y": 27 - }, - "id": 11, - "options": { - "cellHeight": "sm", - "footer": { - "countRows": false, - "fields": "", - "reducer": [ - "sum" - ], - "show": false - }, - "showHeader": true, - "sortBy": [ ] - }, - "pluginVersion": "10.2.0-60139", - "targets": [ - { - "datasource": { - "uid": "${prometheus_datasource}" - }, - "expr": "rate(activemq_queue_enqueue_count{job=~\"$job\", activemq_cluster=~\"$activemq_cluster\", instance=~\"$instance\", destination=~\".*$name.*\"}[$__rate_interval:])", - "format": "table", - "intervalFactor": 2, - "legendFormat": "{{instance}}" - }, - { - "datasource": { - "uid": "${prometheus_datasource}" - }, - "expr": "rate(activemq_queue_dequeue_count{job=~\"$job\", activemq_cluster=~\"$activemq_cluster\", instance=~\"$instance\", destination=~\".*$name.*\"}[$__rate_interval:])", - "format": "table", - "intervalFactor": 2, - "legendFormat": "{{instance}}" - }, - { - "datasource": { - "uid": "${prometheus_datasource}" - }, - "expr": "activemq_queue_average_enqueue_time{job=~\"$job\", activemq_cluster=~\"$activemq_cluster\", instance=~\"$instance\", destination=~\".*$name.*\"}", - "format": "table", - "intervalFactor": 2, - "legendFormat": "{{instance}}" - }, - { - "datasource": { - "uid": "${prometheus_datasource}" - }, - "expr": "activemq_queue_average_message_size{job=~\"$job\", activemq_cluster=~\"$activemq_cluster\", instance=~\"$instance\", destination=~\".*$name.*\"}", - "format": "table", - "intervalFactor": 2, - "legendFormat": "{{instance}}" - } - ], - "title": "Queue summary", - "transformations": [ - { - "id": "joinByField", - "options": { - "byField": "destination", - "mode": "outer" - } - }, - { - "id": "organize", - "options": { - "indexByName": { }, - "renameByName": { - "Time 1": "", - "Value #A": "Enqueue rate", - "Value #B": "Dequeue rate", - "Value #C": "Average enqueue time", - "Value #D": "Average message size", - "activemq_cluster 1": "ActiveMQ cluster", - "destination": "Destination", - "instance 1": "Instance" - } - } - }, - { - "id": "filterFieldsByName", - "options": { - "include": { - "names": [ - "ActiveMQ cluster", - "Instance", - "Enqueue rate", - "Dequeue rate", - "Average enqueue time", - "Average message size", - "Destination" - ] - } - } - } - ], - "type": "table" } ], "refresh": "1m", - "rows": [ ], - "schemaVersion": 14, - "style": "dark", + "schemaVersion": 39, "tags": [ - "apache-activemq-mixin" + "apache-activemq" ], "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(activemq_topic_producer_count,job)", + "query": "label_values(activemq_memory_usage_ratio{job=~\"integrations/apache-activemq\"}, 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": 2, "includeAll": true, "label": "Cluster", "multi": true, "name": "cluster", - "options": [ ], - "query": "label_values(activemq_memory_usage_ratio{job=~\"$job\"},cluster)", + "query": "label_values(activemq_memory_usage_ratio{job=~\"integrations/apache-activemq\",job=~\"$job\"}, cluster)", "refresh": 2, - "regex": "", - "sort": 0, - "tagValuesQuery": "", - "tags": [ ], - "tagsQuery": "", - "type": "query", - "useTags": false + "sort": 1, + "type": "query" }, { "allValue": ".+", - "current": { }, "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, - "hide": 0, "includeAll": true, - "label": "ActiveMQ cluster", + "label": "Instance", "multi": true, - "name": "activemq_cluster", - "options": [ ], - "query": "label_values(activemq_memory_usage_ratio{job=~\"$job\"},activemq_cluster)", + "name": "instance", + "query": "label_values(activemq_memory_usage_ratio{job=~\"integrations/apache-activemq\",job=~\"$job\",cluster=~\"$cluster\"}, instance)", "refresh": 2, - "regex": "", - "sort": 0, - "tagValuesQuery": "", - "tags": [ ], - "tagsQuery": "", - "type": "query", - "useTags": false + "sort": 1, + "type": "query" }, { "allValue": ".+", - "current": { }, "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, - "hide": 0, "includeAll": true, - "label": "Instance", + "label": "Activemq_cluster", "multi": true, - "name": "instance", - "options": [ ], - "query": "label_values(activemq_topic_producer_count{job=~\"$job\", activemq_cluster=~\"$activemq_cluster\"},instance)", + "name": "activemq_cluster", + "query": "label_values(activemq_memory_usage_ratio{job=~\"integrations/apache-activemq\",job=~\"$job\",cluster=~\"$cluster\",instance=~\"$instance\"}, activemq_cluster)", "refresh": 2, - "regex": "", - "sort": 0, - "tagValuesQuery": "", - "tags": [ ], - "tagsQuery": "", - "type": "query", - "useTags": false + "sort": 1, + "type": "query" }, { - "allValue": "", - "current": { - "text": "4", - "value": "4" - }, - "hide": 0, - "includeAll": false, - "label": "Top queue count", - "multi": false, - "name": "k_selector", - "options": [ - { - "text": "2", - "value": "2" - }, - { - "text": "4", - "value": "4" - }, - { - "text": "6", - "value": "6" - }, - { - "text": "8", - "value": "8" - }, - { - "text": "10", - "value": "10" - } - ], - "query": "2,4,6,8,10", - "refresh": 0, - "type": "custom" - }, - { - "current": { - "selected": false, - "text": "", - "value": "" - }, - "label": "Queue by name", - "name": "name", - "query": "", - "type": "textbox" + "hide": 2, + "label": "Loki data source", + "name": "loki_datasource", + "query": "loki", + "regex": "", + "type": "datasource" } ] }, @@ -1090,33 +555,7 @@ "from": "now-30m", "to": "now" }, - "timepicker": { - "refresh_intervals": [ - "5s", - "10s", - "30s", - "1m", - "5m", - "15m", - "30m", - "1h", - "2h", - "1d" - ], - "time_options": [ - "5m", - "15m", - "1h", - "6h", - "12h", - "24h", - "2d", - "7d", - "30d" - ] - }, "timezone": "default", - "title": "Apache ActiveMQ queue overview", - "uid": "apache-activemq-queue-overview", - "version": 0 + "title": "Apache ActiveMQ queues", + "uid": "apacheactivemq_queues" } \ No newline at end of file diff --git a/apache-activemq-mixin/dashboards_out/apache-activemq-topic-overview.json b/apache-activemq-mixin/dashboards_out/apache-activemq-topic-overview.json index 6009ed70b..9d8a6ed45 100644 --- a/apache-activemq-mixin/dashboards_out/apache-activemq-topic-overview.json +++ b/apache-activemq-mixin/dashboards_out/apache-activemq-topic-overview.json @@ -1,266 +1,198 @@ { - "__inputs": [ ], - "__requires": [ ], "annotations": { "list": [ ] }, - "description": "", - "editable": false, - "gnetId": null, - "graphTooltip": 0, - "hideControls": false, - "id": null, "links": [ { - "asDropdown": false, - "icon": "external link", + "keepTime": true, + "title": "Apache ActiveMQ Cluster Overview", + "type": "link", + "url": "/d/apacheactivemq_overview" + }, + { + "keepTime": true, + "title": "Apache ActiveMQ Queues", + "type": "link", + "url": "/d/apacheactivemq_queues" + }, + { + "keepTime": true, + "title": "Logs", + "type": "link", + "url": "/d/apacheactivemq-logs" + }, + { + "asDropdown": true, "includeVars": true, "keepTime": true, "tags": [ - "apache-activemq-mixin" + "apache-activemq" ], - "targetBlank": false, - "title": "Other Apache ActiveMQ 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": "Topics", + "type": "row" + }, { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, - "description": "Number of topics connected with the broker instance.", + "description": "Number of active topics (excluding advisory topics).", "fieldConfig": { "defaults": { "color": { + "fixedColor": "text", "mode": "fixed" - }, - "mappings": [ ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [ ] + } + } }, "gridPos": { - "h": 4, + "h": 8, "w": 6, "x": 0, - "y": 0 + "y": 1 }, "id": 2, - "options": { - "colorMode": "none", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "10.2.0-60139", + "pluginVersion": "v11.0.0", "targets": [ { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, - "expr": "count (activemq_topic_queue_size{job=~\"$job\", activemq_cluster=~\"$activemq_cluster\", instance=~\"$instance\", destination!~\"ActiveMQ.Advisory.*\"})", + "expr": "count (activemq_topic_queue_size{job=~\"integrations/apache-activemq\",job=~\"$job\",cluster=~\"$cluster\",instance=~\"$instance\", destination!~\"ActiveMQ.Advisory.*\"})", "format": "time_series", - "intervalFactor": 2, - "legendFormat": "__auto" + "instant": false, + "legendFormat": "__auto", + "refId": "Topic count" } ], - "title": "Topics", + "title": "Topic count", "type": "stat" }, { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, - "description": "The number of producers attached to topic destinations.", + "description": "Total number of topic producers.", "fieldConfig": { "defaults": { "color": { + "fixedColor": "text", "mode": "fixed" - }, - "mappings": [ ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [ ] + } + } }, "gridPos": { - "h": 4, + "h": 8, "w": 6, "x": 6, - "y": 0 + "y": 1 }, "id": 3, - "options": { - "colorMode": "none", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "10.2.0-60139", + "pluginVersion": "v11.0.0", "targets": [ { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, - "expr": "sum (activemq_topic_producer_count{job=~\"$job\", activemq_cluster=~\"$activemq_cluster\", instance=~\"$instance\", destination!~\"ActiveMQ.Advisory.*\"})", + "expr": "sum (activemq_topic_producer_count{job=~\"integrations/apache-activemq\",job=~\"$job\",cluster=~\"$cluster\",instance=~\"$instance\", destination!~\"ActiveMQ.Advisory.*\"})", "format": "time_series", - "intervalFactor": 2, - "legendFormat": "__auto" + "instant": false, + "legendFormat": "__auto", + "refId": "Total producers" } ], - "title": "Producers", + "title": "Total topic producers", "type": "stat" }, { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, - "description": "The number of consumers subscribed to topic destinations.", + "description": "Total number of topic consumers.", "fieldConfig": { "defaults": { "color": { + "fixedColor": "text", "mode": "fixed" - }, - "mappings": [ ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [ ] + } + } }, "gridPos": { - "h": 4, + "h": 8, "w": 6, "x": 12, - "y": 0 + "y": 1 }, "id": 4, - "options": { - "colorMode": "none", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "10.2.0-60139", + "pluginVersion": "v11.0.0", "targets": [ { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, - "expr": "sum (activemq_topic_consumer_count{job=~\"$job\", activemq_cluster=~\"$activemq_cluster\", instance=~\"$instance\", destination!~\"ActiveMQ.Advisory.*\"})", + "expr": "sum (activemq_topic_consumer_count{job=~\"integrations/apache-activemq\",job=~\"$job\",cluster=~\"$cluster\",instance=~\"$instance\", destination!~\"ActiveMQ.Advisory.*\"})", "format": "time_series", - "intervalFactor": 2, - "legendFormat": "__auto" + "instant": false, + "legendFormat": "__auto", + "refId": "Total consumers" } ], - "title": "Consumers", + "title": "Total topic consumers", "type": "stat" }, { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, "description": "Average number of consumers per topic.", "fieldConfig": { "defaults": { "color": { + "fixedColor": "text", "mode": "fixed" - }, - "mappings": [ ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [ ] + } + } }, "gridPos": { - "h": 4, + "h": 8, "w": 6, "x": 18, - "y": 0 + "y": 1 }, "id": 5, - "options": { - "colorMode": "none", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "textMode": "auto" - }, - "pluginVersion": "10.2.0-60139", + "pluginVersion": "v11.0.0", "targets": [ { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, - "expr": "avg (activemq_topic_consumer_count{job=~\"$job\", activemq_cluster=~\"$activemq_cluster\", instance=~\"$instance\", destination!~\"ActiveMQ.Advisory.*\"})", + "expr": "avg (activemq_topic_consumer_count{job=~\"integrations/apache-activemq\",job=~\"$job\",cluster=~\"$cluster\",instance=~\"$instance\", destination!~\"ActiveMQ.Advisory.*\"})", "format": "time_series", - "intervalFactor": 2, - "legendFormat": "__auto" + "instant": false, + "legendFormat": "__auto", + "refId": "Average consumers per topic" } ], "title": "Average consumers per topic", @@ -268,882 +200,354 @@ }, { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, - "description": "The rate messages are sent to topic destinations.", + "description": "Rate of messages being enqueued to topics.", "fieldConfig": { "defaults": { - "color": { - "mode": "palette-classic" - }, "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "axisShow": false, - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 25, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, + "fillOpacity": 0, + "gradientMode": "opacity", "lineInterpolation": "smooth", "lineWidth": 2, - "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 - } - ] + "spanNulls": false }, - "unit": "mps" - }, - "overrides": [ ] + "unit": "/ sec" + } }, "gridPos": { "h": 8, "w": 12, "x": 0, - "y": 4 + "y": 9 }, "id": 6, "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": "topk by(instance, activemq_cluster, job) ($k_selector, rate(activemq_topic_enqueue_count{job=~\"$job\", activemq_cluster=~\"$activemq_cluster\", instance=~\"$instance\", destination!~\"ActiveMQ.Advisory.*\", destination=~\".*$name.*\"}[$__rate_interval]))", + "expr": "rate(activemq_topic_enqueue_count{job=~\"integrations/apache-activemq\",job=~\"$job\",cluster=~\"$cluster\",instance=~\"$instance\", destination!~\"ActiveMQ.Advisory.*\"}[$__rate_interval])", "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{activemq_cluster}} - {{instance}} - {{destination}}" + "instant": false, + "interval": "1m", + "legendFormat": "{{activemq_cluster}} - {{instance}} - {{destination}}", + "refId": "Enqueue rate" } ], - "title": "Top topics by enqueue rate", + "title": "Topic enqueue rate", "type": "timeseries" }, { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, - "description": "The rate messages have been acknowledged (and removed) from topic destinations", + "description": "Rate of messages being dequeued from topics.", "fieldConfig": { "defaults": { - "color": { - "mode": "palette-classic" - }, "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "axisShow": false, - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 25, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, + "fillOpacity": 0, + "gradientMode": "opacity", "lineInterpolation": "smooth", "lineWidth": 2, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } + "spanNulls": false }, - "mappings": [ ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - }, - "unit": "mps" - }, - "overrides": [ ] + "unit": "/ sec" + } }, "gridPos": { "h": 8, "w": 12, "x": 12, - "y": 4 + "y": 9 }, "id": 7, "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": "topk by(instance, activemq_cluster, job) ($k_selector, rate(activemq_topic_dequeue_count{job=~\"$job\", activemq_cluster=~\"$activemq_cluster\", instance=~\"$instance\", destination!~\"ActiveMQ.Advisory.*\", destination=~\".*$name.*\"}[$__rate_interval]))", + "expr": "rate(activemq_topic_dequeue_count{job=~\"integrations/apache-activemq\",job=~\"$job\",cluster=~\"$cluster\",instance=~\"$instance\", destination!~\"ActiveMQ.Advisory.*\"}[$__rate_interval])", "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{activemq_cluster}} - {{instance}} - {{destination}}" + "instant": false, + "interval": "1m", + "legendFormat": "{{activemq_cluster}} - {{instance}} - {{destination}}", + "refId": "Dequeue rate" } ], - "title": "Top topics by dequeue rate", + "title": "Topic dequeue rate", "type": "timeseries" }, { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, - "description": "Average time a message was held across all topic destinations.", + "description": "Average time to enqueue messages to topics.", "fieldConfig": { "defaults": { - "color": { - "mode": "palette-classic" - }, "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "axisShow": false, - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 25, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, + "fillOpacity": 0, + "gradientMode": "opacity", "lineInterpolation": "smooth", "lineWidth": 2, - "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 - } - ] + "spanNulls": false }, "unit": "ms" - }, - "overrides": [ ] + } }, "gridPos": { "h": 8, - "w": 12, + "w": 8, "x": 0, - "y": 12 + "y": 17 }, "id": 8, "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": "topk by(instance, activemq_cluster, job) ($k_selector, activemq_topic_average_enqueue_time{job=~\"$job\", activemq_cluster=~\"$activemq_cluster\", instance=~\"$instance\", destination!~\"ActiveMQ.Advisory.*\", destination=~\".*$name.*\"})", + "expr": "activemq_topic_average_enqueue_time{job=~\"integrations/apache-activemq\",job=~\"$job\",cluster=~\"$cluster\",instance=~\"$instance\", destination!~\"ActiveMQ.Advisory.*\"}", "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{activemq_cluster}} - {{instance}} - {{destination}}" + "instant": false, + "legendFormat": "{{activemq_cluster}} - {{instance}} - {{destination}}", + "refId": "Average enqueue time" } ], - "title": "Top topics by average enqueue time", + "title": "Topic average enqueue time", "type": "timeseries" }, { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, - "description": "The rate messages have expired on topic destinations.", + "description": "Rate of messages expiring in topics.", "fieldConfig": { "defaults": { - "color": { - "mode": "palette-classic" - }, "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "axisShow": false, - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 25, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, + "fillOpacity": 0, + "gradientMode": "opacity", "lineInterpolation": "smooth", "lineWidth": 2, - "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 - } - ] + "spanNulls": false }, - "unit": "mps" - }, - "overrides": [ ] + "unit": "/ sec" + } }, "gridPos": { "h": 8, - "w": 12, - "x": 12, - "y": 12 + "w": 8, + "x": 8, + "y": 17 }, "id": 9, "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": "topk by(instance, activemq_cluster, job) ($k_selector, rate(activemq_topic_expired_count{job=~\"$job\", activemq_cluster=~\"$activemq_cluster\", instance=~\"$instance\", destination!~\"ActiveMQ.Advisory.*\", destination=~\".*$name.*\"}[$__rate_interval]))", + "expr": "rate(activemq_topic_expired_count{job=~\"integrations/apache-activemq\",job=~\"$job\",cluster=~\"$cluster\",instance=~\"$instance\", destination!~\"ActiveMQ.Advisory.*\"}[$__rate_interval])", "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{activemq_cluster}} - {{instance}} - {{destination}}" + "instant": false, + "interval": "1m", + "legendFormat": "{{activemq_cluster}} - {{instance}} - {{destination}}", + "refId": "Expired rate" } ], - "title": "Top topics by expired message rate", + "title": "Topic expired rate", "type": "timeseries" }, { "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, - "description": "The number of consumers subscribed to the most active/used topics.", + "description": "Average size of messages in topics.", "fieldConfig": { "defaults": { - "color": { - "mode": "fixed" - }, - "mappings": [ ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [ ] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 20 - }, - "id": 10, - "options": { - "displayMode": "gradient", - "minVizHeight": 10, - "minVizWidth": 0, - "orientation": "horizontal", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showUnfilled": true, - "valueMode": "color" - }, - "pluginVersion": "10.2.0-60139", - "targets": [ - { - "datasource": { - "uid": "${prometheus_datasource}" - }, - "expr": "topk by(instance, activemq_cluster, job) ($k_selector, activemq_topic_consumer_count{job=~\"$job\", activemq_cluster=~\"$activemq_cluster\", instance=~\"$instance\", destination!~\"ActiveMQ.Advisory.*\", destination=~\".*$name.*\"})", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{activemq_cluster}} - {{instance}} - {{destination}}" - } - ], - "title": "Top topics by consumers", - "type": "bargauge" - }, - { - "datasource": { - "uid": "${prometheus_datasource}" - }, - "description": "Average message size on topic destinations.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "axisShow": false, - "axisSoftMin": 0, - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 25, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, + "fillOpacity": 54, + "gradientMode": "opacity", "lineInterpolation": "smooth", "lineWidth": 2, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, "showPoints": "never", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "normal" - }, - "thresholdsStyle": { - "mode": "off" - } + "spanNulls": false }, - "mappings": [ ], - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - }, - "unit": "decbytes" - }, - "overrides": [ ] + "unit": "bytes" + } }, "gridPos": { "h": 8, - "w": 12, - "x": 12, - "y": 20 + "w": 8, + "x": 16, + "y": 17 }, - "id": 11, + "id": 10, "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": "topk by(instance, activemq_cluster, job) ($k_selector, activemq_topic_average_message_size{job=~\"$job\", activemq_cluster=~\"$activemq_cluster\", instance=~\"$instance\", destination!~\"ActiveMQ.Advisory.*\", destination=~\".*$name.*\"})", + "expr": "activemq_topic_average_message_size{job=~\"integrations/apache-activemq\",job=~\"$job\",cluster=~\"$cluster\",instance=~\"$instance\", destination!~\"ActiveMQ.Advisory.*\"}", "format": "time_series", - "intervalFactor": 2, - "legendFormat": "{{activemq_cluster}} - {{instance}} - {{destination}}" + "instant": false, + "legendFormat": "{{activemq_cluster}} - {{instance}} - {{destination}}", + "refId": "Average message size" } ], - "title": "Top topics by average message size", + "title": "Topic average message size", "type": "timeseries" - }, - { - "datasource": { - "uid": "${prometheus_datasource}" - }, - "description": "Summary of topics showing topic name, enqueue and dequeue rate, average enqueue time, and average message size.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "custom": { - "align": "left", - "cellOptions": { - "type": "auto" - }, - "inspect": false - }, - "mappings": [ ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green" - } - ] - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Enqueue rate" - }, - "properties": [ - { - "id": "unit", - "value": "mps" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Dequeue rate" - }, - "properties": [ - { - "id": "unit", - "value": "mps" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Average enqueue time" - }, - "properties": [ - { - "id": "unit", - "value": "ms" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Average message size" - }, - "properties": [ - { - "id": "unit", - "value": "decbytes" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "ActiveMQ cluster" - }, - "properties": [ - { - "id": "links", - "value": [ - { - "title": "Cluster link", - "url": "d/apache-activemq-cluster-overview?var-activemq_cluster=${__data.fields.activemq_cluster}&${__url_time_range}&var-datasource=${datasource}" - } - ] - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Instance" - }, - "properties": [ - { - "id": "links", - "value": [ - { - "title": "Instance link", - "url": "d/apache-activemq-instance-overview?var-instance=${__data.fields.instance}&${__url_time_range}&var-datasource=${datasource}" - } - ] - } - ] - } - ] - }, - "gridPos": { - "h": 8, - "w": 24, - "x": 0, - "y": 28 - }, - "id": 12, - "options": { - "cellHeight": "sm", - "footer": { - "countRows": false, - "fields": "", - "reducer": [ - "sum" - ], - "show": false - }, - "showHeader": true - }, - "pluginVersion": "10.2.0-60139", - "targets": [ - { - "datasource": { - "uid": "${prometheus_datasource}" - }, - "expr": "rate(activemq_topic_enqueue_count{job=~\"$job\", activemq_cluster=~\"$activemq_cluster\", instance=~\"$instance\", destination!~\"ActiveMQ.Advisory.*\", destination=~\".*$name.*\"}[$__rate_interval])", - "format": "table", - "intervalFactor": 2, - "legendFormat": "{{instance}}" - }, - { - "datasource": { - "uid": "${prometheus_datasource}" - }, - "expr": "rate(activemq_topic_dequeue_count{job=~\"$job\", activemq_cluster=~\"$activemq_cluster\", instance=~\"$instance\", destination!~\"ActiveMQ.Advisory.*\", destination=~\".*$name.*\"}[$__rate_interval])", - "format": "table", - "intervalFactor": 2, - "legendFormat": "{{instance}}" - }, - { - "datasource": { - "uid": "${prometheus_datasource}" - }, - "expr": "activemq_topic_average_enqueue_time{job=~\"$job\", activemq_cluster=~\"$activemq_cluster\", instance=~\"$instance\", destination!~\"ActiveMQ.Advisory.*\", destination=~\".*$name.*\"}", - "format": "table", - "intervalFactor": 2, - "legendFormat": "{{instance}}" - }, - { - "datasource": { - "uid": "${prometheus_datasource}" - }, - "expr": "activemq_topic_average_message_size{job=~\"$job\", activemq_cluster=~\"$activemq_cluster\", instance=~\"$instance\", destination!~\"ActiveMQ.Advisory.*\", destination=~\".*$name.*\"}", - "format": "table", - "intervalFactor": 2, - "legendFormat": "{{instance}}" - } - ], - "title": "Topic summary", - "transformations": [ - { - "id": "joinByField", - "options": { - "byField": "destination", - "mode": "outer" - } - }, - { - "id": "organize", - "options": { - "indexByName": { }, - "renameByName": { - "Time 3": "", - "Value #A": "Enqueue rate", - "Value #B": "Dequeue rate", - "Value #C": "Average enqueue time", - "Value #D": "Average message size", - "activemq_cluster 1": "ActiveMQ cluster", - "destination": "Destination", - "instance 1": "Instance" - } - } - }, - { - "id": "filterFieldsByName", - "options": { - "include": { - "names": [ - "ActiveMQ cluster", - "Instance", - "Enqueue rate", - "Dequeue rate", - "Average enqueue time", - "Average message size", - "Destination" - ] - } - } - } - ], - "type": "table" } ], "refresh": "1m", - "rows": [ ], - "schemaVersion": 14, - "style": "dark", + "schemaVersion": 39, "tags": [ - "apache-activemq-mixin" + "apache-activemq" ], "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(activemq_topic_producer_count,job)", + "query": "label_values(activemq_memory_usage_ratio{job=~\"integrations/apache-activemq\"}, 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": 2, "includeAll": true, "label": "Cluster", "multi": true, "name": "cluster", - "options": [ ], - "query": "label_values(activemq_memory_usage_ratio{job=~\"$job\"},cluster)", + "query": "label_values(activemq_memory_usage_ratio{job=~\"integrations/apache-activemq\",job=~\"$job\"}, cluster)", "refresh": 2, - "regex": "", - "sort": 0, - "tagValuesQuery": "", - "tags": [ ], - "tagsQuery": "", - "type": "query", - "useTags": false + "sort": 1, + "type": "query" }, { "allValue": ".+", - "current": { }, "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, - "hide": 0, "includeAll": true, - "label": "ActiveMQ cluster", + "label": "Instance", "multi": true, - "name": "activemq_cluster", - "options": [ ], - "query": "label_values(activemq_memory_usage_ratio{job=~\"$job\"},activemq_cluster)", + "name": "instance", + "query": "label_values(activemq_memory_usage_ratio{job=~\"integrations/apache-activemq\",job=~\"$job\",cluster=~\"$cluster\"}, instance)", "refresh": 2, - "regex": "", - "sort": 0, - "tagValuesQuery": "", - "tags": [ ], - "tagsQuery": "", - "type": "query", - "useTags": false + "sort": 1, + "type": "query" }, { "allValue": ".+", - "current": { }, "datasource": { + "type": "prometheus", "uid": "${prometheus_datasource}" }, - "hide": 0, "includeAll": true, - "label": "Instance", + "label": "Activemq_cluster", "multi": true, - "name": "instance", - "options": [ ], - "query": "label_values(activemq_topic_producer_count{job=~\"$job\",activemq_cluster=~\"$activemq_cluster\"},instance)", + "name": "activemq_cluster", + "query": "label_values(activemq_memory_usage_ratio{job=~\"integrations/apache-activemq\",job=~\"$job\",cluster=~\"$cluster\",instance=~\"$instance\"}, activemq_cluster)", "refresh": 2, - "regex": "", - "sort": 0, - "tagValuesQuery": "", - "tags": [ ], - "tagsQuery": "", - "type": "query", - "useTags": false + "sort": 1, + "type": "query" }, { - "allValue": "", - "current": { - "text": "4", - "value": "4" - }, - "hide": 0, - "includeAll": false, - "label": "Top topic count", - "multi": false, - "name": "k_selector", - "options": [ - { - "text": "2", - "value": "2" - }, - { - "text": "4", - "value": "4" - }, - { - "text": "6", - "value": "6" - }, - { - "text": "8", - "value": "8" - }, - { - "text": "10", - "value": "10" - } - ], - "query": "2,4,6,8,10", - "refresh": 0, - "type": "custom" - }, - { - "current": { - "selected": false, - "text": "", - "value": "" - }, - "label": "Topic by name", - "name": "name", - "query": "", - "type": "textbox" + "hide": 2, + "label": "Loki data source", + "name": "loki_datasource", + "query": "loki", + "regex": "", + "type": "datasource" } ] }, @@ -1151,33 +555,7 @@ "from": "now-30m", "to": "now" }, - "timepicker": { - "refresh_intervals": [ - "5s", - "10s", - "30s", - "1m", - "5m", - "15m", - "30m", - "1h", - "2h", - "1d" - ], - "time_options": [ - "5m", - "15m", - "1h", - "6h", - "12h", - "24h", - "2d", - "7d", - "30d" - ] - }, "timezone": "default", - "title": "Apache ActiveMQ topic overview", - "uid": "apache-activemq-topic-overview", - "version": 0 + "title": "Apache ActiveMQ topics", + "uid": "apacheactivemq_topics" } \ No newline at end of file diff --git a/apache-activemq-mixin/g.libsonnet b/apache-activemq-mixin/g.libsonnet new file mode 100644 index 000000000..e6a2060ee --- /dev/null +++ b/apache-activemq-mixin/g.libsonnet @@ -0,0 +1 @@ +import 'github.com/grafana/grafonnet/gen/grafonnet-v11.4.0/main.libsonnet' diff --git a/apache-activemq-mixin/jsonnetfile.json b/apache-activemq-mixin/jsonnetfile.json index 83a4fe35b..c88dff6f2 100644 --- a/apache-activemq-mixin/jsonnetfile.json +++ b/apache-activemq-mixin/jsonnetfile.json @@ -4,8 +4,8 @@ { "source": { "git": { - "remote": "https://github.com/grafana/grafonnet-lib.git", - "subdir": "grafonnet" + "remote": "https://github.com/grafana/jsonnet-libs.git", + "subdir": "common-lib" } }, "version": "master" @@ -14,11 +14,20 @@ "source": { "git": { "remote": "https://github.com/grafana/grafonnet.git", - "subdir": "gen/grafonnet-latest" + "subdir": "gen/grafonnet-v11.4.0" } }, "version": "main" }, + { + "source": { + "git": { + "remote": "https://github.com/grafana/jsonnet-libs.git", + "subdir": "grafana-cloud-integration-utils" + } + }, + "version": "master" + }, { "source": { "git": { diff --git a/apache-activemq-mixin/links.libsonnet b/apache-activemq-mixin/links.libsonnet new file mode 100644 index 000000000..3fa9fa060 --- /dev/null +++ b/apache-activemq-mixin/links.libsonnet @@ -0,0 +1,32 @@ +local g = import './g.libsonnet'; +{ + local link = g.dashboard.link, + new(this): + { + activemqOverview: + link.link.new('Apache ActiveMQ Cluster Overview', '/d/' + this.grafana.dashboards['apache-activemq-cluster-overview.json'].uid) + + link.link.options.withKeepTime(true), + + activemqQueues: + link.link.new('Apache ActiveMQ Queues', '/d/' + this.grafana.dashboards['apache-activemq-queue-overview.json'].uid) + + link.link.options.withKeepTime(true), + + activemqTopics: + link.link.new('Apache ActiveMQ Topics', '/d/' + this.grafana.dashboards['apache-activemq-topic-overview.json'].uid) + + link.link.options.withKeepTime(true), + + otherDashboards: + link.dashboards.new('All dashboards', this.config.dashboardTags) + + link.dashboards.options.withIncludeVars(true) + + link.dashboards.options.withKeepTime(true) + + link.dashboards.options.withAsDropdown(true), + } + + + if this.config.enableLokiLogs then + { + logs: + link.link.new('Logs', '/d/' + this.grafana.dashboards['apache-activemq-logs.json'].uid) + + link.link.options.withKeepTime(true), + } + else {}, +} diff --git a/apache-activemq-mixin/main.libsonnet b/apache-activemq-mixin/main.libsonnet new file mode 100644 index 000000000..336e72e75 --- /dev/null +++ b/apache-activemq-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 + this.config.activemqLabels, + varMetric='activemq_memory_usage_ratio', + 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/apache-activemq-mixin/mixin.libsonnet b/apache-activemq-mixin/mixin.libsonnet index 4d987cf31..8c5893f33 100644 --- a/apache-activemq-mixin/mixin.libsonnet +++ b/apache-activemq-mixin/mixin.libsonnet @@ -1,3 +1,22 @@ -(import 'dashboards/dashboards.libsonnet') + -(import 'alerts/alerts.libsonnet') + -(import 'config.libsonnet') +local activemqlib = import './main.libsonnet'; +local config = (import './config.libsonnet'); + +local activemq = + activemqlib.new() + + activemqlib.withConfigMixin( + { + filteringSelector: 'job=~"integrations/apache-activemq"', + uid: 'apache-activemq', + enableLokiLogs: true, + } + ); + +{ + grafanaDashboards+:: { + [fname]: activemq.grafana.dashboards[fname] + for fname in std.objectFields(activemq.grafana.dashboards) + }, + + prometheusAlerts+:: activemq.prometheus.alerts, + prometheusRules+:: activemq.prometheus.recordingRules, +} diff --git a/apache-activemq-mixin/panels.libsonnet b/apache-activemq-mixin/panels.libsonnet new file mode 100644 index 000000000..c6e09126f --- /dev/null +++ b/apache-activemq-mixin/panels.libsonnet @@ -0,0 +1,214 @@ +local g = import './g.libsonnet'; +local commonlib = import 'common-lib/common/main.libsonnet'; + +{ + new(this):: + { + local signals = this.signals, + + // Broker panels + memoryUsagePanel: + g.panel.gauge.new(title='Average broker memory usage') + + g.panel.gauge.queryOptions.withTargets([ + signals.broker.memoryUsage.asTarget(), + ]) + + g.panel.gauge.panelOptions.withDescription('The percentage of memory used by both topics and queues across brokers.') + + g.panel.gauge.standardOptions.thresholds.withSteps([ + g.panel.gauge.thresholdStep.withColor('green'), + g.panel.gauge.thresholdStep.withColor('#EAB839') + g.panel.gauge.thresholdStep.withValue(50), + g.panel.gauge.thresholdStep.withColor('red') + g.panel.gauge.thresholdStep.withValue(70), + ]) + + g.panel.gauge.standardOptions.withUnit('percentunit'), + + storeUsagePanel: + g.panel.gauge.new(title='Average broker store usage') + + g.panel.gauge.queryOptions.withTargets([ + signals.broker.storeUsage.asTarget(), + ]) + + g.panel.gauge.panelOptions.withDescription('The percentage of store used by both topics and queues across brokers.') + + g.panel.gauge.standardOptions.thresholds.withSteps([ + g.panel.gauge.thresholdStep.withColor('green'), + g.panel.gauge.thresholdStep.withColor('#EAB839') + g.panel.gauge.thresholdStep.withValue(50), + g.panel.gauge.thresholdStep.withColor('red') + g.panel.gauge.thresholdStep.withValue(70), + ]) + + g.panel.gauge.standardOptions.withUnit('percentunit'), + + tempUsagePanel: + g.panel.gauge.new(title='Average broker temporary usage') + + g.panel.gauge.queryOptions.withTargets([ + signals.broker.tempUsage.asTarget(), + ]) + + g.panel.gauge.panelOptions.withDescription('The percentage of temporary storage used by both topics and queues across brokers.') + + g.panel.gauge.standardOptions.thresholds.withSteps([ + g.panel.gauge.thresholdStep.withColor('green'), + g.panel.gauge.thresholdStep.withColor('#EAB839') + g.panel.gauge.thresholdStep.withValue(50), + g.panel.gauge.thresholdStep.withColor('red') + g.panel.gauge.thresholdStep.withValue(70), + ]) + + g.panel.gauge.standardOptions.withUnit('percentunit'), + + brokersOnlinePanel: + commonlib.panels.generic.stat.base.new( + 'Brokers online', + targets=[signals.broker.brokersOnline.asTarget()], + description='Number of Apache ActiveMQ brokers that are online.' + ), + + // Queue panels + queueCountPanel: + commonlib.panels.generic.stat.base.new( + 'Queue count', + targets=[signals.queues.queueCount.asTarget()], + description='Number of active queues.' + ), + + totalQueueSizePanel: + commonlib.panels.generic.stat.base.new( + 'Total queue size', + targets=[signals.queues.totalQueueSize.asTarget()], + description='Total number of messages in all queues.' + ), + + queueProducersPanel: + commonlib.panels.generic.stat.base.new( + 'Total queue producers', + targets=[signals.queues.totalProducers.asTarget()], + description='Total number of queue producers.' + ), + + queueConsumersPanel: + commonlib.panels.generic.stat.base.new( + 'Total queue consumers', + targets=[signals.queues.totalConsumers.asTarget()], + description='Total number of queue consumers.' + ), + + queueEnqueueRatePanel: + commonlib.panels.generic.timeSeries.base.new( + 'Queue enqueue rate', + targets=[signals.queues.enqueueRate.asTarget() { interval: '1m' }], + description='Rate of messages being enqueued to queues.' + ) + + g.panel.timeSeries.standardOptions.withUnit('/ sec') + + g.panel.timeSeries.fieldConfig.defaults.custom.withFillOpacity(0) + + g.panel.timeSeries.fieldConfig.defaults.custom.withSpanNulls(false), + + queueDequeueRatePanel: + commonlib.panels.generic.timeSeries.base.new( + 'Queue dequeue rate', + targets=[signals.queues.dequeueRate.asTarget() { interval: '1m' }], + description='Rate of messages being dequeued from queues.' + ) + + g.panel.timeSeries.standardOptions.withUnit('/ sec') + + g.panel.timeSeries.fieldConfig.defaults.custom.withFillOpacity(0) + + g.panel.timeSeries.fieldConfig.defaults.custom.withSpanNulls(false), + + queueAverageEnqueueTimePanel: + commonlib.panels.generic.timeSeries.base.new( + 'Queue average enqueue time', + targets=[signals.queues.averageEnqueueTime.asTarget()], + description='Average time to enqueue messages to queues.' + ) + + g.panel.timeSeries.standardOptions.withUnit('ms') + + g.panel.timeSeries.fieldConfig.defaults.custom.withFillOpacity(0) + + g.panel.timeSeries.fieldConfig.defaults.custom.withSpanNulls(false), + + queueExpiredRatePanel: + commonlib.panels.generic.timeSeries.base.new( + 'Queue expired rate', + targets=[signals.queues.expiredRate.asTarget() { interval: '1m' }], + description='Rate of messages expiring in queues.' + ) + + g.panel.timeSeries.standardOptions.withUnit('/ sec') + + g.panel.timeSeries.fieldConfig.defaults.custom.withFillOpacity(0) + + g.panel.timeSeries.fieldConfig.defaults.custom.withSpanNulls(false), + + queueAverageMessageSizePanel: + commonlib.panels.generic.timeSeries.base.new( + 'Queue average message size', + targets=[signals.queues.averageMessageSize.asTarget()], + description='Average size of messages in queues.' + ) + + g.panel.timeSeries.standardOptions.withUnit('bytes') + + g.panel.timeSeries.fieldConfig.defaults.custom.withFillOpacity(54) + + g.panel.timeSeries.fieldConfig.defaults.custom.withSpanNulls(false), + + // Topic panels + topicCountPanel: + commonlib.panels.generic.stat.base.new( + 'Topic count', + targets=[signals.topics.topicCount.asTarget()], + description='Number of active topics (excluding advisory topics).' + ), + + topicProducersPanel: + commonlib.panels.generic.stat.base.new( + 'Total topic producers', + targets=[signals.topics.totalProducers.asTarget()], + description='Total number of topic producers.' + ), + + topicConsumersPanel: + commonlib.panels.generic.stat.base.new( + 'Total topic consumers', + targets=[signals.topics.totalConsumers.asTarget()], + description='Total number of topic consumers.' + ), + + topicAverageConsumersPanel: + commonlib.panels.generic.stat.base.new( + 'Average consumers per topic', + targets=[signals.topics.averageConsumers.asTarget()], + description='Average number of consumers per topic.' + ), + + topicEnqueueRatePanel: + commonlib.panels.generic.timeSeries.base.new( + 'Topic enqueue rate', + targets=[signals.topics.enqueueRate.asTarget() { interval: '1m' }], + description='Rate of messages being enqueued to topics.' + ) + + g.panel.timeSeries.standardOptions.withUnit('/ sec') + + g.panel.timeSeries.fieldConfig.defaults.custom.withFillOpacity(0) + + g.panel.timeSeries.fieldConfig.defaults.custom.withSpanNulls(false), + + topicDequeueRatePanel: + commonlib.panels.generic.timeSeries.base.new( + 'Topic dequeue rate', + targets=[signals.topics.dequeueRate.asTarget() { interval: '1m' }], + description='Rate of messages being dequeued from topics.' + ) + + g.panel.timeSeries.standardOptions.withUnit('/ sec') + + g.panel.timeSeries.fieldConfig.defaults.custom.withFillOpacity(0) + + g.panel.timeSeries.fieldConfig.defaults.custom.withSpanNulls(false), + + topicAverageEnqueueTimePanel: + commonlib.panels.generic.timeSeries.base.new( + 'Topic average enqueue time', + targets=[signals.topics.averageEnqueueTime.asTarget()], + description='Average time to enqueue messages to topics.' + ) + + g.panel.timeSeries.standardOptions.withUnit('ms') + + g.panel.timeSeries.fieldConfig.defaults.custom.withFillOpacity(0) + + g.panel.timeSeries.fieldConfig.defaults.custom.withSpanNulls(false), + + topicExpiredRatePanel: + commonlib.panels.generic.timeSeries.base.new( + 'Topic expired rate', + targets=[signals.topics.expiredRate.asTarget() { interval: '1m' }], + description='Rate of messages expiring in topics.' + ) + + g.panel.timeSeries.standardOptions.withUnit('/ sec') + + g.panel.timeSeries.fieldConfig.defaults.custom.withFillOpacity(0) + + g.panel.timeSeries.fieldConfig.defaults.custom.withSpanNulls(false), + + topicAverageMessageSizePanel: + commonlib.panels.generic.timeSeries.base.new( + 'Topic average message size', + targets=[signals.topics.averageMessageSize.asTarget()], + description='Average size of messages in topics.' + ) + + g.panel.timeSeries.standardOptions.withUnit('bytes') + + g.panel.timeSeries.fieldConfig.defaults.custom.withFillOpacity(54) + + g.panel.timeSeries.fieldConfig.defaults.custom.withSpanNulls(false), + }, +} diff --git a/apache-activemq-mixin/prometheus_rules_out/prometheus_alerts.yaml b/apache-activemq-mixin/prometheus_rules_out/prometheus_alerts.yaml index 9e35fadef..82d4001fb 100644 --- a/apache-activemq-mixin/prometheus_rules_out/prometheus_alerts.yaml +++ b/apache-activemq-mixin/prometheus_rules_out/prometheus_alerts.yaml @@ -6,7 +6,7 @@ groups: description: '{{ printf "%.0f" $value }} percent of memory used by topics on {{$labels.instance}} in cluster {{$labels.activemq_cluster}}, which is above the threshold of 70 percent.' summary: Topic destination memory usage is high, which may result in a reduction of the rate at which producers send messages. expr: | - sum without (destination) (activemq_topic_memory_percent_usage{destination!~"ActiveMQ.Advisory.*"}) > 70 + sum without (destination) (activemq_topic_memory_percent_usage) > 70 for: 5m labels: severity: warning diff --git a/apache-activemq-mixin/rows.libsonnet b/apache-activemq-mixin/rows.libsonnet new file mode 100644 index 000000000..e0f9b0e15 --- /dev/null +++ b/apache-activemq-mixin/rows.libsonnet @@ -0,0 +1,52 @@ +local g = import './g.libsonnet'; + +// Use g.util.grid.wrapPanels() to import into custom dashboard +{ + new(this): { + // Broker overview + broker: + g.panel.row.new('Broker Overview') + + g.panel.row.withPanels( + [ + this.grafana.panels.brokersOnlinePanel + g.panel.stat.gridPos.withW(6), + this.grafana.panels.memoryUsagePanel + g.panel.gauge.gridPos.withW(6), + this.grafana.panels.storeUsagePanel + g.panel.gauge.gridPos.withW(6), + this.grafana.panels.tempUsagePanel + g.panel.gauge.gridPos.withW(6), + ] + ), + + // Queue metrics + queues: + g.panel.row.new('Queues') + + g.panel.row.withPanels( + [ + this.grafana.panels.queueCountPanel + g.panel.stat.gridPos.withW(6), + this.grafana.panels.totalQueueSizePanel + g.panel.stat.gridPos.withW(6), + this.grafana.panels.queueProducersPanel + g.panel.stat.gridPos.withW(6), + this.grafana.panels.queueConsumersPanel + g.panel.stat.gridPos.withW(6), + this.grafana.panels.queueEnqueueRatePanel + g.panel.timeSeries.gridPos.withW(12), + this.grafana.panels.queueDequeueRatePanel + g.panel.timeSeries.gridPos.withW(12), + this.grafana.panels.queueAverageEnqueueTimePanel + g.panel.timeSeries.gridPos.withW(8), + this.grafana.panels.queueExpiredRatePanel + g.panel.timeSeries.gridPos.withW(8), + this.grafana.panels.queueAverageMessageSizePanel + g.panel.timeSeries.gridPos.withW(8), + ] + ), + + // Topic metrics + topics: + g.panel.row.new('Topics') + + g.panel.row.withPanels( + [ + this.grafana.panels.topicCountPanel + g.panel.stat.gridPos.withW(6), + this.grafana.panels.topicProducersPanel + g.panel.stat.gridPos.withW(6), + this.grafana.panels.topicConsumersPanel + g.panel.stat.gridPos.withW(6), + this.grafana.panels.topicAverageConsumersPanel + g.panel.stat.gridPos.withW(6), + this.grafana.panels.topicEnqueueRatePanel + g.panel.timeSeries.gridPos.withW(12), + this.grafana.panels.topicDequeueRatePanel + g.panel.timeSeries.gridPos.withW(12), + this.grafana.panels.topicAverageEnqueueTimePanel + g.panel.timeSeries.gridPos.withW(8), + this.grafana.panels.topicExpiredRatePanel + g.panel.timeSeries.gridPos.withW(8), + this.grafana.panels.topicAverageMessageSizePanel + g.panel.timeSeries.gridPos.withW(8), + ] + ), + }, +} diff --git a/apache-activemq-mixin/signals/broker.libsonnet b/apache-activemq-mixin/signals/broker.libsonnet new file mode 100644 index 000000000..355c6fcaa --- /dev/null +++ b/apache-activemq-mixin/signals/broker.libsonnet @@ -0,0 +1,69 @@ +local commonlib = import 'common-lib/common/main.libsonnet'; + +function(this) + { + filteringSelector: this.filteringSelector, + groupLabels: this.groupLabels, + instanceLabels: this.instanceLabels, + enableLokiLogs: this.enableLokiLogs, + aggLevel: 'none', + aggFunction: 'avg', + alertsInterval: '2m', + discoveryMetric: { + prometheus: 'activemq_memory_usage_ratio', + }, + signals: { + memoryUsage: { + name: 'Broker memory usage', + nameShort: 'Memory usage', + type: 'gauge', + description: 'The percentage of memory used by both topics and queues across brokers.', + unit: 'percentunit', + sources: { + prometheus: { + expr: 'activemq_memory_usage_ratio{%(queriesSelector)s}', + legendCustomTemplate: '{{activemq_cluster}} - {{instance}}', + }, + }, + }, + storeUsage: { + name: 'Broker store usage', + nameShort: 'Store usage', + type: 'gauge', + description: 'The percentage of store used by both topics and queues across brokers.', + unit: 'percentunit', + sources: { + prometheus: { + expr: 'activemq_store_usage_ratio{%(queriesSelector)s}', + legendCustomTemplate: '{{activemq_cluster}} - {{instance}}', + }, + }, + }, + tempUsage: { + name: 'Broker temporary usage', + nameShort: 'Temp usage', + type: 'gauge', + description: 'The percentage of temporary storage used by both topics and queues across brokers.', + unit: 'percentunit', + sources: { + prometheus: { + expr: 'activemq_temp_usage_ratio{%(queriesSelector)s}', + legendCustomTemplate: '{{activemq_cluster}} - {{instance}}', + }, + }, + }, + brokersOnline: { + name: 'Brokers online', + nameShort: 'Brokers online', + type: 'gauge', + description: 'Number of Apache ActiveMQ brokers that are online.', + unit: 'short', + sources: { + prometheus: { + expr: 'count by (%(agg)s) (activemq_memory_usage_ratio{%(queriesSelector)s})', + legendCustomTemplate: '__auto', + }, + }, + }, + }, + } diff --git a/apache-activemq-mixin/signals/queues.libsonnet b/apache-activemq-mixin/signals/queues.libsonnet new file mode 100644 index 000000000..909beb28c --- /dev/null +++ b/apache-activemq-mixin/signals/queues.libsonnet @@ -0,0 +1,134 @@ +local commonlib = import 'common-lib/common/main.libsonnet'; + +function(this) + { + filteringSelector: this.filteringSelector, + groupLabels: this.groupLabels, + instanceLabels: this.instanceLabels, + enableLokiLogs: this.enableLokiLogs, + aggLevel: 'none', + aggFunction: 'sum', + alertsInterval: '2m', + discoveryMetric: { + prometheus: 'activemq_queue_queue_size', + }, + signals: { + queueCount: { + name: 'Queue count', + nameShort: 'Queue count', + type: 'gauge', + description: 'Number of active queues.', + unit: 'short', + sources: { + prometheus: { + expr: 'count (activemq_queue_queue_size{%(queriesSelector)s})', + legendCustomTemplate: '__auto', + }, + }, + }, + totalQueueSize: { + name: 'Total queue size', + nameShort: 'Total queue size', + type: 'gauge', + description: 'Total number of messages in all queues.', + unit: 'short', + sources: { + prometheus: { + expr: 'sum (activemq_queue_queue_size{%(queriesSelector)s})', + legendCustomTemplate: '__auto', + }, + }, + }, + totalProducers: { + name: 'Total producers', + nameShort: 'Total producers', + type: 'gauge', + description: 'Total number of queue producers.', + unit: 'short', + sources: { + prometheus: { + expr: 'sum (activemq_queue_producer_count{%(queriesSelector)s})', + legendCustomTemplate: '__auto', + }, + }, + }, + totalConsumers: { + name: 'Total consumers', + nameShort: 'Total consumers', + type: 'gauge', + description: 'Total number of queue consumers.', + unit: 'short', + sources: { + prometheus: { + expr: 'sum (activemq_queue_consumer_count{%(queriesSelector)s})', + legendCustomTemplate: '__auto', + }, + }, + }, + enqueueRate: { + name: 'Enqueue rate', + nameShort: 'Enqueue rate', + type: 'counter', + description: 'Rate of messages being enqueued to queues.', + unit: '/ sec', + sources: { + prometheus: { + expr: 'activemq_queue_enqueue_count{%(queriesSelector)s}', + legendCustomTemplate: '{{activemq_cluster}} - {{instance}} - {{destination}}', + }, + }, + }, + dequeueRate: { + name: 'Dequeue rate', + nameShort: 'Dequeue rate', + type: 'counter', + description: 'Rate of messages being dequeued from queues.', + unit: '/ sec', + sources: { + prometheus: { + expr: 'activemq_queue_dequeue_count{%(queriesSelector)s}', + legendCustomTemplate: '{{activemq_cluster}} - {{instance}} - {{destination}}', + }, + }, + }, + averageEnqueueTime: { + name: 'Average enqueue time', + nameShort: 'Avg enqueue time', + type: 'gauge', + description: 'Average time to enqueue messages to queues.', + unit: 'ms', + sources: { + prometheus: { + expr: 'activemq_queue_average_enqueue_time{%(queriesSelector)s}', + legendCustomTemplate: '{{activemq_cluster}} - {{instance}} - {{destination}}', + }, + }, + }, + expiredRate: { + name: 'Expired rate', + nameShort: 'Expired rate', + type: 'counter', + description: 'Rate of messages expiring in queues.', + unit: '/ sec', + sources: { + prometheus: { + expr: 'activemq_queue_expired_count{%(queriesSelector)s}', + legendCustomTemplate: '{{activemq_cluster}} - {{instance}} - {{destination}}', + }, + }, + }, + averageMessageSize: { + name: 'Average message size', + nameShort: 'Avg message size', + type: 'gauge', + description: 'Average size of messages in queues.', + unit: 'bytes', + sources: { + prometheus: { + expr: 'activemq_queue_average_message_size{%(queriesSelector)s}', + legendCustomTemplate: '{{activemq_cluster}} - {{instance}} - {{destination}}', + }, + }, + }, + }, + } diff --git a/apache-activemq-mixin/signals/topics.libsonnet b/apache-activemq-mixin/signals/topics.libsonnet new file mode 100644 index 000000000..e482d3ec2 --- /dev/null +++ b/apache-activemq-mixin/signals/topics.libsonnet @@ -0,0 +1,134 @@ +local commonlib = import 'common-lib/common/main.libsonnet'; + +function(this) + { + filteringSelector: this.filteringSelector, + groupLabels: this.groupLabels, + instanceLabels: this.instanceLabels, + enableLokiLogs: this.enableLokiLogs, + aggLevel: 'none', + aggFunction: 'sum', + alertsInterval: '2m', + discoveryMetric: { + prometheus: 'activemq_topic_producer_count', + }, + signals: { + topicCount: { + name: 'Topic count', + nameShort: 'Topic count', + type: 'gauge', + description: 'Number of active topics (excluding advisory topics).', + unit: 'short', + sources: { + prometheus: { + expr: 'count (activemq_topic_queue_size{%(queriesSelector)s, destination!~"ActiveMQ.Advisory.*"})', + legendCustomTemplate: '__auto', + }, + }, + }, + totalProducers: { + name: 'Total producers', + nameShort: 'Total producers', + type: 'gauge', + description: 'Total number of topic producers.', + unit: 'short', + sources: { + prometheus: { + expr: 'sum (activemq_topic_producer_count{%(queriesSelector)s, destination!~"ActiveMQ.Advisory.*"})', + legendCustomTemplate: '__auto', + }, + }, + }, + totalConsumers: { + name: 'Total consumers', + nameShort: 'Total consumers', + type: 'gauge', + description: 'Total number of topic consumers.', + unit: 'short', + sources: { + prometheus: { + expr: 'sum (activemq_topic_consumer_count{%(queriesSelector)s, destination!~"ActiveMQ.Advisory.*"})', + legendCustomTemplate: '__auto', + }, + }, + }, + averageConsumers: { + name: 'Average consumers per topic', + nameShort: 'Avg consumers', + type: 'gauge', + description: 'Average number of consumers per topic.', + unit: 'short', + sources: { + prometheus: { + expr: 'avg (activemq_topic_consumer_count{%(queriesSelector)s, destination!~"ActiveMQ.Advisory.*"})', + legendCustomTemplate: '__auto', + }, + }, + }, + enqueueRate: { + name: 'Enqueue rate', + nameShort: 'Enqueue rate', + type: 'counter', + description: 'Rate of messages being enqueued to topics.', + unit: '/ sec', + sources: { + prometheus: { + expr: 'activemq_topic_enqueue_count{%(queriesSelector)s, destination!~"ActiveMQ.Advisory.*"}', + legendCustomTemplate: '{{activemq_cluster}} - {{instance}} - {{destination}}', + }, + }, + }, + dequeueRate: { + name: 'Dequeue rate', + nameShort: 'Dequeue rate', + type: 'counter', + description: 'Rate of messages being dequeued from topics.', + unit: '/ sec', + sources: { + prometheus: { + expr: 'activemq_topic_dequeue_count{%(queriesSelector)s, destination!~"ActiveMQ.Advisory.*"}', + legendCustomTemplate: '{{activemq_cluster}} - {{instance}} - {{destination}}', + }, + }, + }, + averageEnqueueTime: { + name: 'Average enqueue time', + nameShort: 'Avg enqueue time', + type: 'gauge', + description: 'Average time to enqueue messages to topics.', + unit: 'ms', + sources: { + prometheus: { + expr: 'activemq_topic_average_enqueue_time{%(queriesSelector)s, destination!~"ActiveMQ.Advisory.*"}', + legendCustomTemplate: '{{activemq_cluster}} - {{instance}} - {{destination}}', + }, + }, + }, + expiredRate: { + name: 'Expired rate', + nameShort: 'Expired rate', + type: 'counter', + description: 'Rate of messages expiring in topics.', + unit: '/ sec', + sources: { + prometheus: { + expr: 'activemq_topic_expired_count{%(queriesSelector)s, destination!~"ActiveMQ.Advisory.*"}', + legendCustomTemplate: '{{activemq_cluster}} - {{instance}} - {{destination}}', + }, + }, + }, + averageMessageSize: { + name: 'Average message size', + nameShort: 'Avg message size', + type: 'gauge', + description: 'Average size of messages in topics.', + unit: 'bytes', + sources: { + prometheus: { + expr: 'activemq_topic_average_message_size{%(queriesSelector)s, destination!~"ActiveMQ.Advisory.*"}', + legendCustomTemplate: '{{activemq_cluster}} - {{instance}} - {{destination}}', + }, + }, + }, + }, + }