From 7527a6348d19ef4afbc11a20cec7f419aaf59c7d Mon Sep 17 00:00:00 2001 From: sousaedu Date: Thu, 28 Jan 2021 13:21:54 +0100 Subject: [PATCH] Adding OSM Monitoring dashboards to Grafana charm Change-Id: Idb9b552d799181623aa48110a083439d808fd0b3 Signed-off-by: sousaedu --- installers/charm/grafana/config.yaml | 4 + .../grafana/files/default_dashboards.yaml | 30 + .../grafana/files/default_datasources.yaml | 31 + .../files/kafka_exporter_dashboard.yaml | 543 ++++++ .../files/mongodb_exporter_dashboard.yaml | 691 +++++++ .../files/mysql_exporter_dashboard.yaml | 949 ++++++++++ .../files/nodes_exporter_dashboard.yaml | 1425 +++++++++++++++ .../grafana/files/summary_dashboard.yaml | 1621 +++++++++++++++++ installers/charm/grafana/src/pod_spec.py | 88 +- 9 files changed, 5351 insertions(+), 31 deletions(-) create mode 100644 installers/charm/grafana/files/default_dashboards.yaml create mode 100644 installers/charm/grafana/files/default_datasources.yaml create mode 100644 installers/charm/grafana/files/kafka_exporter_dashboard.yaml create mode 100644 installers/charm/grafana/files/mongodb_exporter_dashboard.yaml create mode 100644 installers/charm/grafana/files/mysql_exporter_dashboard.yaml create mode 100644 installers/charm/grafana/files/nodes_exporter_dashboard.yaml create mode 100644 installers/charm/grafana/files/summary_dashboard.yaml diff --git a/installers/charm/grafana/config.yaml b/installers/charm/grafana/config.yaml index 4131949b..37509dc7 100644 --- a/installers/charm/grafana/config.yaml +++ b/installers/charm/grafana/config.yaml @@ -44,3 +44,7 @@ options: type: string description: Ingress URL default: "" + osm_dashboards: + type: boolean + description: Enable OSM System monitoring dashboards + default: false diff --git a/installers/charm/grafana/files/default_dashboards.yaml b/installers/charm/grafana/files/default_dashboards.yaml new file mode 100644 index 00000000..a56ea5fe --- /dev/null +++ b/installers/charm/grafana/files/default_dashboards.yaml @@ -0,0 +1,30 @@ +# Copyright 2021 Canonical Ltd. +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +# +# For those usages not covered by the Apache License, Version 2.0 please +# contact: legal@canonical.com +# +# To get in touch with the maintainers, please contact: +# osm-charmers@lists.launchpad.net +## + +--- +apiVersion: 1 +providers: + - name: 'osm' + orgId: 1 + folder: '' + type: file + options: + path: /etc/grafana/provisioning/dashboards/ diff --git a/installers/charm/grafana/files/default_datasources.yaml b/installers/charm/grafana/files/default_datasources.yaml new file mode 100644 index 00000000..9dc0b8fe --- /dev/null +++ b/installers/charm/grafana/files/default_datasources.yaml @@ -0,0 +1,31 @@ +# Copyright 2021 Canonical Ltd. +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +# +# For those usages not covered by the Apache License, Version 2.0 please +# contact: legal@canonical.com +# +# To get in touch with the maintainers, please contact: +# osm-charmers@lists.launchpad.net +## + +--- +datasources: + - access: proxy + editable: true + is_default: true + name: osm_prometheus + orgId: 1 + type: prometheus + version: 1 + url: http://$prometheus_host:$prometheus_port diff --git a/installers/charm/grafana/files/kafka_exporter_dashboard.yaml b/installers/charm/grafana/files/kafka_exporter_dashboard.yaml new file mode 100644 index 00000000..afcb7e3b --- /dev/null +++ b/installers/charm/grafana/files/kafka_exporter_dashboard.yaml @@ -0,0 +1,543 @@ +# Copyright 2021 Canonical Ltd. +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +# +# For those usages not covered by the Apache License, Version 2.0 please +# contact: legal@canonical.com +# +# To get in touch with the maintainers, please contact: +# osm-charmers@lists.launchpad.net +## + +--- +annotations: + list: + - builtIn: 1 + datasource: '-- Grafana --' + enable: true + hide: true + iconColor: 'rgba(0, 211, 255, 1)' + name: Annotations & Alerts + type: dashboard +description: Kafka resource usage and throughput +editable: true +gnetId: 7589 +graphTooltip: 0 +id: 10 +iteration: 1578848023483 +links: [] +panels: + - aliasColors: {} + bars: false + dashLength: 10 + dashes: false + datasource: Prometheus + fill: 0 + fillGradient: 0 + gridPos: + h: 10 + w: 10 + x: 0 + 'y': 0 + id: 14 + legend: + alignAsTable: true + avg: false + current: true + max: true + min: false + rightSide: false + show: true + sideWidth: 480 + sort: max + sortDesc: true + total: false + values: true + lines: true + linewidth: 1 + links: [] + nullPointMode: connected + options: + dataLinks: [] + percentage: false + pointradius: 5 + points: false + renderer: flot + seriesOverrides: [] + spaceLength: 10 + stack: false + steppedLine: false + targets: + - expr: >- + sum(kafka_topic_partition_current_offset - + kafka_topic_partition_oldest_offset{instance="$instance", + topic=~"$topic"}) by (topic) + format: time_series + intervalFactor: 1 + legendFormat: '{{topic}}' + refId: B + thresholds: [] + timeFrom: null + timeRegions: [] + timeShift: null + title: Messages stored per topic + tooltip: + shared: true + sort: 0 + value_type: individual + type: graph + xaxis: + buckets: null + mode: time + name: null + show: true + values: [] + yaxes: + - format: short + label: null + logBase: 1 + max: null + min: '0' + show: true + - format: short + label: null + logBase: 1 + max: null + min: null + show: true + yaxis: + align: false + alignLevel: null + - aliasColors: {} + bars: false + dashLength: 10 + dashes: false + datasource: Prometheus + fill: 0 + fillGradient: 0 + gridPos: + h: 10 + w: 10 + x: 10 + 'y': 0 + id: 12 + legend: + alignAsTable: true + avg: false + current: true + max: true + min: false + rightSide: false + show: true + sideWidth: 480 + sort: max + sortDesc: true + total: false + values: true + lines: true + linewidth: 1 + links: [] + nullPointMode: connected + options: + dataLinks: [] + percentage: false + pointradius: 5 + points: false + renderer: flot + seriesOverrides: [] + spaceLength: 10 + stack: false + steppedLine: false + targets: + - expr: >- + sum(kafka_consumergroup_lag{instance="$instance",topic=~"$topic"}) by + (consumergroup, topic) + format: time_series + instant: false + interval: '' + intervalFactor: 1 + legendFormat: ' {{topic}} ({{consumergroup}})' + refId: A + thresholds: [] + timeFrom: null + timeRegions: [] + timeShift: null + title: Lag by Consumer Group + tooltip: + shared: true + sort: 2 + value_type: individual + type: graph + xaxis: + buckets: null + mode: time + name: null + show: true + values: [] + yaxes: + - format: short + label: '' + logBase: 1 + max: null + min: '0' + show: true + - format: short + label: null + logBase: 1 + max: null + min: null + show: true + yaxis: + align: false + alignLevel: null + - aliasColors: {} + bars: false + dashLength: 10 + dashes: false + datasource: Prometheus + fill: 0 + fillGradient: 0 + gridPos: + h: 10 + w: 10 + x: 0 + 'y': 10 + id: 16 + legend: + alignAsTable: true + avg: false + current: true + max: true + min: false + rightSide: false + show: true + sideWidth: 480 + total: false + values: true + lines: true + linewidth: 1 + links: [] + nullPointMode: connected + options: + dataLinks: [] + percentage: false + pointradius: 5 + points: false + renderer: flot + seriesOverrides: [] + spaceLength: 10 + stack: false + steppedLine: false + targets: + - expr: >- + sum(delta(kafka_topic_partition_current_offset{instance=~'$instance', + topic=~"$topic"}[5m])/5) by (topic) + format: time_series + intervalFactor: 1 + legendFormat: '{{topic}}' + refId: A + thresholds: [] + timeFrom: null + timeRegions: [] + timeShift: null + title: Messages produced per minute + tooltip: + shared: true + sort: 0 + value_type: individual + type: graph + xaxis: + buckets: null + mode: time + name: null + show: true + values: [] + yaxes: + - format: short + label: null + logBase: 1 + max: null + min: null + show: true + - format: short + label: null + logBase: 1 + max: null + min: null + show: true + yaxis: + align: false + alignLevel: null + - aliasColors: {} + bars: false + dashLength: 10 + dashes: false + datasource: Prometheus + fill: 0 + fillGradient: 0 + gridPos: + h: 10 + w: 10 + x: 10 + 'y': 10 + id: 18 + legend: + alignAsTable: true + avg: false + current: true + max: true + min: false + rightSide: false + show: true + sideWidth: 480 + sort: current + sortDesc: true + total: false + values: true + lines: true + linewidth: 1 + links: [] + nullPointMode: connected + options: + dataLinks: [] + percentage: false + pointradius: 5 + points: false + renderer: flot + seriesOverrides: [] + spaceLength: 10 + stack: false + steppedLine: false + targets: + - expr: >- + sum(delta(kafka_consumergroup_current_offset{instance=~'$instance',topic=~"$topic"}[5m])/5) + by (consumergroup, topic) + format: time_series + intervalFactor: 1 + legendFormat: ' {{topic}} ({{consumergroup}})' + refId: A + thresholds: [] + timeFrom: null + timeRegions: [] + timeShift: null + title: Messages consumed per minute + tooltip: + shared: true + sort: 0 + value_type: individual + type: graph + xaxis: + buckets: null + mode: time + name: null + show: true + values: [] + yaxes: + - format: short + label: null + logBase: 1 + max: null + min: null + show: true + - format: short + label: null + logBase: 1 + max: null + min: null + show: true + yaxis: + align: false + alignLevel: null + - aliasColors: {} + bars: true + dashLength: 10 + dashes: false + datasource: Prometheus + fill: 1 + fillGradient: 0 + gridPos: + h: 7 + w: 20 + x: 0 + 'y': 20 + id: 8 + legend: + alignAsTable: true + avg: false + current: true + max: false + min: false + rightSide: true + show: true + sideWidth: 420 + total: false + values: true + lines: false + linewidth: 1 + links: [] + nullPointMode: 'null' + options: + dataLinks: [] + percentage: false + pointradius: 5 + points: false + renderer: flot + seriesOverrides: [] + spaceLength: 10 + stack: false + steppedLine: false + targets: + - expr: >- + sum by(topic) + (kafka_topic_partitions{instance="$instance",topic=~"$topic"}) + format: time_series + intervalFactor: 1 + legendFormat: '{{topic}}' + refId: A + thresholds: [] + timeFrom: null + timeRegions: [] + timeShift: null + title: Partitions per Topic + tooltip: + shared: false + sort: 0 + value_type: individual + type: graph + xaxis: + buckets: null + mode: series + name: null + show: false + values: + - current + yaxes: + - format: short + label: null + logBase: 1 + max: null + min: null + show: true + - format: short + label: null + logBase: 1 + max: null + min: null + show: true + yaxis: + align: false + alignLevel: null +refresh: 5s +schemaVersion: 19 +style: dark +tags: [] +templating: + list: + - allValue: null + current: + text: osm-kafka-exporter-service + value: osm-kafka-exporter-service + datasource: Prometheus + definition: '' + hide: 0 + includeAll: false + label: Job + multi: false + name: job + options: [] + query: 'label_values(kafka_consumergroup_current_offset, job)' + refresh: 1 + regex: '' + skipUrlSync: false + sort: 0 + tagValuesQuery: '' + tags: [] + tagsQuery: '' + type: query + useTags: false + - allValue: null + datasource: Prometheus + definition: '' + hide: 0 + includeAll: false + label: Instance + multi: false + name: instance + options: [] + query: >- + 'label_values(kafka_consumergroup_current_offset{job=~"$job"},' + 'instance)' + refresh: 1 + regex: '' + skipUrlSync: false + sort: 0 + tagValuesQuery: '' + tags: [] + tagsQuery: '' + type: query + useTags: false + - allValue: null + current: + tags: [] + text: All + value: + - $__all + datasource: Prometheus + definition: '' + hide: 0 + includeAll: true + label: Topic + multi: true + name: topic + options: [] + query: >- + label_values(kafka_topic_partition_current_offset{instance='$instance',topic!='__consumer_offsets',topic!='--kafka'}, + topic) + refresh: 1 + regex: '' + skipUrlSync: false + sort: 1 + tagValuesQuery: '' + tags: [] + tagsQuery: topic + type: query + useTags: false +time: + from: now-1h + to: now +timepicker: + refresh_intervals: + - 5s + - 10s + - 30s + - 1m + - 5m + - 15m + - 30m + - 1h + - 2h + - 1d + time_options: + - 5m + - 15m + - 1h + - 6h + - 12h + - 24h + - 2d + - 7d + - 30d +timezone: browser +title: Kafka +uid: jwPKIsniz +version: 2 diff --git a/installers/charm/grafana/files/mongodb_exporter_dashboard.yaml b/installers/charm/grafana/files/mongodb_exporter_dashboard.yaml new file mode 100644 index 00000000..b2489f4a --- /dev/null +++ b/installers/charm/grafana/files/mongodb_exporter_dashboard.yaml @@ -0,0 +1,691 @@ +# Copyright 2021 Canonical Ltd. +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +# +# For those usages not covered by the Apache License, Version 2.0 please +# contact: legal@canonical.com +# +# To get in touch with the maintainers, please contact: +# osm-charmers@lists.launchpad.net +## + +--- +annotations: + list: + - builtIn: 1 + datasource: '-- Grafana --' + enable: true + hide: true + iconColor: 'rgba(0, 211, 255, 1)' + name: Annotations & Alerts + type: dashboard +description: MongoDB Prometheus Exporter Dashboard. +editable: true +gnetId: 2583 +graphTooltip: 1 +id: 9 +iteration: 1577555358996 +links: [] +panels: + - collapsed: false + gridPos: + h: 1 + w: 24 + x: 0 + 'y': 0 + id: 22 + panels: [] + repeat: env + title: Health + type: row + - cacheTimeout: null + colorBackground: false + colorValue: true + colors: + - 'rgba(245, 54, 54, 0.9)' + - 'rgba(237, 129, 40, 0.89)' + - 'rgba(50, 172, 45, 0.97)' + datasource: Prometheus + decimals: null + format: s + gauge: + maxValue: 100 + minValue: 0 + show: false + thresholdLabels: false + thresholdMarkers: true + gridPos: + h: 4 + w: 12 + x: 0 + 'y': 1 + id: 10 + interval: null + links: [] + mappingType: 1 + mappingTypes: + - name: value to text + value: 1 + - name: range to text + value: 2 + maxDataPoints: 100 + nullPointMode: connected + nullText: null + options: {} + postfix: '' + postfixFontSize: 50% + prefix: '' + prefixFontSize: 50% + rangeMaps: + - from: 'null' + text: N/A + to: 'null' + sparkline: + fillColor: 'rgba(31, 118, 189, 0.18)' + full: false + lineColor: 'rgb(31, 120, 193)' + show: false + tableColumn: '' + targets: + - expr: 'mongodb_instance_uptime_seconds{instance=~"$instance"}' + format: time_series + intervalFactor: 2 + legendFormat: '' + refId: A + step: 1800 + thresholds: '0,360' + title: Uptime + type: singlestat + valueFontSize: 80% + valueMaps: + - op: '=' + text: N/A + value: 'null' + valueName: current + - cacheTimeout: null + colorBackground: false + colorValue: false + colors: + - 'rgba(245, 54, 54, 0.9)' + - 'rgba(237, 129, 40, 0.89)' + - 'rgba(50, 172, 45, 0.97)' + datasource: Prometheus + format: none + gauge: + maxValue: 100 + minValue: 0 + show: false + thresholdLabels: false + thresholdMarkers: true + gridPos: + h: 4 + w: 12 + x: 12 + 'y': 1 + id: 1 + interval: null + links: [] + mappingType: 1 + mappingTypes: + - name: value to text + value: 1 + - name: range to text + value: 2 + maxDataPoints: 100 + nullPointMode: connected + nullText: null + options: {} + postfix: '' + postfixFontSize: 50% + prefix: '' + prefixFontSize: 50% + rangeMaps: + - from: 'null' + text: N/A + to: 'null' + sparkline: + fillColor: 'rgba(31, 118, 189, 0.18)' + full: true + lineColor: 'rgb(31, 120, 193)' + show: true + tableColumn: '' + targets: + - expr: 'mongodb_connections{instance=~"$instance",state="current"}' + format: time_series + intervalFactor: 2 + legendFormat: '' + metric: mongodb_connections + refId: A + step: 1800 + thresholds: '' + title: Open Connections + type: singlestat + valueFontSize: 80% + valueMaps: + - op: '=' + text: N/A + value: 'null' + valueName: avg + - collapsed: false + gridPos: + h: 1 + w: 24 + x: 0 + 'y': 5 + id: 20 + panels: [] + repeat: env + title: Operations + type: row + - aliasColors: {} + bars: false + dashLength: 10 + dashes: false + datasource: Prometheus + fill: 1 + fillGradient: 0 + gridPos: + h: 6 + w: 10 + x: 0 + 'y': 6 + id: 7 + legend: + avg: false + current: false + max: false + min: false + show: true + total: false + values: false + lines: true + linewidth: 1 + links: [] + nullPointMode: 'null' + options: + dataLinks: [] + percentage: false + pointradius: 5 + points: false + renderer: flot + seriesOverrides: [] + spaceLength: 10 + stack: false + steppedLine: false + targets: + - expr: >- + 'rate(mongodb_op_counters_total{instance=~"$instance"}[$interval])' + format: time_series + interval: '' + intervalFactor: 2 + legendFormat: '{{type}}' + refId: A + step: 240 + thresholds: [] + timeFrom: null + timeRegions: [] + timeShift: null + title: Query Operations + tooltip: + shared: true + sort: 0 + value_type: individual + type: graph + xaxis: + buckets: null + mode: time + name: null + show: true + values: [] + yaxes: + - format: ops + label: null + logBase: 1 + max: null + min: null + show: true + - format: short + label: null + logBase: 1 + max: null + min: null + show: true + yaxis: + align: false + alignLevel: null + - aliasColors: {} + bars: false + dashLength: 10 + dashes: false + datasource: Prometheus + fill: 1 + fillGradient: 0 + gridPos: + h: 6 + w: 8 + x: 10 + 'y': 6 + id: 9 + legend: + avg: false + current: false + max: false + min: false + show: true + total: false + values: false + lines: true + linewidth: 1 + links: [] + nullPointMode: 'null' + options: + dataLinks: [] + percentage: false + pointradius: 5 + points: false + renderer: flot + seriesOverrides: + - alias: returned + yaxis: 1 + spaceLength: 10 + stack: false + steppedLine: false + targets: + - expr: >- + rate(mongodb_mongod_metrics_document_total{instance=~"$instance"}[$interval]) + format: time_series + interval: '' + intervalFactor: 2 + legendFormat: '{{state}}' + refId: A + step: 240 + thresholds: [] + timeFrom: null + timeRegions: [] + timeShift: null + title: Document Operations + tooltip: + shared: true + sort: 0 + value_type: individual + type: graph + xaxis: + buckets: null + mode: time + name: null + show: true + values: [] + yaxes: + - format: short + label: null + logBase: 1 + max: null + min: null + show: true + - format: short + label: null + logBase: 1 + max: null + min: null + show: true + yaxis: + align: false + alignLevel: null + - aliasColors: {} + bars: false + dashLength: 10 + dashes: false + datasource: Prometheus + fill: 1 + fillGradient: 0 + gridPos: + h: 6 + w: 6 + x: 18 + 'y': 6 + id: 8 + legend: + avg: false + current: false + max: false + min: false + show: true + total: false + values: false + lines: true + linewidth: 1 + links: [] + nullPointMode: 'null' + options: + dataLinks: [] + percentage: false + pointradius: 5 + points: false + renderer: flot + seriesOverrides: [] + spaceLength: 10 + stack: false + steppedLine: false + targets: + - expr: >- + rate(mongodb_mongod_metrics_query_executor_total{instance=~"$instance"}[$interval]) + format: time_series + interval: '' + intervalFactor: 2 + legendFormat: '{{state}}' + refId: A + step: 600 + thresholds: [] + timeFrom: null + timeRegions: [] + timeShift: null + title: Document Query Executor + tooltip: + shared: true + sort: 0 + value_type: individual + type: graph + xaxis: + buckets: null + mode: time + name: null + show: true + values: [] + yaxes: + - format: short + label: null + logBase: 1 + max: null + min: null + show: true + - format: short + label: null + logBase: 1 + max: null + min: null + show: true + yaxis: + align: false + alignLevel: null + - collapsed: false + gridPos: + h: 1 + w: 24 + x: 0 + 'y': 12 + id: 23 + panels: [] + repeat: null + title: Resources + type: row + - aliasColors: {} + bars: false + dashLength: 10 + dashes: false + datasource: Prometheus + fill: 1 + fillGradient: 0 + gridPos: + h: 6 + w: 12 + x: 0 + 'y': 13 + id: 4 + legend: + alignAsTable: false + avg: false + current: true + hideEmpty: false + hideZero: false + max: false + min: false + rightSide: false + show: true + total: false + values: true + lines: true + linewidth: 1 + links: [] + nullPointMode: 'null' + options: + dataLinks: [] + percentage: false + pointradius: 5 + points: false + renderer: flot + seriesOverrides: [] + spaceLength: 10 + stack: false + steppedLine: false + targets: + - expr: 'mongodb_memory{instance=~"$instance",type=~"resident|virtual"}' + format: time_series + interval: '' + intervalFactor: 2 + legendFormat: '{{type}}' + refId: A + step: 240 + thresholds: [] + timeFrom: null + timeRegions: [] + timeShift: null + title: Memory + tooltip: + shared: false + sort: 0 + value_type: individual + type: graph + xaxis: + buckets: null + mode: time + name: null + show: true + values: + - total + yaxes: + - format: decmbytes + label: MB + logBase: 1 + max: null + min: null + show: true + - format: short + label: null + logBase: 1 + max: null + min: null + show: true + yaxis: + align: false + alignLevel: null + - aliasColors: {} + bars: false + dashLength: 10 + dashes: false + datasource: Prometheus + fill: 1 + fillGradient: 0 + gridPos: + h: 6 + w: 12 + x: 12 + 'y': 13 + id: 5 + legend: + avg: false + current: false + max: false + min: false + show: true + total: false + values: false + lines: true + linewidth: 1 + links: [] + nullPointMode: 'null' + options: + dataLinks: [] + percentage: false + pointradius: 5 + points: false + renderer: flot + seriesOverrides: [] + spaceLength: 10 + stack: false + steppedLine: false + targets: + - expr: >- + 'rate(mongodb_network_bytes_total{instance=~"$instance"}[$interval])' + format: time_series + interval: '' + intervalFactor: 2 + legendFormat: '{{state}}' + metric: mongodb_metrics_operation_total + refId: A + step: 240 + thresholds: [] + timeFrom: null + timeRegions: [] + timeShift: null + title: Network I/O + tooltip: + shared: true + sort: 0 + value_type: individual + type: graph + xaxis: + buckets: null + mode: time + name: null + show: true + values: [] + yaxes: + - format: decbytes + label: null + logBase: 1 + max: null + min: null + show: true + - format: short + label: null + logBase: 1 + max: null + min: null + show: true + yaxis: + align: false + alignLevel: null +refresh: 5s +schemaVersion: 19 +style: dark +tags: [] +templating: + list: + - allValue: null + current: + text: All + value: $__all + datasource: Prometheus + definition: '' + hide: 0 + includeAll: true + label: instance + multi: true + name: instance + options: [] + query: 'label_values(mongodb_connections, instance)' + refresh: 1 + regex: '' + skipUrlSync: false + sort: 1 + tagValuesQuery: /.*-(.*?)-.*/ + tags: [] + tagsQuery: 'label_values(mongodb_connections, instance)' + type: query + useTags: false + - auto: true + auto_count: 30 + auto_min: 10s + current: + text: auto + value: $__auto_interval_interval + hide: 0 + label: null + name: interval + options: + - selected: true + text: auto + value: $__auto_interval_interval + - selected: false + text: 1m + value: 1m + - selected: false + text: 10m + value: 10m + - selected: false + text: 30m + value: 30m + - selected: false + text: 1h + value: 1h + - selected: false + text: 6h + value: 6h + - selected: false + text: 12h + value: 12h + - selected: false + text: 1d + value: 1d + - selected: false + text: 7d + value: 7d + - selected: false + text: 14d + value: 14d + - selected: false + text: 30d + value: 30d + query: '1m,10m,30m,1h,6h,12h,1d,7d,14d,30d' + refresh: 2 + skipUrlSync: false + type: interval +time: + from: now/d + 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: browser +title: MongoDB +uid: HEK4NbtZk +version: 2 diff --git a/installers/charm/grafana/files/mysql_exporter_dashboard.yaml b/installers/charm/grafana/files/mysql_exporter_dashboard.yaml new file mode 100644 index 00000000..a1e3dede --- /dev/null +++ b/installers/charm/grafana/files/mysql_exporter_dashboard.yaml @@ -0,0 +1,949 @@ +# Copyright 2021 Canonical Ltd. +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +# +# For those usages not covered by the Apache License, Version 2.0 please +# contact: legal@canonical.com +# +# To get in touch with the maintainers, please contact: +# osm-charmers@lists.launchpad.net +## + +--- +annotations: + list: + - builtIn: 1 + datasource: '-- Grafana --' + enable: true + hide: true + iconColor: 'rgba(0, 211, 255, 1)' + name: Annotations & Alerts + type: dashboard +description: Mysql dashboard +editable: true +gnetId: 6239 +graphTooltip: 0 +id: 34 +iteration: 1569307668513 +links: [] +panels: + - collapsed: false + gridPos: + h: 1 + w: 24 + x: 0 + 'y': 0 + id: 17 + panels: [] + title: Global status + type: row + - cacheTimeout: null + colorBackground: true + colorValue: false + colors: + - '#bf1b00' + - '#508642' + - '#ef843c' + datasource: Prometheus + format: none + gauge: + maxValue: 1 + minValue: 0 + show: false + thresholdLabels: false + thresholdMarkers: true + gridPos: + h: 7 + w: 6 + x: 0 + 'y': 1 + id: 11 + interval: null + links: [] + mappingType: 1 + mappingTypes: + - name: value to text + value: 1 + - name: range to text + value: 2 + maxDataPoints: 100 + nullPointMode: connected + nullText: null + options: {} + postfix: '' + postfixFontSize: 50% + prefix: '' + prefixFontSize: 50% + rangeMaps: + - from: 'null' + text: N/A + to: 'null' + sparkline: + fillColor: 'rgba(31, 118, 189, 0.18)' + full: true + lineColor: 'rgb(31, 120, 193)' + show: true + tableColumn: '' + targets: + - expr: 'mysql_up{release="$release"}' + format: time_series + intervalFactor: 1 + refId: A + thresholds: '1,2' + title: Instance Up + type: singlestat + valueFontSize: 80% + valueMaps: + - op: '=' + text: N/A + value: 'null' + valueName: current + - cacheTimeout: null + colorBackground: true + colorValue: false + colors: + - '#d44a3a' + - 'rgba(237, 129, 40, 0.89)' + - '#508642' + datasource: Prometheus + format: s + gauge: + maxValue: 100 + minValue: 0 + show: false + thresholdLabels: false + thresholdMarkers: true + gridPos: + h: 7 + w: 6 + x: 6 + 'y': 1 + id: 15 + interval: null + links: [] + mappingType: 1 + mappingTypes: + - name: value to text + value: 1 + - name: range to text + value: 2 + maxDataPoints: 100 + nullPointMode: connected + nullText: null + options: {} + postfix: '' + postfixFontSize: 50% + prefix: '' + prefixFontSize: 50% + rangeMaps: + - from: 'null' + text: N/A + to: 'null' + sparkline: + fillColor: 'rgba(31, 118, 189, 0.18)' + full: false + lineColor: 'rgb(31, 120, 193)' + show: true + tableColumn: '' + targets: + - expr: 'mysql_global_status_uptime{release="$release"}' + format: time_series + intervalFactor: 1 + refId: A + thresholds: '25200,32400' + title: Uptime + type: singlestat + valueFontSize: 80% + valueMaps: + - op: '=' + text: N/A + value: 'null' + valueName: current + - aliasColors: {} + bars: false + dashLength: 10 + dashes: false + datasource: Prometheus + fill: 1 + fillGradient: 0 + gridPos: + h: 7 + w: 12 + x: 12 + 'y': 1 + id: 29 + legend: + avg: false + current: false + max: false + min: false + show: false + total: false + values: false + lines: true + linewidth: 1 + links: [] + nullPointMode: 'null' + options: + dataLinks: [] + percentage: false + pointradius: 5 + points: false + renderer: flot + seriesOverrides: [] + spaceLength: 10 + stack: false + steppedLine: false + targets: + - expr: 'mysql_global_status_max_used_connections{release="$release"}' + format: time_series + intervalFactor: 1 + legendFormat: current + refId: A + - expr: 'mysql_global_variables_max_connections{release="$release"}' + format: time_series + intervalFactor: 1 + legendFormat: Max + refId: B + thresholds: [] + timeFrom: null + timeRegions: [] + timeShift: null + title: Mysql Connections + tooltip: + shared: true + sort: 0 + value_type: individual + type: graph + xaxis: + buckets: null + mode: time + name: null + show: true + values: [] + yaxes: + - format: short + label: null + logBase: 1 + max: null + min: null + show: true + - format: short + label: null + logBase: 1 + max: null + min: null + show: true + yaxis: + align: false + alignLevel: null + - collapsed: false + gridPos: + h: 1 + w: 24 + x: 0 + 'y': 8 + id: 19 + panels: [] + title: I/O + type: row + - aliasColors: {} + bars: false + dashLength: 10 + dashes: false + datasource: Prometheus + fill: 1 + fillGradient: 0 + gridPos: + h: 9 + w: 12 + x: 0 + 'y': 9 + id: 5 + legend: + avg: false + current: false + max: false + min: false + show: true + total: false + values: false + lines: true + linewidth: 1 + links: [] + nullPointMode: 'null' + options: + dataLinks: [] + percentage: false + pointradius: 5 + points: false + renderer: flot + seriesOverrides: + - alias: write + transform: negative-Y + spaceLength: 10 + stack: false + steppedLine: false + targets: + - expr: >- + 'irate(mysql_global_status_innodb_data_reads{release="$release"}[10m])' + format: time_series + intervalFactor: 1 + legendFormat: reads + refId: A + - expr: >- + 'irate(mysql_global_status_innodb_data_writes{release="$release"}[10m])' + format: time_series + intervalFactor: 1 + legendFormat: write + refId: B + thresholds: [] + timeFrom: null + timeRegions: [] + timeShift: null + title: mysql disk reads vs writes + tooltip: + shared: true + sort: 0 + value_type: individual + type: graph + xaxis: + buckets: null + mode: time + name: null + show: true + values: [] + yaxes: + - format: short + label: null + logBase: 1 + max: null + min: null + show: true + - format: short + label: null + logBase: 1 + max: null + min: null + show: true + yaxis: + align: false + alignLevel: null + - aliasColors: {} + bars: false + dashLength: 10 + dashes: false + datasource: Prometheus + fill: 1 + fillGradient: 0 + gridPos: + h: 9 + w: 12 + x: 12 + 'y': 9 + id: 9 + legend: + avg: false + current: false + max: false + min: false + show: false + total: false + values: false + lines: true + linewidth: 1 + links: [] + nullPointMode: 'null' + options: + dataLinks: [] + percentage: false + pointradius: 5 + points: false + renderer: flot + seriesOverrides: + - alias: /sent/ + transform: negative-Y + spaceLength: 10 + stack: false + steppedLine: false + targets: + - expr: >- + 'irate(mysql_global_status_bytes_received{release="$release"}[5m])' + format: time_series + intervalFactor: 1 + legendFormat: received + refId: A + - expr: 'irate(mysql_global_status_bytes_sent{release="$release"}[5m])' + format: time_series + intervalFactor: 1 + legendFormat: sent + refId: B + thresholds: [] + timeFrom: null + timeRegions: [] + timeShift: null + title: mysql network received vs sent + tooltip: + shared: true + sort: 0 + value_type: individual + type: graph + xaxis: + buckets: null + mode: time + name: null + show: true + values: [] + yaxes: + - format: short + label: null + logBase: 1 + max: null + min: null + show: true + - format: short + label: null + logBase: 1 + max: null + min: null + show: true + yaxis: + align: false + alignLevel: null + - aliasColors: {} + bars: false + dashLength: 10 + dashes: false + datasource: Prometheus + fill: 1 + fillGradient: 0 + gridPos: + h: 7 + w: 12 + x: 0 + 'y': 18 + id: 2 + legend: + avg: false + current: false + max: false + min: false + show: false + total: false + values: false + lines: true + linewidth: 1 + links: [] + nullPointMode: 'null' + options: + dataLinks: [] + percentage: false + pointradius: 5 + points: false + renderer: flot + seriesOverrides: [] + spaceLength: 10 + stack: false + steppedLine: false + targets: + - expr: >- + 'irate(mysql_global_status_commands_total{release="$release"}[5m]) >' + '0' + format: time_series + intervalFactor: 1 + legendFormat: '{{ command }} - {{ release }}' + refId: A + thresholds: [] + timeFrom: null + timeRegions: [] + timeShift: null + title: Query rates + tooltip: + shared: true + sort: 0 + value_type: individual + type: graph + xaxis: + buckets: null + mode: time + name: null + show: true + values: [] + yaxes: + - format: short + label: null + logBase: 1 + max: null + min: null + show: true + - format: short + label: null + logBase: 1 + max: null + min: null + show: true + yaxis: + align: false + alignLevel: null + - aliasColors: {} + bars: false + dashLength: 10 + dashes: false + datasource: Prometheus + fill: 1 + fillGradient: 0 + gridPos: + h: 7 + w: 12 + x: 12 + 'y': 18 + id: 25 + legend: + avg: false + current: false + max: false + min: false + show: false + total: false + values: false + lines: true + linewidth: 1 + links: [] + nullPointMode: 'null' + options: + dataLinks: [] + percentage: false + pointradius: 5 + points: false + renderer: flot + seriesOverrides: [] + spaceLength: 10 + stack: false + steppedLine: false + targets: + - expr: 'mysql_global_status_threads_running{release="$release"} ' + format: time_series + intervalFactor: 1 + refId: A + thresholds: [] + timeFrom: null + timeRegions: [] + timeShift: null + title: Running Threads + tooltip: + shared: true + sort: 0 + value_type: individual + type: graph + xaxis: + buckets: null + mode: time + name: null + show: true + values: [] + yaxes: + - decimals: null + format: short + label: null + logBase: 1 + max: '15' + min: null + show: true + - format: short + label: null + logBase: 1 + max: null + min: null + show: true + yaxis: + align: false + alignLevel: null + - collapsed: false + gridPos: + h: 1 + w: 24 + x: 0 + 'y': 25 + id: 21 + panels: [] + title: Errors + type: row + - aliasColors: {} + bars: false + dashLength: 10 + dashes: false + datasource: Prometheus + description: >- + The number of connections that were aborted because the client died + without closing the connection properly. + fill: 1 + fillGradient: 0 + gridPos: + h: 9 + w: 12 + x: 0 + 'y': 26 + id: 13 + legend: + avg: false + current: false + max: false + min: false + show: false + total: false + values: false + lines: true + linewidth: 1 + links: [] + nullPointMode: 'null' + options: + dataLinks: [] + percentage: false + pointradius: 5 + points: false + renderer: flot + seriesOverrides: [] + spaceLength: 10 + stack: false + steppedLine: false + targets: + - expr: 'mysql_global_status_aborted_clients{release="$release"}' + format: time_series + intervalFactor: 1 + refId: B + thresholds: [] + timeFrom: null + timeRegions: [] + timeShift: null + title: Aborted clients + tooltip: + shared: true + sort: 0 + value_type: individual + type: graph + xaxis: + buckets: null + mode: time + name: null + show: true + values: [] + yaxes: + - format: short + label: null + logBase: 1 + max: null + min: null + show: true + - format: short + label: null + logBase: 1 + max: null + min: null + show: true + yaxis: + align: false + alignLevel: null + - aliasColors: {} + bars: false + dashLength: 10 + dashes: false + datasource: Prometheus + description: The number of failed attempts to connect to the MySQL server. + fill: 1 + fillGradient: 0 + gridPos: + h: 9 + w: 12 + x: 12 + 'y': 26 + id: 4 + legend: + avg: false + current: false + max: false + min: false + show: false + total: false + values: false + lines: true + linewidth: 1 + links: [] + nullPointMode: 'null' + options: + dataLinks: [] + percentage: false + pointradius: 5 + points: false + renderer: flot + seriesOverrides: [] + spaceLength: 10 + stack: false + steppedLine: false + targets: + - expr: 'mysql_global_status_aborted_connects{release="$release"}' + format: time_series + intervalFactor: 1 + legendFormat: '' + refId: A + thresholds: [] + timeFrom: null + timeRegions: [] + timeShift: null + title: mysql aborted Connects + tooltip: + shared: true + sort: 0 + value_type: individual + type: graph + xaxis: + buckets: null + mode: time + name: null + show: true + values: [] + yaxes: + - format: short + label: null + logBase: 1 + max: null + min: null + show: true + - format: short + label: null + logBase: 1 + max: null + min: null + show: true + yaxis: + align: false + alignLevel: null + - collapsed: false + gridPos: + h: 1 + w: 24 + x: 0 + 'y': 35 + id: 23 + panels: [] + title: Disk usage + type: row + - aliasColors: {} + bars: false + dashLength: 10 + dashes: false + datasource: Prometheus + fill: 1 + fillGradient: 0 + gridPos: + h: 9 + w: 12 + x: 0 + 'y': 36 + id: 27 + legend: + avg: false + current: false + max: false + min: false + show: true + total: false + values: false + lines: true + linewidth: 1 + links: [] + nullPointMode: 'null' + options: + dataLinks: [] + percentage: false + pointradius: 5 + points: false + renderer: flot + seriesOverrides: [] + spaceLength: 10 + stack: false + steppedLine: false + targets: + - expr: >- + sum(mysql_info_schema_table_size{component="data_length",release="$release"}) + format: time_series + intervalFactor: 1 + legendFormat: Tables + refId: A + - expr: >- + sum(mysql_info_schema_table_size{component="index_length",release="$release"}) + format: time_series + intervalFactor: 1 + legendFormat: Indexes + refId: B + thresholds: [] + timeFrom: null + timeRegions: [] + timeShift: null + title: Disk usage tables / indexes + tooltip: + shared: true + sort: 0 + value_type: individual + type: graph + xaxis: + buckets: null + mode: time + name: null + show: true + values: [] + yaxes: + - format: decbytes + label: null + logBase: 1 + max: null + min: null + show: true + - format: short + label: null + logBase: 1 + max: null + min: null + show: true + yaxis: + align: false + alignLevel: null + - aliasColors: {} + bars: false + dashLength: 10 + dashes: false + datasource: Prometheus + fill: 1 + fillGradient: 0 + gridPos: + h: 9 + w: 12 + x: 12 + 'y': 36 + id: 7 + legend: + avg: false + current: false + max: false + min: false + show: false + total: false + values: false + lines: true + linewidth: 1 + links: [] + nullPointMode: 'null' + options: + dataLinks: [] + percentage: false + pointradius: 5 + points: false + renderer: flot + seriesOverrides: [] + spaceLength: 10 + stack: false + steppedLine: false + targets: + - expr: 'sum(mysql_info_schema_table_rows{release="$release"})' + format: time_series + intervalFactor: 1 + refId: A + thresholds: [] + timeFrom: null + timeRegions: [] + timeShift: null + title: Sum of all rows + tooltip: + shared: true + sort: 0 + value_type: individual + type: graph + xaxis: + buckets: null + mode: time + name: null + show: true + values: [] + yaxes: + - decimals: null + format: short + label: null + logBase: 1 + max: null + min: null + show: true + - format: short + label: null + logBase: 1 + max: null + min: null + show: true + yaxis: + align: false + alignLevel: null +schemaVersion: 19 +style: dark +tags: [] +templating: + list: + - allValue: null + current: + isNone: true + text: None + value: '' + datasource: Prometheus + definition: '' + hide: 0 + includeAll: false + label: null + multi: false + name: release + options: [] + query: 'label_values(mysql_up,release)' + refresh: 1 + regex: '' + skipUrlSync: false + sort: 0 + tagValuesQuery: '' + tags: [] + tagsQuery: '' + type: query + useTags: false +time: + from: now-1h + to: now +timepicker: + refresh_intervals: + - 5s + - 10s + - 30s + - 1m + - 5m + - 15m + - 30m + - 1h + - 2h + - 1d + time_options: + - 5m + - 15m + - 1h + - 6h + - 12h + - 24h + - 2d + - 7d + - 30d +timezone: '' +title: Mysql +uid: 6-kPlS7ik +version: 1 diff --git a/installers/charm/grafana/files/nodes_exporter_dashboard.yaml b/installers/charm/grafana/files/nodes_exporter_dashboard.yaml new file mode 100644 index 00000000..51fcff5c --- /dev/null +++ b/installers/charm/grafana/files/nodes_exporter_dashboard.yaml @@ -0,0 +1,1425 @@ +# Copyright 2021 Canonical Ltd. +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +# +# For those usages not covered by the Apache License, Version 2.0 please +# contact: legal@canonical.com +# +# To get in touch with the maintainers, please contact: +# osm-charmers@lists.launchpad.net +## + +--- +annotations: + list: + - builtIn: 1 + datasource: '-- Grafana --' + enable: true + hide: true + iconColor: 'rgba(0, 211, 255, 1)' + name: Annotations & Alerts + type: dashboard +description: Physical nodes dashboard +editable: true +gnetId: 11074 +graphTooltip: 0 +id: 12 +iteration: 1577553366915 +links: [] +panels: + - collapsed: true + gridPos: + h: 1 + w: 24 + x: 0 + 'y': 0 + id: 179 + panels: + - cacheTimeout: null + colorBackground: false + colorPostfix: false + colorPrefix: false + colorValue: true + colors: + - 'rgba(245, 54, 54, 0.9)' + - 'rgba(237, 129, 40, 0.89)' + - 'rgba(50, 172, 45, 0.97)' + datasource: Prometheus + decimals: 1 + description: '' + format: s + gauge: + maxValue: 100 + minValue: 0 + show: false + thresholdLabels: false + thresholdMarkers: true + gridPos: + h: 6 + w: 2 + x: 0 + 'y': 1 + hideTimeOverride: true + id: 15 + interval: null + links: [] + mappingType: 1 + mappingTypes: + - name: value to text + value: 1 + - name: range to text + value: 2 + maxDataPoints: 100 + nullPointMode: 'null' + nullText: null + options: {} + pluginVersion: 6.4.2 + postfix: '' + postfixFontSize: 50% + prefix: '' + prefixFontSize: 50% + rangeMaps: + - from: 'null' + text: N/A + to: 'null' + sparkline: + fillColor: 'rgba(31, 118, 189, 0.18)' + full: false + lineColor: 'rgb(31, 120, 193)' + show: false + tableColumn: '' + targets: + - expr: 'sum(time() - node_boot_time_seconds{instance=~"$node"})' + format: time_series + hide: false + instant: true + intervalFactor: 1 + refId: A + step: 40 + thresholds: '1,2' + title: System Uptime + type: singlestat + valueFontSize: 70% + valueMaps: + - op: '=' + text: N/A + value: 'null' + valueName: current + - cacheTimeout: null + colorBackground: false + colorPostfix: false + colorValue: true + colors: + - 'rgba(245, 54, 54, 0.9)' + - 'rgba(237, 129, 40, 0.89)' + - 'rgba(50, 172, 45, 0.97)' + datasource: Prometheus + description: '' + format: short + gauge: + maxValue: 100 + minValue: 0 + show: false + thresholdLabels: false + thresholdMarkers: true + gridPos: + h: 6 + w: 2 + x: 2 + 'y': 1 + id: 14 + interval: null + links: [] + mappingType: 1 + mappingTypes: + - name: value to text + value: 1 + - name: range to text + value: 2 + maxDataPoints: 100 + maxPerRow: 6 + nullPointMode: 'null' + nullText: null + options: {} + postfix: '' + postfixFontSize: 50% + prefix: '' + prefixFontSize: 50% + rangeMaps: + - from: 'null' + text: N/A + to: 'null' + sparkline: + fillColor: 'rgba(31, 118, 189, 0.18)' + full: false + lineColor: 'rgb(31, 120, 193)' + show: false + tableColumn: '' + targets: + - expr: >- + sum(count(node_cpu_seconds_total{instance=~"$node", + mode='system'}) by (cpu)) + format: time_series + instant: true + intervalFactor: 1 + legendFormat: '' + refId: A + step: 20 + thresholds: '1,2' + title: CPU Cores + type: singlestat + valueFontSize: 70% + valueMaps: + - op: '=' + text: N/A + value: 'null' + valueName: current + - cacheTimeout: null + colorBackground: false + colorValue: true + colors: + - 'rgba(245, 54, 54, 0.9)' + - 'rgba(237, 129, 40, 0.89)' + - 'rgba(50, 172, 45, 0.97)' + datasource: Prometheus + decimals: 2 + description: '' + format: bytes + gauge: + maxValue: 100 + minValue: 0 + show: false + thresholdLabels: false + thresholdMarkers: true + gridPos: + h: 6 + w: 2 + x: 4 + 'y': 1 + id: 75 + interval: null + links: [] + mappingType: 1 + mappingTypes: + - name: value to text + value: 1 + - name: range to text + value: 2 + maxDataPoints: 100 + maxPerRow: 6 + nullPointMode: 'null' + nullText: null + options: {} + postfix: '' + postfixFontSize: 70% + prefix: '' + prefixFontSize: 50% + rangeMaps: + - from: 'null' + text: N/A + to: 'null' + sparkline: + fillColor: 'rgba(31, 118, 189, 0.18)' + full: false + lineColor: 'rgb(31, 120, 193)' + show: false + tableColumn: '' + targets: + - expr: 'sum(node_memory_MemTotal_bytes{instance=~"$node"})' + format: time_series + instant: true + intervalFactor: 1 + legendFormat: '{{instance}}' + refId: A + step: 20 + thresholds: '2,3' + title: Total RAM + type: singlestat + valueFontSize: 70% + valueMaps: + - op: '=' + text: N/A + value: 'null' + valueName: current + - datasource: Prometheus + gridPos: + h: 6 + w: 18 + x: 6 + 'y': 1 + id: 177 + options: + displayMode: lcd + fieldOptions: + calcs: + - last + defaults: + mappings: + - from: '' + id: 1 + operator: '' + text: '-' + to: '' + type: 1 + value: NaN + max: 100 + min: 0 + thresholds: + - color: green + value: null + - color: '#EAB839' + value: 60 + - color: red + value: 80 + title: '' + unit: percent + override: {} + values: false + orientation: horizontal + pluginVersion: 6.3.5 + targets: + - expr: >- + 100 - + (avg(irate(node_cpu_seconds_total{instance=~"$node",mode="idle"}[30m])) + * 100) + instant: true + legendFormat: CPU Busy + refId: A + - expr: >- + avg(irate(node_cpu_seconds_total{instance=~"$node",mode="iowait"}[30m])) + * 100 + hide: true + instant: true + legendFormat: Busy Iowait + refId: C + - expr: >- + (1 - (node_memory_MemAvailable_bytes{instance=~"$node"} / + (node_memory_MemTotal_bytes{instance=~"$node"})))* 100 + instant: true + legendFormat: Used RAM Memory + refId: B + - expr: >- + 100 - + ((node_filesystem_avail_bytes{instance=~"$node",mountpoint="$maxmount",fstype=~"ext4|xfs"} + * 100) / node_filesystem_size_bytes + {instance=~"$node",mountpoint="$maxmount",fstype=~"ext4|xfs"}) + hide: false + instant: true + legendFormat: Used Max Mount($maxmount) + refId: D + - expr: >- + (1 - (node_memory_SwapFree_bytes{instance=~"$node"} / + node_memory_SwapTotal_bytes{instance=~"$node"})) * 100 + instant: true + legendFormat: Used SWAP + refId: E + timeFrom: null + timeShift: null + title: '' + type: bargauge + title: Summary + type: row + - collapsed: true + gridPos: + h: 1 + w: 24 + x: 0 + 'y': 1 + id: 181 + panels: + - aliasColors: + 15分钟: '#6ED0E0' + 1分钟: '#BF1B00' + 5分钟: '#CCA300' + bars: false + dashLength: 10 + dashes: false + datasource: Prometheus + editable: true + error: false + fill: 1 + fillGradient: 1 + grid: {} + gridPos: + h: 10 + w: 12 + x: 0 + 'y': 8 + height: '300' + id: 13 + legend: + alignAsTable: true + avg: true + current: true + max: true + min: false + rightSide: false + show: true + total: false + values: true + lines: true + linewidth: 2 + links: [] + maxPerRow: 6 + nullPointMode: null as zero + options: + dataLinks: [] + percentage: false + pointradius: 5 + points: false + renderer: flot + repeat: null + seriesOverrides: [] + spaceLength: 10 + stack: false + steppedLine: false + targets: + - expr: 'node_load1{instance=~"$node"}' + format: time_series + instant: false + interval: '' + intervalFactor: 1 + legendFormat: '{{instance}}_1m' + metric: '' + refId: A + step: 20 + target: '' + - expr: 'node_load5{instance=~"$node"}' + format: time_series + instant: false + interval: '' + intervalFactor: 1 + legendFormat: '{{instance}}_5m' + refId: B + step: 20 + - expr: 'node_load15{instance=~"$node"}' + format: time_series + instant: false + interval: '' + intervalFactor: 1 + legendFormat: '{{instance}}_15m' + refId: C + step: 20 + thresholds: [] + timeFrom: null + timeRegions: [] + timeShift: null + title: System Load + tooltip: + msResolution: false + shared: true + sort: 2 + value_type: cumulative + type: graph + xaxis: + buckets: null + mode: time + name: null + show: true + values: [] + yaxes: + - format: short + logBase: 1 + max: null + min: null + show: true + - format: short + logBase: 1 + max: null + min: null + show: true + yaxis: + align: false + alignLevel: null + - aliasColors: + '192.168.200.241:9100_Total': dark-red + Idle - Waiting for something to happen: '#052B51' + guest: '#9AC48A' + idle: '#052B51' + iowait: '#EAB839' + irq: '#BF1B00' + nice: '#C15C17' + softirq: '#E24D42' + steal: '#FCE2DE' + system: '#508642' + user: '#5195CE' + bars: false + dashLength: 10 + dashes: false + datasource: Prometheus + decimals: 2 + description: '' + fill: 1 + fillGradient: 0 + gridPos: + h: 10 + w: 12 + x: 12 + 'y': 8 + id: 7 + legend: + alignAsTable: true + avg: true + current: true + hideEmpty: true + hideZero: true + max: true + min: false + rightSide: false + show: true + sideWidth: null + sort: current + sortDesc: true + total: false + values: true + lines: true + linewidth: 2 + links: [] + maxPerRow: 6 + nullPointMode: 'null' + options: + dataLinks: [] + percentage: false + pointradius: 5 + points: false + renderer: flot + repeat: null + seriesOverrides: + - alias: /.*_Total/ + color: '#C4162A' + fill: 0 + spaceLength: 10 + stack: false + steppedLine: false + targets: + - expr: >- + avg(irate(node_cpu_seconds_total{instance=~"$node",mode="system"}[30m])) + by (instance) + format: time_series + hide: false + instant: false + interval: '' + intervalFactor: 1 + legendFormat: '{{instance}}_System' + refId: A + step: 20 + - expr: >- + avg(irate(node_cpu_seconds_total{instance=~"$node",mode="user"}[30m])) + by (instance) + format: time_series + hide: false + intervalFactor: 1 + legendFormat: '{{instance}}_User' + refId: B + step: 240 + - expr: >- + avg(irate(node_cpu_seconds_total{instance=~"$node",mode="iowait"}[30m])) + by (instance) + format: time_series + hide: false + instant: false + intervalFactor: 1 + legendFormat: '{{instance}}_Iowait' + refId: D + step: 240 + - expr: >- + 1 - + avg(irate(node_cpu_seconds_total{instance=~"$node",mode="idle"}[30m])) + by (instance) + format: time_series + hide: false + intervalFactor: 1 + legendFormat: '{{instance}}_Total' + refId: F + step: 240 + thresholds: [] + timeFrom: null + timeRegions: [] + timeShift: null + title: CPU + tooltip: + shared: true + sort: 2 + value_type: individual + type: graph + xaxis: + buckets: null + mode: time + name: null + show: true + values: [] + yaxes: + - decimals: 2 + format: percentunit + label: '' + logBase: 1 + max: null + min: null + show: true + - format: short + label: null + logBase: 1 + max: null + min: null + show: false + yaxis: + align: false + alignLevel: null + title: CPU + type: row + - collapsed: true + gridPos: + h: 1 + w: 24 + x: 0 + 'y': 2 + id: 183 + panels: + - columns: [] + datasource: Prometheus + fontSize: 110% + gridPos: + h: 8 + w: 8 + x: 0 + 'y': 3 + id: 164 + links: [] + options: {} + pageSize: null + scroll: true + showHeader: true + sort: + col: 11 + desc: true + styles: + - alias: Mounted on + colorMode: null + colors: + - 'rgba(50, 172, 45, 0.97)' + - 'rgba(237, 129, 40, 0.89)' + - 'rgba(245, 54, 54, 0.9)' + dateFormat: 'YYYY-MM-DD HH:mm:ss' + decimals: 2 + mappingType: 1 + pattern: mountpoint + thresholds: + - '' + type: string + unit: bytes + - alias: Avail + colorMode: value + colors: + - 'rgba(245, 54, 54, 0.9)' + - 'rgba(237, 129, 40, 0.89)' + - 'rgba(50, 172, 45, 0.97)' + dateFormat: 'YYYY-MM-DD HH:mm:ss' + decimals: 2 + mappingType: 1 + pattern: 'Value #A' + thresholds: + - '10000000000' + - '20000000000' + type: number + unit: bytes + - alias: Used + colorMode: cell + colors: + - 'rgba(50, 172, 45, 0.97)' + - 'rgba(237, 129, 40, 0.89)' + - 'rgba(245, 54, 54, 0.9)' + dateFormat: 'YYYY-MM-DD HH:mm:ss' + decimals: 2 + mappingType: 1 + pattern: 'Value #B' + thresholds: + - '0.6' + - '0.8' + type: number + unit: percentunit + - alias: Size + colorMode: null + colors: + - 'rgba(245, 54, 54, 0.9)' + - 'rgba(237, 129, 40, 0.89)' + - 'rgba(50, 172, 45, 0.97)' + dateFormat: 'YYYY-MM-DD HH:mm:ss' + decimals: 1 + link: false + mappingType: 1 + pattern: 'Value #C' + thresholds: [] + type: number + unit: bytes + - alias: Filesystem + colorMode: null + colors: + - 'rgba(245, 54, 54, 0.9)' + - 'rgba(237, 129, 40, 0.89)' + - 'rgba(50, 172, 45, 0.97)' + dateFormat: 'YYYY-MM-DD HH:mm:ss' + decimals: 2 + link: false + mappingType: 1 + pattern: fstype + thresholds: [] + type: string + unit: short + - alias: '' + colorMode: null + colors: + - 'rgba(245, 54, 54, 0.9)' + - 'rgba(237, 129, 40, 0.89)' + - 'rgba(50, 172, 45, 0.97)' + decimals: 2 + pattern: /.*/ + preserveFormat: true + sanitize: false + thresholds: [] + type: hidden + unit: short + targets: + - expr: >- + node_filesystem_avail_bytes + {instance=~'$node',fstype=~"ext4|xfs"}-0 + format: table + hide: false + instant: true + interval: 10s + intervalFactor: 1 + legendFormat: '' + refId: A + - expr: >- + 1-(node_filesystem_free_bytes{instance=~'$node',fstype=~"ext4|xfs"} + / + node_filesystem_size_bytes{instance=~'$node',fstype=~"ext4|xfs"}) + format: table + hide: false + instant: true + intervalFactor: 1 + legendFormat: '' + refId: B + - expr: >- + 'node_filesystem_size_bytes{instance=~''$node'',fstype=~"ext4|xfs"}-0' + format: table + hide: false + instant: true + intervalFactor: 1 + legendFormat: '' + refId: C + title: Disk Space Used (EXT4/XFS) + transform: table + type: table + - aliasColors: + vda_write: '#6ED0E0' + bars: false + dashLength: 10 + dashes: false + datasource: Prometheus + description: 'Per second read / write bytes ' + fill: 1 + fillGradient: 1 + gridPos: + h: 8 + w: 8 + x: 8 + 'y': 3 + height: '300' + id: 168 + legend: + alignAsTable: true + avg: true + current: true + hideEmpty: true + hideZero: true + max: true + min: false + show: true + sort: current + sortDesc: true + total: false + values: true + lines: true + linewidth: 2 + links: [] + nullPointMode: 'null' + options: + dataLinks: [] + percentage: false + pointradius: 5 + points: false + renderer: flot + seriesOverrides: + - alias: /.*_Read bytes$/ + transform: negative-Y + spaceLength: 10 + stack: false + steppedLine: false + targets: + - expr: 'irate(node_disk_read_bytes_total{instance=~"$node"}[30m])' + format: time_series + interval: '' + intervalFactor: 1 + legendFormat: '{{instance}}_{{device}}_Read bytes' + refId: A + step: 10 + - expr: 'irate(node_disk_written_bytes_total{instance=~"$node"}[30m])' + format: time_series + hide: false + intervalFactor: 1 + legendFormat: '{{instance}}_{{device}}_Written bytes' + refId: B + step: 10 + thresholds: [] + timeFrom: null + timeRegions: [] + timeShift: null + title: Disk R/W Data + tooltip: + shared: true + sort: 2 + value_type: individual + type: graph + xaxis: + buckets: null + mode: time + name: null + show: true + values: [] + yaxes: + - decimals: null + format: Bps + label: Bytes read (-) / write (+) + logBase: 1 + max: null + min: null + show: true + - format: short + label: null + logBase: 1 + max: null + min: null + show: false + yaxis: + align: false + alignLevel: null + - aliasColors: + Idle - Waiting for something to happen: '#052B51' + guest: '#9AC48A' + idle: '#052B51' + iowait: '#EAB839' + irq: '#BF1B00' + nice: '#C15C17' + "sdb_æ¯\x8F秒I/Oæ“\x8D作%": '#d683ce' + softirq: '#E24D42' + steal: '#FCE2DE' + system: '#508642' + user: '#5195CE' + "ç£\x81盘花费在I/Oæ“\x8D作å\x8D 比": '#ba43a9' + bars: false + dashLength: 10 + dashes: false + datasource: Prometheus + decimals: null + description: >- + The time spent on I/O in the natural time of each second.(wall-clock + time) + fill: 1 + fillGradient: 5 + gridPos: + h: 8 + w: 8 + x: 16 + 'y': 3 + id: 175 + legend: + alignAsTable: true + avg: true + current: true + hideEmpty: true + hideZero: true + max: true + min: false + rightSide: false + show: true + sideWidth: null + sort: null + sortDesc: null + total: false + values: true + lines: true + linewidth: 2 + links: [] + maxPerRow: 6 + nullPointMode: 'null' + options: + dataLinks: [] + percentage: false + pointradius: 5 + points: false + renderer: flot + seriesOverrides: [] + spaceLength: 10 + stack: false + steppedLine: false + targets: + - expr: >- + 'irate(node_disk_io_time_seconds_total{instance=~"$node"}[30m])' + format: time_series + intervalFactor: 1 + legendFormat: '{{instance}}_{{device}}_ IO time' + refId: C + thresholds: [] + timeFrom: null + timeRegions: [] + timeShift: null + title: Time Spent Doing I/Os + tooltip: + shared: true + sort: 2 + value_type: individual + type: graph + xaxis: + buckets: null + mode: time + name: null + show: true + values: [] + yaxes: + - decimals: null + format: s + label: '' + logBase: 1 + max: null + min: null + show: true + - format: short + label: null + logBase: 1 + max: null + min: null + show: false + yaxis: + align: false + alignLevel: null + title: Disk + type: row + - collapsed: true + gridPos: + h: 1 + w: 24 + x: 0 + 'y': 3 + id: 185 + panels: + - bars: false + dashLength: 10 + dashes: false + datasource: Prometheus + decimals: 2 + fill: 1 + fillGradient: 0 + gridPos: + h: 8 + w: 24 + x: 0 + 'y': 28 + height: '300' + id: 156 + legend: + alignAsTable: true + avg: false + current: true + max: false + min: false + rightSide: false + show: true + sort: current + sortDesc: true + total: false + values: true + lines: true + linewidth: 2 + links: [] + nullPointMode: 'null' + options: + dataLinks: [] + percentage: false + pointradius: 5 + points: false + renderer: flot + seriesOverrides: + - alias: /.*_Total/ + color: '#C4162A' + fill: 0 + spaceLength: 10 + stack: false + steppedLine: false + targets: + - expr: 'node_memory_MemTotal_bytes{instance=~"$node"}' + format: time_series + hide: false + instant: false + intervalFactor: 1 + legendFormat: '{{instance}}_Total' + refId: A + step: 4 + - expr: >- + node_memory_MemTotal_bytes{instance=~"$node"} - + node_memory_MemAvailable_bytes{instance=~"$node"} + format: time_series + hide: false + intervalFactor: 1 + legendFormat: '{{instance}}_Used' + refId: B + step: 4 + - expr: 'node_memory_MemAvailable_bytes{instance=~"$node"}' + format: time_series + hide: false + interval: '' + intervalFactor: 1 + legendFormat: '{{instance}}_Avaliable' + refId: F + step: 4 + thresholds: [] + timeFrom: null + timeRegions: [] + timeShift: null + title: Memory + tooltip: + shared: true + sort: 2 + value_type: individual + type: graph + xaxis: + buckets: null + mode: time + name: null + show: true + values: [] + yaxes: + - format: bytes + label: null + logBase: 1 + max: null + min: '0' + show: true + - format: short + label: null + logBase: 1 + max: null + min: null + show: true + yaxis: + align: false + alignLevel: null + title: Memory + type: row + - collapsed: true + gridPos: + h: 1 + w: 24 + x: 0 + 'y': 4 + id: 187 + panels: + - bars: false + dashLength: 10 + dashes: false + datasource: Prometheus + fill: 1 + fillGradient: 3 + gridPos: + h: 12 + w: 12 + x: 0 + 'y': 29 + height: '300' + id: 157 + legend: + alignAsTable: true + avg: false + current: true + hideEmpty: true + hideZero: true + max: true + min: false + rightSide: false + show: true + sort: current + sortDesc: true + total: false + values: true + lines: true + linewidth: 2 + links: [] + nullPointMode: 'null' + options: + dataLinks: [] + percentage: false + pointradius: 2 + points: false + renderer: flot + seriesOverrides: + - alias: /.*_transmit$/ + transform: negative-Y + spaceLength: 10 + stack: false + steppedLine: false + targets: + - expr: >- + irate(node_network_receive_bytes_total{instance=~'$node',device!~'tap.*|veth.*|br.*|docker.*|virbr*|lo*'}[30m])*8 + format: time_series + intervalFactor: 1 + legendFormat: '{{instance}}_{{device}}_receive' + refId: A + step: 4 + - expr: >- + irate(node_network_transmit_bytes_total{instance=~'$node',device!~'tap.*|veth.*|br.*|docker.*|virbr*|lo*'}[30m])*8 + format: time_series + intervalFactor: 1 + legendFormat: '{{instance}}_{{device}}_transmit' + refId: B + step: 4 + thresholds: [] + timeFrom: null + timeRegions: [] + timeShift: null + title: Network Traffic + tooltip: + shared: true + sort: 2 + value_type: individual + type: graph + xaxis: + buckets: null + mode: time + name: null + show: true + values: [] + yaxes: + - format: bps + label: transmit(-)/receive(+) + logBase: 1 + max: null + min: null + show: true + - format: short + label: null + logBase: 1 + max: null + min: null + show: false + yaxis: + align: false + alignLevel: null + - aliasColors: + TCP: '#6ED0E0' + bars: false + dashLength: 10 + dashes: false + datasource: Prometheus + description: >- + TCP_alloc - Allocated sockets + + + CurrEstab - TCP connections for which the current state is either + ESTABLISHED or CLOSE- WAIT + + + TCP_tw - Sockets wating close + + + UDP_inuse - Udp sockets currently in use + + + Sockets_used - Sockets currently in use + fill: 1 + fillGradient: 0 + gridPos: + h: 12 + w: 12 + x: 12 + 'y': 29 + height: '300' + id: 158 + interval: '' + legend: + alignAsTable: true + avg: true + current: true + hideEmpty: true + hideZero: true + max: true + min: false + rightSide: false + show: true + sort: current + sortDesc: true + total: false + values: true + lines: true + linewidth: 2 + links: [] + nullPointMode: 'null' + options: + dataLinks: [] + percentage: false + pointradius: 5 + points: false + renderer: flot + seriesOverrides: + - alias: /.*_Sockets_used/ + color: '#C4162A' + fill: 0 + spaceLength: 10 + stack: false + steppedLine: false + targets: + - expr: 'node_netstat_Tcp_CurrEstab{instance=~''$node''}' + format: time_series + hide: false + instant: false + interval: '' + intervalFactor: 1 + legendFormat: '{{instance}}_CurrEstab' + refId: A + step: 20 + - expr: 'node_sockstat_TCP_tw{instance=~''$node''}' + format: time_series + intervalFactor: 1 + legendFormat: '{{instance}}_TCP_tw' + refId: D + - expr: 'node_sockstat_sockets_used{instance=~''$node''}' + legendFormat: '{{instance}}_Sockets_used' + refId: B + - expr: 'node_sockstat_UDP_inuse{instance=~''$node''}' + legendFormat: '{{instance}}_UDP_inuse' + refId: C + - expr: 'node_sockstat_TCP_alloc{instance=~''$node''}' + legendFormat: '{{instance}}_TCP_alloc' + refId: E + thresholds: [] + timeFrom: null + timeRegions: [] + timeShift: null + title: Network Sockstat + tooltip: + shared: true + sort: 2 + value_type: individual + type: graph + xaxis: + buckets: null + mode: time + name: null + show: true + values: [] + yaxes: + - format: short + label: null + logBase: 1 + max: null + min: null + show: true + - format: short + label: null + logBase: 1 + max: null + min: null + show: true + yaxis: + align: false + alignLevel: null + title: Network + type: row +refresh: false +schemaVersion: 19 +style: dark +tags: [] +templating: + list: + - allValue: null + current: + text: node-exporter + value: node-exporter + datasource: Prometheus + definition: 'label_values(node_uname_info, job)' + hide: 0 + includeAll: false + label: JOB + multi: false + name: job + options: [] + query: 'label_values(node_uname_info, job)' + refresh: 1 + regex: '' + skipUrlSync: false + sort: 1 + tagValuesQuery: '' + tags: [] + tagsQuery: '' + type: query + useTags: false + - allValue: null + current: + text: All + value: $__all + datasource: Prometheus + definition: 'label_values(node_uname_info{job=~"$job"}, nodename)' + hide: 0 + includeAll: true + label: Host + multi: true + name: hostname + options: [] + query: 'label_values(node_uname_info{job=~"$job"}, nodename)' + refresh: 1 + regex: '' + skipUrlSync: false + sort: 0 + tagValuesQuery: '' + tags: [] + tagsQuery: '' + type: query + useTags: false + - allFormat: glob + allValue: null + current: + tags: [] + text: All + value: $__all + datasource: Prometheus + definition: >- + 'label_values(node_uname_info{nodename=~"$hostname"},instance)' + hide: 0 + includeAll: true + label: IP + multi: false + multiFormat: regex values + name: node + options: [] + query: 'label_values(node_uname_info{nodename=~"$hostname"},instance)' + refresh: 2 + regex: '' + skipUrlSync: false + sort: 1 + tagValuesQuery: '' + tags: [] + tagsQuery: '' + type: query + useTags: false + - allValue: null + current: + text: / + value: / + datasource: Prometheus + definition: '' + hide: 2 + includeAll: false + label: '' + multi: false + name: maxmount + options: [] + query: >- + query_result(topk(1,sort_desc + (max(node_filesystem_size_bytes{instance=~'$node',fstype=~"ext4|xfs"}) + by (mountpoint)))) + refresh: 2 + regex: /.*\"(.*)\".*/ + skipUrlSync: false + sort: 0 + tagValuesQuery: '' + tags: [] + tagsQuery: '' + type: query + useTags: false + - allFormat: glob + allValue: null + current: + isNone: true + text: None + value: '' + datasource: Prometheus + definition: '' + hide: 2 + includeAll: false + multi: false + multiFormat: regex values + name: env + options: [] + query: 'label_values(node_exporter_build_info,env)' + refresh: 2 + regex: '' + skipUrlSync: false + sort: 1 + tagValuesQuery: '' + tags: [] + tagsQuery: '' + type: query + useTags: false + - allFormat: glob + allValue: '' + current: + isNone: true + text: None + value: '' + datasource: Prometheus + definition: 'label_values(node_exporter_build_info{env=~''$env''},name)' + hide: 2 + includeAll: false + label: "å\x90\x8D称" + multi: true + multiFormat: regex values + name: name + options: [] + query: 'label_values(node_exporter_build_info{env=~''$env''},name)' + refresh: 2 + regex: '' + skipUrlSync: false + sort: 1 + tagValuesQuery: /.*/ + tags: [] + tagsQuery: '' + type: query + useTags: false +time: + from: now-2d + to: now +timepicker: + now: true + refresh_intervals: + - 5s + - 10s + - 30s + - 1m + - 5m + - 15m + - 30m + - 1h + - 2h + - 1d + time_options: + - 5m + - 15m + - 1h + - 6h + - 12h + - 24h + - 2d + - 7d + - 30d +timezone: browser +title: Hosts +uid: ha7fSE0Zz +version: 1 diff --git a/installers/charm/grafana/files/summary_dashboard.yaml b/installers/charm/grafana/files/summary_dashboard.yaml new file mode 100644 index 00000000..c9c1fdf7 --- /dev/null +++ b/installers/charm/grafana/files/summary_dashboard.yaml @@ -0,0 +1,1621 @@ +# Copyright 2021 Canonical Ltd. +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. +# +# For those usages not covered by the Apache License, Version 2.0 please +# contact: legal@canonical.com +# +# To get in touch with the maintainers, please contact: +# osm-charmers@lists.launchpad.net +## + +--- +annotations: + list: + - builtIn: 1 + datasource: '-- Grafana --' + enable: true + hide: true + iconColor: 'rgba(0, 211, 255, 1)' + name: Annotations & Alerts + type: dashboard +description: OSM status summary +editable: true +gnetId: 6417 +graphTooltip: 1 +id: 10 +iteration: 1577638384562 +links: + - asDropdown: true + icon: external link + includeVars: true + keepTime: false + tags: [] + title: Dashboards + type: dashboards +panels: + - collapsed: false + gridPos: + h: 1 + w: 24 + x: 0 + 'y': 0 + id: 2 + panels: [] + title: Cluster Health + type: row + - cacheTimeout: null + colorBackground: false + colorPrefix: false + colorValue: false + colors: + - '#299c46' + - 'rgba(237, 129, 40, 0.89)' + - '#d44a3a' + datasource: Prometheus + format: none + gauge: + maxValue: 100 + minValue: 0 + show: false + thresholdLabels: false + thresholdMarkers: true + gridPos: + h: 2 + w: 12 + x: 0 + 'y': 1 + id: 26 + interval: null + links: [] + mappingType: 1 + mappingTypes: + - name: value to text + value: 1 + - name: range to text + value: 2 + maxDataPoints: 100 + nullPointMode: connected + nullText: null + options: {} + postfix: ' Nodes' + postfixFontSize: 50% + prefix: '' + prefixFontSize: 50% + rangeMaps: + - from: 'null' + text: N/A + to: 'null' + repeat: null + repeatDirection: h + sparkline: + fillColor: 'rgba(31, 118, 189, 0.18)' + full: false + lineColor: 'rgb(31, 120, 193)' + show: false + tableColumn: Value + targets: + - expr: sum(kube_node_info) + format: time_series + instant: true + intervalFactor: 1 + legendFormat: '' + refId: B + thresholds: '1' + title: '' + type: singlestat + valueFontSize: 70% + valueMaps: + - op: '=' + text: N/A + value: 'null' + valueName: current + - cacheTimeout: null + colorBackground: false + colorValue: false + colors: + - '#299c46' + - 'rgba(237, 129, 40, 0.89)' + - '#d44a3a' + datasource: Prometheus + format: none + gauge: + maxValue: 100 + minValue: 0 + show: false + thresholdLabels: false + thresholdMarkers: true + gridPos: + h: 2 + w: 12 + x: 12 + 'y': 1 + id: 30 + interval: null + links: [] + mappingType: 1 + mappingTypes: + - name: value to text + value: 1 + - name: range to text + value: 2 + maxDataPoints: 100 + nullPointMode: connected + nullText: null + options: {} + postfix: ' Pods Running' + postfixFontSize: 50% + prefix: '' + prefixFontSize: 50% + rangeMaps: + - from: 'null' + text: N/A + to: 'null' + sparkline: + fillColor: 'rgba(78, 203, 42, 0.28)' + full: false + lineColor: '#629e51' + show: true + tableColumn: '' + targets: + - expr: sum(kube_pod_status_phase) + format: time_series + instant: true + interval: '' + intervalFactor: 1 + refId: A + thresholds: '' + title: '' + type: singlestat + valueFontSize: 70% + valueMaps: + - op: '=' + text: N/A + value: 'null' + valueName: current + - cacheTimeout: null + colorBackground: true + colorPrefix: false + colorValue: false + colors: + - '#56A64B' + - 'rgba(237, 129, 40, 0.89)' + - '#d44a3a' + datasource: Prometheus + format: none + gauge: + maxValue: 100 + minValue: 0 + show: false + thresholdLabels: false + thresholdMarkers: true + gridPos: + h: 2 + w: 12 + x: 0 + 'y': 3 + id: 24 + interval: null + links: [] + mappingType: 1 + mappingTypes: + - name: value to text + value: 1 + - name: range to text + value: 2 + maxDataPoints: 100 + nullPointMode: connected + nullText: null + options: {} + postfix: ' Nodes Unavailable' + postfixFontSize: 50% + prefix: '' + prefixFontSize: 50% + rangeMaps: + - from: 'null' + text: N/A + to: 'null' + sparkline: + fillColor: 'rgba(31, 118, 189, 0.18)' + full: false + lineColor: 'rgb(31, 120, 193)' + show: false + tableColumn: '' + targets: + - expr: >- + sum(kube_node_info)-sum(kube_node_status_condition{condition="Ready", + status="true"}) + format: time_series + instant: true + intervalFactor: 1 + refId: A + thresholds: '1,1' + title: '' + type: singlestat + valueFontSize: 70% + valueMaps: + - op: '=' + text: N/A + value: 'null' + valueName: current + - cacheTimeout: null + colorBackground: true + colorValue: false + colors: + - '#56A64B' + - 'rgba(237, 129, 40, 0.89)' + - '#d44a3a' + datasource: Prometheus + format: none + gauge: + maxValue: 100 + minValue: 0 + show: false + thresholdLabels: false + thresholdMarkers: true + gridPos: + h: 2 + w: 12 + x: 12 + 'y': 3 + id: 55 + interval: null + links: [] + mappingType: 1 + mappingTypes: + - name: value to text + value: 1 + - name: range to text + value: 2 + maxDataPoints: 100 + nullPointMode: connected + nullText: null + options: {} + postfix: ' Pods not Ready' + postfixFontSize: 50% + prefix: '' + prefixFontSize: 50% + rangeMaps: + - from: 'null' + text: N/A + to: 'null' + sparkline: + fillColor: 'rgba(31, 118, 189, 0.18)' + full: false + lineColor: 'rgb(31, 120, 193)' + show: false + ymax: null + ymin: null + tableColumn: '' + targets: + - expr: 'sum(kube_pod_status_phase{phase!="Running"})' + instant: true + legendFormat: '' + refId: A + thresholds: '1' + timeFrom: null + timeShift: null + title: '' + type: singlestat + valueFontSize: 70% + valueMaps: + - op: '=' + text: N/A + value: 'null' + valueName: avg + - cacheTimeout: null + colorBackground: false + colorValue: false + colors: + - '#299c46' + - 'rgba(237, 129, 40, 0.89)' + - '#d44a3a' + datasource: Prometheus + format: percentunit + gauge: + maxValue: 1 + minValue: 0 + show: true + thresholdLabels: false + thresholdMarkers: true + gridPos: + h: 4 + w: 6 + x: 0 + 'y': 5 + id: 4 + interval: null + links: [] + mappingType: 1 + mappingTypes: + - name: value to text + value: 1 + - name: range to text + value: 2 + maxDataPoints: 100 + nullPointMode: connected + nullText: null + options: {} + postfix: '' + postfixFontSize: 50% + prefix: '' + prefixFontSize: 50% + rangeMaps: + - from: 'null' + text: N/A + to: 'null' + sparkline: + fillColor: 'rgba(31, 118, 189, 0.18)' + full: false + lineColor: 'rgb(31, 120, 193)' + show: false + tableColumn: '' + targets: + - expr: sum(kube_pod_info) / sum(kube_node_status_allocatable_pods) + format: time_series + intervalFactor: 1 + refId: A + thresholds: '0.7,0.85' + title: Pod Usage + type: singlestat + valueFontSize: 80% + valueMaps: + - op: '=' + text: N/A + value: 'null' + valueName: current + - cacheTimeout: null + colorBackground: false + colorValue: false + colors: + - '#299c46' + - 'rgba(237, 129, 40, 0.89)' + - '#d44a3a' + datasource: Prometheus + format: percentunit + gauge: + maxValue: 1 + minValue: 0 + show: true + thresholdLabels: false + thresholdMarkers: true + gridPos: + h: 4 + w: 6 + x: 6 + 'y': 5 + id: 5 + interval: null + links: [] + mappingType: 1 + mappingTypes: + - name: value to text + value: 1 + - name: range to text + value: 2 + maxDataPoints: 100 + nullPointMode: connected + nullText: null + options: {} + postfix: '' + postfixFontSize: 50% + prefix: '' + prefixFontSize: 50% + rangeMaps: + - from: 'null' + text: N/A + to: 'null' + sparkline: + fillColor: 'rgba(31, 118, 189, 0.18)' + full: false + lineColor: 'rgb(31, 120, 193)' + show: false + tableColumn: '' + targets: + - expr: >- + sum(kube_pod_container_resource_requests_cpu_cores) / + sum(kube_node_status_allocatable_cpu_cores) + format: time_series + instant: true + intervalFactor: 1 + refId: A + thresholds: '0.7,0.85' + title: CPU Usage + type: singlestat + valueFontSize: 80% + valueMaps: + - op: '=' + text: N/A + value: 'null' + valueName: current + - cacheTimeout: null + colorBackground: false + colorValue: false + colors: + - '#299c46' + - 'rgba(237, 129, 40, 0.89)' + - '#d44a3a' + datasource: Prometheus + format: percentunit + gauge: + maxValue: 1 + minValue: 0 + show: true + thresholdLabels: false + thresholdMarkers: true + gridPos: + h: 4 + w: 6 + x: 12 + 'y': 5 + id: 6 + interval: null + links: [] + mappingType: 1 + mappingTypes: + - name: value to text + value: 1 + - name: range to text + value: 2 + maxDataPoints: 100 + nullPointMode: connected + nullText: null + options: {} + postfix: '' + postfixFontSize: 50% + prefix: '' + prefixFontSize: 50% + rangeMaps: + - from: 'null' + text: N/A + to: 'null' + sparkline: + fillColor: 'rgba(31, 118, 189, 0.18)' + full: false + lineColor: 'rgb(31, 120, 193)' + show: false + tableColumn: '' + targets: + - expr: >- + sum(kube_pod_container_resource_requests_memory_bytes) / + sum(kube_node_status_allocatable_memory_bytes) + format: time_series + instant: true + intervalFactor: 1 + refId: A + thresholds: '0.7,0.85' + title: Memory Usage + type: singlestat + valueFontSize: 80% + valueMaps: + - op: '=' + text: N/A + value: 'null' + valueName: current + - cacheTimeout: null + colorBackground: false + colorValue: false + colors: + - '#73BF69' + - 'rgba(237, 129, 40, 0.89)' + - '#d44a3a' + datasource: Prometheus + format: percentunit + gauge: + maxValue: 1 + minValue: 0 + show: true + thresholdLabels: false + thresholdMarkers: true + gridPos: + h: 4 + w: 6 + x: 18 + 'y': 5 + id: 7 + interval: null + links: [] + mappingType: 1 + mappingTypes: + - name: value to text + value: 1 + - name: range to text + value: 2 + maxDataPoints: 100 + nullPointMode: connected + nullText: null + options: {} + postfix: '' + postfixFontSize: 50% + prefix: '' + prefixFontSize: 50% + rangeMaps: + - from: 'null' + text: N/A + to: 'null' + sparkline: + fillColor: 'rgba(31, 118, 189, 0.18)' + full: false + lineColor: 'rgb(31, 120, 193)' + show: false + tableColumn: '' + targets: + - expr: >- + (sum (node_filesystem_size_bytes) - sum (node_filesystem_free_bytes)) + / sum (node_filesystem_size_bytes) + format: time_series + instant: true + intervalFactor: 1 + refId: A + thresholds: '0.7,0.85' + title: Disk Usage + type: singlestat + valueFontSize: 80% + valueMaps: + - op: '=' + text: N/A + value: 'null' + valueName: current + - collapsed: false + gridPos: + h: 1 + w: 24 + x: 0 + 'y': 9 + id: 61 + panels: [] + title: OSM + type: row + - cacheTimeout: null + colorBackground: false + colorValue: false + colors: + - '#d44a3a' + - 'rgba(237, 129, 40, 0.89)' + - '#299c46' + datasource: Prometheus + format: none + gauge: + maxValue: 1 + minValue: 0 + show: true + thresholdLabels: false + thresholdMarkers: false + gridPos: + h: 4 + w: 3 + x: 0 + 'y': 10 + id: 71 + interval: null + links: [] + mappingType: 1 + mappingTypes: + - name: value to text + value: 1 + - name: range to text + value: 2 + maxDataPoints: 100 + nullPointMode: connected + nullText: null + options: {} + postfix: '' + postfixFontSize: 50% + prefix: '' + prefixFontSize: 50% + rangeMaps: + - from: 'null' + text: N/A + to: 'null' + sparkline: + fillColor: 'rgba(31, 118, 189, 0.18)' + full: false + lineColor: 'rgb(31, 120, 193)' + show: false + ymax: null + ymin: null + tableColumn: '' + targets: + - expr: >- + kube_statefulset_status_replicas_ready{namespace="osm", + statefulset="prometheus"} + format: time_series + refId: A + thresholds: '0,1' + timeFrom: null + timeShift: null + title: Prometheus + type: singlestat + valueFontSize: 100% + valueMaps: + - op: '=' + text: '0' + value: 'null' + valueName: current + - cacheTimeout: null + colorBackground: false + colorValue: false + colors: + - '#d44a3a' + - 'rgba(237, 129, 40, 0.89)' + - '#299c46' + datasource: Prometheus + decimals: null + format: none + gauge: + maxValue: 1 + minValue: 0 + show: true + thresholdLabels: false + thresholdMarkers: false + gridPos: + h: 4 + w: 3 + x: 4 + 'y': 10 + id: 74 + interval: null + links: [] + mappingType: 1 + mappingTypes: + - name: value to text + value: 1 + - name: range to text + value: 2 + maxDataPoints: 100 + nullPointMode: connected + nullText: null + options: {} + postfix: '' + postfixFontSize: 50% + prefix: '' + prefixFontSize: 50% + rangeMaps: + - from: 'null' + text: N/A + to: 'null' + sparkline: + fillColor: 'rgba(31, 118, 189, 0.18)' + full: false + lineColor: 'rgb(31, 120, 193)' + show: false + ymax: null + ymin: null + tableColumn: '' + targets: + - expr: >- + kube_statefulset_status_replicas_ready{namespace="osm", + statefulset="mongodb-k8s"} + format: time_series + refId: A + thresholds: '0,1' + timeFrom: null + timeShift: null + title: mongo + type: singlestat + valueFontSize: 100% + valueMaps: + - op: '=' + text: '0' + value: 'null' + valueName: current + - cacheTimeout: null + colorBackground: false + colorValue: false + colors: + - '#d44a3a' + - 'rgba(237, 129, 40, 0.89)' + - '#299c46' + datasource: Prometheus + format: none + gauge: + maxValue: 1 + minValue: 0 + show: true + thresholdLabels: false + thresholdMarkers: false + gridPos: + h: 4 + w: 3 + x: 8 + 'y': 10 + id: 72 + interval: null + links: [] + mappingType: 1 + mappingTypes: + - name: value to text + value: 1 + - name: range to text + value: 2 + maxDataPoints: 100 + nullPointMode: connected + nullText: null + options: {} + postfix: '' + postfixFontSize: 50% + prefix: '' + prefixFontSize: 50% + rangeMaps: + - from: 'null' + text: N/A + to: 'null' + sparkline: + fillColor: 'rgba(31, 118, 189, 0.18)' + full: false + lineColor: 'rgb(31, 120, 193)' + show: false + ymax: null + ymin: null + tableColumn: '' + targets: + - expr: >- + kube_statefulset_status_replicas_ready{namespace="osm", + statefulset="mysql"} + format: time_series + refId: A + thresholds: '0,1' + timeFrom: null + timeShift: null + title: 'mysql ' + type: singlestat + valueFontSize: 100% + valueMaps: + - op: '=' + text: '0' + value: 'null' + valueName: current + - cacheTimeout: null + colorBackground: false + colorValue: false + colors: + - '#d44a3a' + - 'rgba(237, 129, 40, 0.89)' + - '#299c46' + datasource: Prometheus + format: none + gauge: + maxValue: 1 + minValue: 0 + show: true + thresholdLabels: false + thresholdMarkers: false + gridPos: + h: 4 + w: 3 + x: 12 + 'y': 10 + id: 77 + interval: null + links: [] + mappingType: 1 + mappingTypes: + - name: value to text + value: 1 + - name: range to text + value: 2 + maxDataPoints: 100 + nullPointMode: connected + nullText: null + options: {} + pluginVersion: 6.3.5 + postfix: '' + postfixFontSize: 50% + prefix: '' + prefixFontSize: 50% + rangeMaps: + - from: 'null' + text: N/A + to: 'null' + sparkline: + fillColor: 'rgba(31, 118, 189, 0.18)' + full: false + lineColor: 'rgb(31, 120, 193)' + show: false + ymax: null + ymin: null + tableColumn: Value + targets: + - expr: 'kube_deployment_status_replicas_available{deployment="ro"}' + format: time_series + instant: true + legendFormat: '' + refId: A + thresholds: '0,1' + timeFrom: null + timeShift: null + title: ro + type: singlestat + valueFontSize: 100% + valueMaps: + - op: '=' + text: '0' + value: 'null' + valueName: current + - cacheTimeout: null + colorBackground: false + colorValue: false + colors: + - '#d44a3a' + - 'rgba(237, 129, 40, 0.89)' + - '#299c46' + datasource: Prometheus + decimals: null + format: none + gauge: + maxValue: 1 + minValue: 0 + show: true + thresholdLabels: false + thresholdMarkers: false + gridPos: + h: 4 + w: 3 + x: 16 + 'y': 10 + id: 73 + interval: null + links: [] + mappingType: 1 + mappingTypes: + - name: value to text + value: 1 + - name: range to text + value: 2 + maxDataPoints: 100 + nullPointMode: connected + nullText: null + options: {} + postfix: '' + postfixFontSize: 50% + prefix: '' + prefixFontSize: 50% + rangeMaps: + - from: 'null' + text: N/A + to: 'null' + sparkline: + fillColor: 'rgba(31, 118, 189, 0.18)' + full: false + lineColor: 'rgb(31, 120, 193)' + show: false + ymax: null + ymin: null + tableColumn: '' + targets: + - expr: >- + kube_statefulset_status_replicas_ready{namespace="osm", + statefulset="zookeeper"} + format: time_series + refId: A + thresholds: '0,1' + timeFrom: null + timeShift: null + title: zookeeper + type: singlestat + valueFontSize: 100% + valueMaps: + - op: '=' + text: '0' + value: 'null' + valueName: current + - cacheTimeout: null + colorBackground: false + colorValue: false + colors: + - '#d44a3a' + - 'rgba(237, 129, 40, 0.89)' + - '#299c46' + datasource: Prometheus + decimals: null + format: none + gauge: + maxValue: 1 + minValue: 0 + show: true + thresholdLabels: false + thresholdMarkers: false + gridPos: + h: 4 + w: 3 + x: 20 + 'y': 10 + id: 78 + interval: null + links: [] + mappingType: 1 + mappingTypes: + - name: value to text + value: 1 + - name: range to text + value: 2 + maxDataPoints: 100 + nullPointMode: connected + nullText: null + options: {} + postfix: '' + postfixFontSize: 50% + prefix: '' + prefixFontSize: 50% + rangeMaps: + - from: 'null' + text: N/A + to: 'null' + sparkline: + fillColor: 'rgba(31, 118, 189, 0.18)' + full: false + lineColor: 'rgb(31, 120, 193)' + show: false + ymax: null + ymin: null + tableColumn: '' + targets: + - expr: >- + kube_statefulset_status_replicas_ready{namespace="osm", + statefulset="kafka"} + format: time_series + refId: A + thresholds: '0,1' + timeFrom: null + timeShift: null + title: kafka + type: singlestat + valueFontSize: 100% + valueMaps: + - op: '=' + text: '0' + value: 'null' + valueName: current + - cacheTimeout: null + colorBackground: false + colorValue: false + colors: + - '#d44a3a' + - 'rgba(237, 129, 40, 0.89)' + - '#299c46' + datasource: Prometheus + format: none + gauge: + maxValue: 1 + minValue: 0 + show: true + thresholdLabels: false + thresholdMarkers: false + gridPos: + h: 4 + w: 3 + x: 0 + 'y': 14 + id: 76 + interval: null + links: [] + mappingType: 1 + mappingTypes: + - name: value to text + value: 1 + - name: range to text + value: 2 + maxDataPoints: 100 + nullPointMode: connected + nullText: null + options: {} + pluginVersion: 6.3.5 + postfix: '' + postfixFontSize: 50% + prefix: '' + prefixFontSize: 50% + rangeMaps: + - from: 'null' + text: N/A + to: 'null' + sparkline: + fillColor: 'rgba(31, 118, 189, 0.18)' + full: false + lineColor: 'rgb(31, 120, 193)' + show: false + ymax: null + ymin: null + tableColumn: Value + targets: + - expr: 'kube_deployment_status_replicas_available{deployment="lcm"}' + format: time_series + instant: true + legendFormat: '' + refId: A + thresholds: '0,1' + timeFrom: null + timeShift: null + title: lcm + type: singlestat + valueFontSize: 100% + valueMaps: + - op: '=' + text: '0' + value: 'null' + valueName: current + - cacheTimeout: null + colorBackground: false + colorValue: false + colors: + - '#d44a3a' + - 'rgba(237, 129, 40, 0.89)' + - '#299c46' + datasource: Prometheus + format: none + gauge: + maxValue: 1 + minValue: 0 + show: true + thresholdLabels: false + thresholdMarkers: false + gridPos: + h: 4 + w: 3 + x: 4 + 'y': 14 + id: 79 + interval: null + links: [] + mappingType: 1 + mappingTypes: + - name: value to text + value: 1 + - name: range to text + value: 2 + maxDataPoints: 100 + nullPointMode: connected + nullText: null + options: {} + pluginVersion: 6.3.5 + postfix: '' + postfixFontSize: 50% + prefix: '' + prefixFontSize: 50% + rangeMaps: + - from: 'null' + text: N/A + to: 'null' + sparkline: + fillColor: 'rgba(31, 118, 189, 0.18)' + full: false + lineColor: 'rgb(31, 120, 193)' + show: false + ymax: null + ymin: null + tableColumn: '' + targets: + - expr: 'kube_deployment_status_replicas_available{deployment="ng-ui"}' + instant: true + refId: A + thresholds: '0,1' + timeFrom: null + timeShift: null + title: light-ui + type: singlestat + valueFontSize: 100% + valueMaps: + - op: '=' + text: '0' + value: 'null' + valueName: avg + - cacheTimeout: null + colorBackground: false + colorValue: false + colors: + - '#d44a3a' + - 'rgba(237, 129, 40, 0.89)' + - '#299c46' + datasource: Prometheus + description: '' + format: none + gauge: + maxValue: 1 + minValue: 0 + show: true + thresholdLabels: false + thresholdMarkers: false + gridPos: + h: 4 + w: 3 + x: 8 + 'y': 14 + id: 75 + interval: null + links: [] + mappingType: 1 + mappingTypes: + - name: value to text + value: 1 + - name: range to text + value: 2 + maxDataPoints: 100 + nullPointMode: connected + nullText: null + options: {} + pluginVersion: 6.3.5 + postfix: '' + postfixFontSize: 50% + prefix: '' + prefixFontSize: 50% + rangeMaps: + - from: 'null' + text: N/A + to: 'null' + sparkline: + fillColor: 'rgba(31, 118, 189, 0.18)' + full: false + lineColor: 'rgb(31, 120, 193)' + show: false + ymax: null + ymin: null + tableColumn: Value + targets: + - expr: 'kube_deployment_status_replicas_available{deployment="nbi"}' + format: time_series + instant: true + legendFormat: '' + refId: A + thresholds: '0,1' + timeFrom: null + timeShift: null + title: nbi + type: singlestat + valueFontSize: 100% + valueMaps: + - op: '=' + text: '0' + value: 'null' + valueName: current + - cacheTimeout: null + colorBackground: false + colorValue: false + colors: + - '#d44a3a' + - 'rgba(237, 129, 40, 0.89)' + - '#299c46' + datasource: Prometheus + format: none + gauge: + maxValue: 1 + minValue: 0 + show: true + thresholdLabels: false + thresholdMarkers: false + gridPos: + h: 4 + w: 3 + x: 12 + 'y': 14 + id: 67 + interval: null + links: [] + mappingType: 1 + mappingTypes: + - name: value to text + value: 1 + - name: range to text + value: 2 + maxDataPoints: 100 + nullPointMode: connected + nullText: null + options: {} + pluginVersion: 6.3.5 + postfix: '' + postfixFontSize: 50% + prefix: '' + prefixFontSize: 50% + rangeMaps: + - from: 'null' + text: N/A + to: 'null' + sparkline: + fillColor: 'rgba(31, 118, 189, 0.18)' + full: false + lineColor: 'rgb(31, 120, 193)' + show: false + ymax: null + ymin: null + tableColumn: Value + targets: + - expr: 'kube_deployment_status_replicas_available{deployment="pol"}' + format: time_series + instant: true + legendFormat: '' + refId: A + thresholds: '0,1' + timeFrom: null + timeShift: null + title: pol + type: singlestat + valueFontSize: 100% + valueMaps: + - op: '=' + text: '0' + value: 'null' + valueName: current + - cacheTimeout: null + colorBackground: false + colorValue: false + colors: + - '#d44a3a' + - 'rgba(237, 129, 40, 0.89)' + - '#299c46' + datasource: Prometheus + format: none + gauge: + maxValue: 1 + minValue: 0 + show: true + thresholdLabels: false + thresholdMarkers: false + gridPos: + h: 4 + w: 3 + x: 16 + 'y': 14 + id: 69 + interval: null + links: [] + mappingType: 1 + mappingTypes: + - name: value to text + value: 1 + - name: range to text + value: 2 + maxDataPoints: 100 + nullPointMode: connected + nullText: null + options: {} + pluginVersion: 6.3.5 + postfix: '' + postfixFontSize: 50% + prefix: '' + prefixFontSize: 50% + rangeMaps: + - from: 'null' + text: N/A + to: 'null' + sparkline: + fillColor: 'rgba(31, 118, 189, 0.18)' + full: false + lineColor: 'rgb(31, 120, 193)' + show: false + ymax: null + ymin: null + tableColumn: '' + targets: + - expr: 'kube_deployment_status_replicas_available{deployment="mon"}' + instant: true + refId: A + thresholds: '0,1' + timeFrom: null + timeShift: null + title: mon + type: singlestat + valueFontSize: 100% + valueMaps: + - op: '=' + text: '0' + value: 'null' + valueName: avg + - cacheTimeout: null + colorBackground: false + colorValue: false + colors: + - '#d44a3a' + - 'rgba(237, 129, 40, 0.89)' + - '#299c46' + datasource: Prometheus + format: none + gauge: + maxValue: 1 + minValue: 0 + show: true + thresholdLabels: false + thresholdMarkers: false + gridPos: + h: 4 + w: 3 + x: 20 + 'y': 14 + id: 81 + interval: null + links: [] + mappingType: 1 + mappingTypes: + - name: value to text + value: 1 + - name: range to text + value: 2 + maxDataPoints: 100 + nullPointMode: connected + nullText: null + options: {} + pluginVersion: 6.3.5 + postfix: '' + postfixFontSize: 50% + prefix: '' + prefixFontSize: 50% + rangeMaps: + - from: 'null' + text: N/A + to: 'null' + sparkline: + fillColor: 'rgba(31, 118, 189, 0.18)' + full: false + lineColor: 'rgb(31, 120, 193)' + show: false + ymax: null + ymin: null + tableColumn: Value + targets: + - expr: 'kube_deployment_status_replicas_available{deployment="keystone"}' + format: time_series + instant: true + legendFormat: '' + refId: A + thresholds: '0,1' + timeFrom: null + timeShift: null + title: keystone + type: singlestat + valueFontSize: 100% + valueMaps: + - op: '=' + text: '0' + value: 'null' + valueName: current + - datasource: Prometheus + aliasColors: {} + bars: false + dashLength: 10 + dashes: false + fill: 6 + fillGradient: 0 + gridPos: + h: 9 + w: 23 + x: 0 + 'y': 18 + id: 84 + legend: + avg: false + current: false + max: false + min: false + show: true + total: false + values: false + lines: true + linewidth: 1 + nullPointMode: 'null' + options: + dataLinks: [] + percentage: false + pointradius: 2 + points: false + renderer: flot + seriesOverrides: [] + spaceLength: 10 + stack: true + steppedLine: false + targets: + - expr: >- + sum(namespace_pod_container:container_cpu_usage_seconds_total:sum_rate{namespace="osm"}) + by (pod) + instant: false + intervalFactor: 4 + legendFormat: '{{pod}}' + refId: A + thresholds: [] + timeFrom: null + timeRegions: [] + timeShift: null + title: Pod CPU Usage + tooltip: + shared: true + sort: 0 + value_type: individual + type: graph + xaxis: + buckets: null + mode: time + name: null + show: true + values: [] + yaxes: + - format: short + label: null + logBase: 1 + max: null + min: null + show: true + - format: short + label: null + logBase: 1 + max: null + min: null + show: true + yaxis: + align: false + alignLevel: null + - datasource: Prometheus + aliasColors: {} + bars: false + dashLength: 10 + dashes: false + fill: 6 + fillGradient: 0 + gridPos: + h: 9 + w: 23 + x: 0 + 'y': 27 + id: 85 + legend: + avg: false + current: false + max: false + min: false + show: true + total: false + values: false + lines: true + linewidth: 1 + nullPointMode: 'null' + options: + dataLinks: [] + percentage: false + pointradius: 2 + points: false + renderer: flot + seriesOverrides: [] + spaceLength: 10 + stack: true + steppedLine: false + targets: + - expr: >- + sum(container_memory_working_set_bytes{namespace="osm", + container!=""}) by (pod) + intervalFactor: 4 + legendFormat: '{{pod}}' + refId: A + thresholds: [] + timeFrom: null + timeRegions: [] + timeShift: null + title: Pod Memory Usage + tooltip: + shared: true + sort: 0 + value_type: individual + type: graph + xaxis: + buckets: null + mode: time + name: null + show: true + values: [] + yaxes: + - format: short + label: null + logBase: 1 + max: null + min: null + show: true + - format: short + label: null + logBase: 1 + max: null + min: null + show: true + yaxis: + align: false + alignLevel: null + - cacheTimeout: null + content: |+ + '' + '' + '' + gridPos: + h: 4 + w: 3 + x: 21 + 'y': 36 + id: 82 + links: [] + mode: markdown + options: {} + pluginVersion: 6.3.5 + targets: + - expr: '' + instant: true + refId: A + timeFrom: null + timeShift: null + title: '' + transparent: true + type: text + - cacheTimeout: null + content: |+ + '

' + '' + '' + gridPos: + h: 4 + w: 3 + x: 19 + 'y': 40 + id: 80 + links: [] + mode: html + options: {} + pluginVersion: 6.3.5 + targets: + - expr: '' + instant: true + refId: A + timeFrom: null + timeShift: null + title: '' + transparent: true + type: text +refresh: 30s +schemaVersion: 19 +style: dark +tags: [] +templating: + list: + - current: + text: No data sources found + value: '' + hide: 2 + includeAll: false + label: '' + multi: false + name: datasource + options: [] + query: prometheus + refresh: 1 + regex: /$ds/ + skipUrlSync: false + type: datasource +time: + from: now-15m + 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: browser +title: OSM Status Summary +uid: 4XuPd2Ii1 +version: 2 diff --git a/installers/charm/grafana/src/pod_spec.py b/installers/charm/grafana/src/pod_spec.py index 9915a9e4..8d525f3a 100644 --- a/installers/charm/grafana/src/pod_spec.py +++ b/installers/charm/grafana/src/pod_spec.py @@ -24,6 +24,8 @@ import logging from ipaddress import ip_network from typing import Any, Dict, List from urllib.parse import urlparse +from pathlib import Path +from string import Template logger = logging.getLogger(__name__) @@ -224,55 +226,79 @@ def _make_pod_ingress_resources( return [ingress] -def _make_pod_files(relation: Dict[str, Any]) -> List[Dict[str, Any]]: +def _make_pod_files( + config: Dict[str, Any], relation: Dict[str, Any] +) -> List[Dict[str, Any]]: """Generating ConfigMap information Args: + config (Dict[str, Any]): configuration information. relation (Dict[str, Any]): relation information. Returns: List[Dict[str, Any]]: ConfigMap information. """ + template_data = {**config, **relation} + dashboards = [] + + if config.get("osm_dashboards", False): + dashboards.extend( + [ + { + "path": "kafka_exporter_dashboard.yaml", + "content": Template( + Path("files/kafka_exporter_dashboard.yaml").read_text() + ), + }, + { + "path": "mongodb_exporter_dashboard.yaml", + "content": Template( + Path("files/mongodb_exporter_dashboard.yaml").read_text() + ), + }, + { + "path": "mysql_exporter_dashboard.yaml", + "content": Template( + Path("files/mysql_exporter_dashboard.yaml").read_text() + ), + }, + { + "path": "nodes_exporter_dashboard.yaml", + "content": Template( + Path("files/nodes_exporter_dashboard.yaml").read_text() + ), + }, + { + "path": "summary_dashboard.yaml", + "content": Template( + Path("files/summary_dashboard.yaml").read_text() + ), + }, + ] + ) + + dashboards.append( + { + "path": "dashboard_osm.yaml", + "content": Template(Path("files/default_dashboards.yaml").read_text()), + } + ) + files = [ { "name": "dashboards", "mountPath": "/etc/grafana/provisioning/dashboards/", - "files": [ - { - "path": "dashboard-osm.yml", - "content": ( - "apiVersion: 1\n" - "providers:\n" - " - name: 'osm'\n" - " orgId: 1\n" - " folder: ''\n" - " type: file\n" - " options:\n" - " path: /etc/grafana/provisioning/dashboards/\n" - ), - } - ], + "files": dashboards, }, { "name": "datasources", "mountPath": "/etc/grafana/provisioning/datasources/", "files": [ { - "path": "datasource-prometheus.yml", - "content": ( - "datasources:\n" - " - access: proxy\n" - " editable: true\n" - " is_default: true\n" - " name: osm_prometheus\n" - " orgId: 1\n" - " type: prometheus\n" - " version: 1\n" - " url: http://{}:{}\n".format( - relation.get("prometheus_host"), - relation.get("prometheus_port"), - ) - ), + "path": "datasource_prometheus.yaml", + "content": Template( + Path("files/default_dashboards.yaml").read_text() + ).substitute(template_data), } ], }, -- 2.25.1