]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
monitoring: add SMB overview grafana dashboard
authorPedro Gonzalez Gomez <pegonzal@redhat.com>
Mon, 10 Mar 2025 21:09:08 +0000 (22:09 +0100)
committerAashish Sharma <Aashish.Sharma1@ibm.com>
Wed, 19 Mar 2025 06:25:59 +0000 (11:55 +0530)
Fixes: https://tracker.ceph.com/issues/70423
Signed-off-by: Pedro Gonzalez Gomez <pegonzal@redhat.com>
monitoring/ceph-mixin/dashboards.libsonnet
monitoring/ceph-mixin/dashboards/smb-overview.libsonnet [new file with mode: 0644]
monitoring/ceph-mixin/dashboards_out/smb-overview.json [new file with mode: 0644]
src/pybind/mgr/dashboard/frontend/src/app/ceph/smb/smb-overview/smb-overview.component.html [new file with mode: 0644]
src/pybind/mgr/dashboard/frontend/src/app/ceph/smb/smb-overview/smb-overview.component.scss [new file with mode: 0644]
src/pybind/mgr/dashboard/frontend/src/app/ceph/smb/smb-overview/smb-overview.component.spec.ts [new file with mode: 0644]
src/pybind/mgr/dashboard/frontend/src/app/ceph/smb/smb-overview/smb-overview.component.ts [new file with mode: 0644]
src/pybind/mgr/dashboard/frontend/src/app/ceph/smb/smb-tabs/smb-tabs.component.html
src/pybind/mgr/dashboard/frontend/src/app/ceph/smb/smb-tabs/smb-tabs.component.spec.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/smb/smb-tabs/smb-tabs.component.ts
src/pybind/mgr/dashboard/frontend/src/app/ceph/smb/smb.module.ts

index 82e1888e036d9c1fe36285982bab49274d57c27c..ff36be46491467396dd3939a0931f39c682ba15c 100644 (file)
@@ -9,5 +9,6 @@
     (import 'dashboards/ceph-cluster.libsonnet') +
     (import 'dashboards/rgw-s3-analytics.libsonnet') +
     (import 'dashboards/multi-cluster.libsonnet') +
+    (import 'dashboards/smb-overview.libsonnet') +
     { _config:: $._config },
 }
diff --git a/monitoring/ceph-mixin/dashboards/smb-overview.libsonnet b/monitoring/ceph-mixin/dashboards/smb-overview.libsonnet
new file mode 100644 (file)
index 0000000..8d16332
--- /dev/null
@@ -0,0 +1,403 @@
+local g = import 'grafonnet/grafana.libsonnet';
+
+(import 'utils.libsonnet') {
+  'smb-overview.json':
+    $.dashboardSchema(
+      'SMB Overview',
+      'SMB Overview dashboard shows data across all clusters and hosts associated with the SMB service.',
+      'feem6ehrmi2o0b',
+      'now-6h',
+      '30s',
+      22,
+      $._config.dashboardTags,
+      ''
+    )
+    .addAnnotation(
+      $.addAnnotationSchema(
+        1,
+        '-- Grafana --',
+        true,
+        true,
+        'rgba(0, 211, 255, 1)',
+        'Annotations & Alerts',
+        'dashboard'
+      )
+    )
+    .addTemplate(
+      g.template.datasource('datasource', 'prometheus', 'default', label='Data Source')
+    )
+    .addTemplate(
+      $.addTemplateSchema('Cluster',
+                          '$datasource',
+                          'label_values(ceph_health_status, cluster)',
+                          2,
+                          false,
+                          0,
+                          null,
+                          '')
+    )
+    .addTemplate(
+      $.addTemplateSchema(
+        'SMBcluster',
+        '$datasource',
+        'label_values(smb_metrics_status,netbiosname)',
+        1,
+        true,
+        1,
+        'SMB Cluster',
+        null,
+      )
+    )
+    .addTemplate(
+      $.addTemplateSchema(
+        'hostname',
+        '$datasource',
+        'label_values(smb_metrics_status{netbiosname=~"$SMBcluster"},instance)',
+        1,
+        true,
+        1,
+        'Hostname',
+        null,
+        current='All'
+      )
+    )
+    .addPanels([
+      $.addStatPanel(
+        title='Prometheus SMB metrics status',
+        description='SMB metrics daemon health.',
+        datasource='${datasource}',
+        unit='short',
+        gridPosition={ x: 0, y: 0, w: 8, h: 8 },
+        graphMode='none',
+        colorMode='background',
+        orientation='auto',
+        justifyMode='auto',
+        thresholdsMode='absolute',
+        pluginVersion='9.4.7',
+      )
+      .addMappings([
+        {
+          options: {
+            '0': { text: 'Down', color: 'red' },
+            '1': { text: 'Up', color: 'green' },
+          },
+          type: 'value',
+        },
+      ]).
+        addThresholds([
+        { color: 'green', value: null },
+        { color: 'red', value: 80 },
+      ])
+      .addTargets([
+        $.addTargetSchema(
+          expr='sum(smb_metrics_status{instance=~"$hostname"})  by (instance)',
+          datasource='${datasource}',
+          instant=false,
+          legendFormat='__auto',
+          range=true
+        ),
+      ]),
+      $.addStatPanel(
+        title='Nodes per Cluster',
+        description='Number of nodes per cluster',
+        datasource='${datasource}',
+        unit='none',
+        gridPosition={ x: 8, y: 0, w: 8, h: 4 },
+        graphMode='none',
+        colorMode='none',
+        orientation='auto',
+        justifyMode='auto',
+        thresholdsMode='absolute',
+        pluginVersion='9.4.7',
+      ).
+        addThresholds([
+        { color: 'green', value: null },
+        { color: 'red', value: 80 },
+      ])
+      .addTargets([
+        $.addTargetSchema(
+          expr='count by (netbiosname) (smb_sessions_total * on (instance) group_left (netbiosname) smb_metrics_status{netbiosname=~"$SMBcluster"})',
+          datasource='${datasource}',
+          instant=false,
+          legendFormat='__auto',
+          range=true
+        ),
+      ]),
+      $.addStatPanel(
+        title='Active sessions per Cluster',
+        description='Number of users currently logged in Cluster',
+        datasource='${datasource}',
+        unit='none',
+        gridPosition={ x: 16, y: 0, w: 8, h: 4 },
+        graphMode='none',
+        colorMode='none',
+        orientation='auto',
+        justifyMode='auto',
+        thresholdsMode='absolute',
+        pluginVersion='9.4.7',
+      ).
+        addThresholds([
+        { color: 'green', value: null },
+        { color: 'red', value: 80 },
+      ])
+      .addTargets([
+        $.addTargetSchema(
+          expr='sum by(netbiosname)(smb_sessions_total * on (instance) group_left (netbiosname) smb_metrics_status{netbiosname=~"$SMBcluster"}) / (count by ( netbiosname)(smb_sessions_total * on (instance) group_left (netbiosname) smb_metrics_status{netbiosname=~"$SMBcluster"}))',
+          datasource='${datasource}',
+          exemplar=false,
+          instant=false,
+          legendFormat='__auto',
+          range=true
+        ),
+      ]),
+      $.addStatPanel(
+        title='Shares activity per Cluster',
+        description='Number of remote machines using a share in cluster',
+        datasource='${datasource}',
+        gridPosition={ x: 8, y: 4, w: 8, h: 4 },
+        graphMode='none',
+        colorMode='none',
+        orientation='auto',
+        justifyMode='auto',
+        thresholdsMode='absolute',
+        pluginVersion='9.4.7',
+      ).
+        addThresholds([
+        { color: 'green', value: null },
+        { color: 'red', value: 80 },
+      ])
+      .addTargets([
+        $.addTargetSchema(
+          expr='sum by(netbiosname)(smb_share_activity * on (instance) group_left (netbiosname) smb_metrics_status{netbiosname=~"$SMBcluster"}) / (count by ( netbiosname)(smb_share_activity * on (instance) group_left (netbiosname) smb_metrics_status{netbiosname=~"$SMBcluster"}))',
+          datasource='${datasource}',
+          exemplar=false,
+          instant=false,
+          legendFormat='__auto',
+          range=true
+        ),
+      ]),
+      $.addStatPanel(
+        title='Active users per Cluster',
+        description='Number of currently active SMB user per cluster',
+        datasource='${datasource}',
+        gridPosition={ x: 16, y: 4, w: 8, h: 4 },
+        graphMode='none',
+        colorMode='none',
+        orientation='auto',
+        justifyMode='auto',
+        thresholdsMode='absolute',
+        pluginVersion='9.4.7',
+      ).
+        addThresholds([
+        { color: 'green', value: null },
+        { color: 'red', value: 80 },
+      ])
+      .addTargets([
+        $.addTargetSchema(
+          expr='sum by(netbiosname)(smb_users_total * on (instance) group_left (netbiosname) smb_metrics_status{netbiosname=~"$SMBcluster"}) / (count by ( netbiosname)(smb_users_total * on (instance) group_left (netbiosname) smb_metrics_status{netbiosname=~"$SMBcluster"}))',
+          datasource='${datasource}',
+          exemplar=false,
+          instant=false,
+          legendFormat='__auto',
+          range=true
+        ),
+      ]),
+      $.addStatPanel(
+        title='Ingress throughtput',
+        description='Current total ingress throughput, bytes going in per second',
+        datasource='${datasource}',
+        unit='decbytes',
+        gridPosition={ x: 0, y: 8, w: 6, h: 5 },
+        graphMode='none',
+        colorMode='none',
+        orientation='auto',
+        justifyMode='auto',
+        thresholdsMode='absolute',
+        pluginVersion='9.4.7',
+      ).
+        addThresholds([
+        { color: 'green', value: null },
+        { color: 'red', value: 80 },
+      ])
+      .addTargets([
+        $.addTargetSchema(
+          expr='sum(rate(smb_smb2_request_inbytes{instance=~"$hostname"}[$__rate_interval]))',
+          datasource='${datasource}',
+          exemplar=false,
+          instant=false,
+          legendFormat='__auto',
+          range=true
+        ),
+      ]),
+      $.addStatPanel(
+        title='Latency',
+        description='Current total request time for the sum of all runing operations',
+        datasource='${datasource}',
+        unit='µs',
+        gridPosition={ x: 6, y: 8, w: 6, h: 5 },
+        graphMode='none',
+        colorMode='none',
+        orientation='auto',
+        justifyMode='auto',
+        thresholdsMode='absolute',
+        pluginVersion='9.4.7',
+      ).
+        addThresholds([
+        { color: 'green', value: null },
+        { color: 'red', value: 80 },
+      ])
+      .addTargets([
+        $.addTargetSchema(
+          expr='sum(rate(smb_smb2_request_duration_microseconds_sum{instance=~"$hostname"}[$__rate_interval]))',
+          datasource='${datasource}',
+          exemplar=false,
+          instant=false,
+          legendFormat='__auto',
+          range=true
+        ),
+      ]),
+      $.addStatPanel(
+        title='Egress throughtput',
+        description='Current total egress throughput, bytes going out per second',
+        datasource='${datasource}',
+        unit='decbytes',
+        gridPosition={ x: 12, y: 8, w: 6, h: 5 },
+        graphMode='none',
+        colorMode='none',
+        orientation='auto',
+        justifyMode='auto',
+        thresholdsMode='absolute',
+        pluginVersion='9.4.7',
+      ).
+        addThresholds([
+        { color: 'green', value: null },
+        { color: 'red', value: 80 },
+      ])
+      .addTargets([
+        $.addTargetSchema(
+          expr='sum(rate(smb_smb2_request_outbytes{instance=~"$hostname"}[$__rate_interval]))',
+          datasource='${datasource}',
+          exemplar=false,
+          instant=false,
+          legendFormat='__auto',
+          range=true
+        ),
+      ]),
+
+      $.addStatPanel(
+        title='I/O',
+        description='Current total number of operations per second',
+        datasource='${datasource}',
+        unit='short',
+        gridPosition={ x: 18, y: 8, w: 6, h: 5 },
+        graphMode='none',
+        colorMode='none',
+        orientation='auto',
+        justifyMode='auto',
+        thresholdsMode='absolute',
+        pluginVersion='9.4.7',
+      ).
+        addThresholds([
+        { color: 'green', value: null },
+        { color: 'red', value: 80 },
+      ])
+      .addTargets([
+        $.addTargetSchema(
+          expr='sum(rate(smb_smb2_request_outbytes{instance=~"$hostname"}[$__rate_interval]))',
+          datasource='${datasource}',
+          exemplar=false,
+          instant=false,
+          legendFormat='__auto',
+          range=true
+        ),
+      ]),
+      $.timeSeriesPanel(
+        title='Throughput',
+        datasource='${datasource}',
+        gridPosition={ x: 0, y: 13, w: 12, h: 9 },
+        lineWidth=1,
+        fillOpacity=8,
+        pointSize=5,
+        showPoints='auto',
+        unit='decbytes',
+        displayMode='table',
+        placement='right',
+        tooltip={ mode: 'single', sort: 'none' },
+        stackingMode='none',
+        decimals=2,
+        sortBy='Last *',
+        sortDesc=true
+      )
+      .addCalcs(['lastNotNull'])
+      .addTargets([
+        $.addTargetSchema(
+          expr='rate(smb_smb2_request_inbytes{instance=~"$hostname"}[$__rate_interval])',
+          datasource='${datasource}',
+          instant=false,
+          legendFormat='Inbytes.{{instance}}.{{operation}}',
+          range=true,
+        ),
+        $.addTargetSchema(
+          expr='rate(smb_smb2_request_outbytes{instance=~"$hostname"}[$__rate_interval])',
+          datasource='${datasource}',
+          instant=false,
+          legendFormat='Outbytes.{{instance}}.{{operation}}',
+          range=true,
+          hide=false
+        ),
+      ]),
+      $.timeSeriesPanel(
+        title='I/O',
+        datasource='${datasource}',
+        gridPosition={ x: 12, y: 13, w: 12, h: 9 },
+        lineWidth=1,
+        fillOpacity=8,
+        pointSize=5,
+        showPoints='auto',
+        displayMode='table',
+        placement='right',
+        tooltip={ mode: 'single', sort: 'none' },
+        stackingMode='none',
+        decimals=2,
+        sortBy='Last *',
+        sortDesc=true
+      )
+      .addCalcs(['lastNotNull'])
+      .addTargets([
+        $.addTargetSchema(
+          expr='rate(smb_smb2_request_total{instance=~"$hostname"}[$__rate_interval])',
+          datasource='${datasource}',
+          instant=false,
+          legendFormat='{{instance}}.{{operation}}',
+          range=true,
+        ),
+      ]),
+      $.timeSeriesPanel(
+        title='Latencies',
+        datasource='${datasource}',
+        gridPosition={ x: 0, y: 22, w: 12, h: 9 },
+        lineWidth=1,
+        fillOpacity=8,
+        pointSize=5,
+        showPoints='auto',
+        unit='µs',
+        displayMode='table',
+        placement='right',
+        tooltip={ mode: 'single', sort: 'none' },
+        stackingMode='none',
+        decimals=2,
+        sortBy='Last *',
+        sortDesc=true
+      )
+      .addCalcs(['lastNotNull'])
+      .addTargets([
+        $.addTargetSchema(
+          expr='rate(smb_smb2_request_duration_microseconds_sum{instance=~"$hostname"}[$__rate_interval])',
+          datasource='${datasource}',
+          instant=false,
+          legendFormat='{{instance}}.{{operation}}',
+          range=true,
+        ),
+      ]),
+    ]),
+}
diff --git a/monitoring/ceph-mixin/dashboards_out/smb-overview.json b/monitoring/ceph-mixin/dashboards_out/smb-overview.json
new file mode 100644 (file)
index 0000000..e6f31d6
--- /dev/null
@@ -0,0 +1,1013 @@
+{
+   "__inputs": [ ],
+   "__requires": [ ],
+   "annotations": {
+      "list": [
+         {
+            "builtIn": 1,
+            "datasource": "-- Grafana --",
+            "enable": true,
+            "hide": true,
+            "iconColor": "rgba(0, 211, 255, 1)",
+            "name": "Annotations & Alerts",
+            "showIn": 0,
+            "tags": [ ],
+            "type": "dashboard"
+         }
+      ]
+   },
+   "description": "SMB Overview dashboard shows data across all clusters and hosts associated with the SMB service.",
+   "editable": false,
+   "gnetId": null,
+   "graphTooltip": 0,
+   "hideControls": false,
+   "id": null,
+   "links": [ ],
+   "panels": [
+      {
+         "colors": null,
+         "datasource": "${datasource}",
+         "description": "SMB metrics daemon health.",
+         "fieldConfig": {
+            "defaults": {
+               "decimals": 0,
+               "links": [ ],
+               "mappings": [
+                  {
+                     "id": 0,
+                     "options": {
+                        "0": {
+                           "color": "red",
+                           "text": "Down"
+                        },
+                        "1": {
+                           "color": "green",
+                           "text": "Up"
+                        }
+                     },
+                     "type": "value"
+                  }
+               ],
+               "thresholds": {
+                  "mode": "absolute",
+                  "steps": [
+                     {
+                        "color": "green",
+                        "value": null
+                     },
+                     {
+                        "color": "red",
+                        "value": 80
+                     }
+                  ]
+               },
+               "unit": "short"
+            }
+         },
+         "gridPos": {
+            "h": 8,
+            "w": 8,
+            "x": 0,
+            "y": 0
+         },
+         "id": 2,
+         "links": [ ],
+         "options": {
+            "colorMode": "background",
+            "graphMode": "none",
+            "justifyMode": "auto",
+            "orientation": "auto",
+            "reduceOptions": {
+               "calcs": [
+                  "lastNotNull"
+               ],
+               "fields": "",
+               "values": false
+            },
+            "textMode": "auto"
+         },
+         "pluginVersion": "9.4.7",
+         "targets": [
+            {
+               "datasource": "${datasource}",
+               "expr": "sum(smb_metrics_status{instance=~\"$hostname\"})  by (instance)",
+               "format": "time_series",
+               "instant": false,
+               "intervalFactor": 1,
+               "legendFormat": "__auto",
+               "range": true,
+               "refId": "A"
+            }
+         ],
+         "title": "Prometheus SMB metrics status",
+         "transparent": false,
+         "type": "stat"
+      },
+      {
+         "colors": null,
+         "datasource": "${datasource}",
+         "description": "Number of nodes per cluster",
+         "fieldConfig": {
+            "defaults": {
+               "decimals": 0,
+               "links": [ ],
+               "mappings": [ ],
+               "thresholds": {
+                  "mode": "absolute",
+                  "steps": [
+                     {
+                        "color": "green",
+                        "value": null
+                     },
+                     {
+                        "color": "red",
+                        "value": 80
+                     }
+                  ]
+               },
+               "unit": "none"
+            }
+         },
+         "gridPos": {
+            "h": 4,
+            "w": 8,
+            "x": 8,
+            "y": 0
+         },
+         "id": 3,
+         "links": [ ],
+         "options": {
+            "colorMode": "none",
+            "graphMode": "none",
+            "justifyMode": "auto",
+            "orientation": "auto",
+            "reduceOptions": {
+               "calcs": [
+                  "lastNotNull"
+               ],
+               "fields": "",
+               "values": false
+            },
+            "textMode": "auto"
+         },
+         "pluginVersion": "9.4.7",
+         "targets": [
+            {
+               "datasource": "${datasource}",
+               "expr": "count by (netbiosname) (smb_sessions_total * on (instance) group_left (netbiosname) smb_metrics_status{netbiosname=~\"$SMBcluster\"})",
+               "format": "time_series",
+               "instant": false,
+               "intervalFactor": 1,
+               "legendFormat": "__auto",
+               "range": true,
+               "refId": "A"
+            }
+         ],
+         "title": "Nodes per Cluster",
+         "transparent": false,
+         "type": "stat"
+      },
+      {
+         "colors": null,
+         "datasource": "${datasource}",
+         "description": "Number of users currently logged in Cluster",
+         "fieldConfig": {
+            "defaults": {
+               "decimals": 0,
+               "links": [ ],
+               "mappings": [ ],
+               "thresholds": {
+                  "mode": "absolute",
+                  "steps": [
+                     {
+                        "color": "green",
+                        "value": null
+                     },
+                     {
+                        "color": "red",
+                        "value": 80
+                     }
+                  ]
+               },
+               "unit": "none"
+            }
+         },
+         "gridPos": {
+            "h": 4,
+            "w": 8,
+            "x": 16,
+            "y": 0
+         },
+         "id": 4,
+         "links": [ ],
+         "options": {
+            "colorMode": "none",
+            "graphMode": "none",
+            "justifyMode": "auto",
+            "orientation": "auto",
+            "reduceOptions": {
+               "calcs": [
+                  "lastNotNull"
+               ],
+               "fields": "",
+               "values": false
+            },
+            "textMode": "auto"
+         },
+         "pluginVersion": "9.4.7",
+         "targets": [
+            {
+               "datasource": "${datasource}",
+               "exemplar": false,
+               "expr": "sum by(netbiosname)(smb_sessions_total * on (instance) group_left (netbiosname) smb_metrics_status{netbiosname=~\"$SMBcluster\"}) / (count by ( netbiosname)(smb_sessions_total * on (instance) group_left (netbiosname) smb_metrics_status{netbiosname=~\"$SMBcluster\"}))",
+               "format": "time_series",
+               "instant": false,
+               "intervalFactor": 1,
+               "legendFormat": "__auto",
+               "range": true,
+               "refId": "A"
+            }
+         ],
+         "title": "Active sessions per Cluster",
+         "transparent": false,
+         "type": "stat"
+      },
+      {
+         "colors": null,
+         "datasource": "${datasource}",
+         "description": "Number of remote machines using a share in cluster",
+         "fieldConfig": {
+            "defaults": {
+               "decimals": 0,
+               "links": [ ],
+               "mappings": [ ],
+               "thresholds": {
+                  "mode": "absolute",
+                  "steps": [
+                     {
+                        "color": "green",
+                        "value": null
+                     },
+                     {
+                        "color": "red",
+                        "value": 80
+                     }
+                  ]
+               },
+               "unit": "none"
+            }
+         },
+         "gridPos": {
+            "h": 4,
+            "w": 8,
+            "x": 8,
+            "y": 4
+         },
+         "id": 5,
+         "links": [ ],
+         "options": {
+            "colorMode": "none",
+            "graphMode": "none",
+            "justifyMode": "auto",
+            "orientation": "auto",
+            "reduceOptions": {
+               "calcs": [
+                  "lastNotNull"
+               ],
+               "fields": "",
+               "values": false
+            },
+            "textMode": "auto"
+         },
+         "pluginVersion": "9.4.7",
+         "targets": [
+            {
+               "datasource": "${datasource}",
+               "exemplar": false,
+               "expr": "sum by(netbiosname)(smb_share_activity * on (instance) group_left (netbiosname) smb_metrics_status{netbiosname=~\"$SMBcluster\"}) / (count by ( netbiosname)(smb_share_activity * on (instance) group_left (netbiosname) smb_metrics_status{netbiosname=~\"$SMBcluster\"}))",
+               "format": "time_series",
+               "instant": false,
+               "intervalFactor": 1,
+               "legendFormat": "__auto",
+               "range": true,
+               "refId": "A"
+            }
+         ],
+         "title": "Shares activity per Cluster",
+         "transparent": false,
+         "type": "stat"
+      },
+      {
+         "colors": null,
+         "datasource": "${datasource}",
+         "description": "Number of currently active SMB user per cluster",
+         "fieldConfig": {
+            "defaults": {
+               "decimals": 0,
+               "links": [ ],
+               "mappings": [ ],
+               "thresholds": {
+                  "mode": "absolute",
+                  "steps": [
+                     {
+                        "color": "green",
+                        "value": null
+                     },
+                     {
+                        "color": "red",
+                        "value": 80
+                     }
+                  ]
+               },
+               "unit": "none"
+            }
+         },
+         "gridPos": {
+            "h": 4,
+            "w": 8,
+            "x": 16,
+            "y": 4
+         },
+         "id": 6,
+         "links": [ ],
+         "options": {
+            "colorMode": "none",
+            "graphMode": "none",
+            "justifyMode": "auto",
+            "orientation": "auto",
+            "reduceOptions": {
+               "calcs": [
+                  "lastNotNull"
+               ],
+               "fields": "",
+               "values": false
+            },
+            "textMode": "auto"
+         },
+         "pluginVersion": "9.4.7",
+         "targets": [
+            {
+               "datasource": "${datasource}",
+               "exemplar": false,
+               "expr": "sum by(netbiosname)(smb_users_total * on (instance) group_left (netbiosname) smb_metrics_status{netbiosname=~\"$SMBcluster\"}) / (count by ( netbiosname)(smb_users_total * on (instance) group_left (netbiosname) smb_metrics_status{netbiosname=~\"$SMBcluster\"}))",
+               "format": "time_series",
+               "instant": false,
+               "intervalFactor": 1,
+               "legendFormat": "__auto",
+               "range": true,
+               "refId": "A"
+            }
+         ],
+         "title": "Active users per Cluster",
+         "transparent": false,
+         "type": "stat"
+      },
+      {
+         "colors": null,
+         "datasource": "${datasource}",
+         "description": "Current total ingress throughput, bytes going in per second",
+         "fieldConfig": {
+            "defaults": {
+               "decimals": 0,
+               "links": [ ],
+               "mappings": [ ],
+               "thresholds": {
+                  "mode": "absolute",
+                  "steps": [
+                     {
+                        "color": "green",
+                        "value": null
+                     },
+                     {
+                        "color": "red",
+                        "value": 80
+                     }
+                  ]
+               },
+               "unit": "decbytes"
+            }
+         },
+         "gridPos": {
+            "h": 5,
+            "w": 6,
+            "x": 0,
+            "y": 8
+         },
+         "id": 7,
+         "links": [ ],
+         "options": {
+            "colorMode": "none",
+            "graphMode": "none",
+            "justifyMode": "auto",
+            "orientation": "auto",
+            "reduceOptions": {
+               "calcs": [
+                  "lastNotNull"
+               ],
+               "fields": "",
+               "values": false
+            },
+            "textMode": "auto"
+         },
+         "pluginVersion": "9.4.7",
+         "targets": [
+            {
+               "datasource": "${datasource}",
+               "exemplar": false,
+               "expr": "sum(rate(smb_smb2_request_inbytes{instance=~\"$hostname\"}[$__rate_interval]))",
+               "format": "time_series",
+               "instant": false,
+               "intervalFactor": 1,
+               "legendFormat": "__auto",
+               "range": true,
+               "refId": "A"
+            }
+         ],
+         "title": "Ingress throughtput",
+         "transparent": false,
+         "type": "stat"
+      },
+      {
+         "colors": null,
+         "datasource": "${datasource}",
+         "description": "Current total request time for the sum of all runing operations",
+         "fieldConfig": {
+            "defaults": {
+               "decimals": 0,
+               "links": [ ],
+               "mappings": [ ],
+               "thresholds": {
+                  "mode": "absolute",
+                  "steps": [
+                     {
+                        "color": "green",
+                        "value": null
+                     },
+                     {
+                        "color": "red",
+                        "value": 80
+                     }
+                  ]
+               },
+               "unit": "µs"
+            }
+         },
+         "gridPos": {
+            "h": 5,
+            "w": 6,
+            "x": 6,
+            "y": 8
+         },
+         "id": 8,
+         "links": [ ],
+         "options": {
+            "colorMode": "none",
+            "graphMode": "none",
+            "justifyMode": "auto",
+            "orientation": "auto",
+            "reduceOptions": {
+               "calcs": [
+                  "lastNotNull"
+               ],
+               "fields": "",
+               "values": false
+            },
+            "textMode": "auto"
+         },
+         "pluginVersion": "9.4.7",
+         "targets": [
+            {
+               "datasource": "${datasource}",
+               "exemplar": false,
+               "expr": "sum(rate(smb_smb2_request_duration_microseconds_sum{instance=~\"$hostname\"}[$__rate_interval]))",
+               "format": "time_series",
+               "instant": false,
+               "intervalFactor": 1,
+               "legendFormat": "__auto",
+               "range": true,
+               "refId": "A"
+            }
+         ],
+         "title": "Latency",
+         "transparent": false,
+         "type": "stat"
+      },
+      {
+         "colors": null,
+         "datasource": "${datasource}",
+         "description": "Current total egress throughput, bytes going out per second",
+         "fieldConfig": {
+            "defaults": {
+               "decimals": 0,
+               "links": [ ],
+               "mappings": [ ],
+               "thresholds": {
+                  "mode": "absolute",
+                  "steps": [
+                     {
+                        "color": "green",
+                        "value": null
+                     },
+                     {
+                        "color": "red",
+                        "value": 80
+                     }
+                  ]
+               },
+               "unit": "decbytes"
+            }
+         },
+         "gridPos": {
+            "h": 5,
+            "w": 6,
+            "x": 12,
+            "y": 8
+         },
+         "id": 9,
+         "links": [ ],
+         "options": {
+            "colorMode": "none",
+            "graphMode": "none",
+            "justifyMode": "auto",
+            "orientation": "auto",
+            "reduceOptions": {
+               "calcs": [
+                  "lastNotNull"
+               ],
+               "fields": "",
+               "values": false
+            },
+            "textMode": "auto"
+         },
+         "pluginVersion": "9.4.7",
+         "targets": [
+            {
+               "datasource": "${datasource}",
+               "exemplar": false,
+               "expr": "sum(rate(smb_smb2_request_outbytes{instance=~\"$hostname\"}[$__rate_interval]))",
+               "format": "time_series",
+               "instant": false,
+               "intervalFactor": 1,
+               "legendFormat": "__auto",
+               "range": true,
+               "refId": "A"
+            }
+         ],
+         "title": "Egress throughtput",
+         "transparent": false,
+         "type": "stat"
+      },
+      {
+         "colors": null,
+         "datasource": "${datasource}",
+         "description": "Current total number of operations per second",
+         "fieldConfig": {
+            "defaults": {
+               "decimals": 0,
+               "links": [ ],
+               "mappings": [ ],
+               "thresholds": {
+                  "mode": "absolute",
+                  "steps": [
+                     {
+                        "color": "green",
+                        "value": null
+                     },
+                     {
+                        "color": "red",
+                        "value": 80
+                     }
+                  ]
+               },
+               "unit": "short"
+            }
+         },
+         "gridPos": {
+            "h": 5,
+            "w": 6,
+            "x": 18,
+            "y": 8
+         },
+         "id": 10,
+         "links": [ ],
+         "options": {
+            "colorMode": "none",
+            "graphMode": "none",
+            "justifyMode": "auto",
+            "orientation": "auto",
+            "reduceOptions": {
+               "calcs": [
+                  "lastNotNull"
+               ],
+               "fields": "",
+               "values": false
+            },
+            "textMode": "auto"
+         },
+         "pluginVersion": "9.4.7",
+         "targets": [
+            {
+               "datasource": "${datasource}",
+               "exemplar": false,
+               "expr": "sum(rate(smb_smb2_request_outbytes{instance=~\"$hostname\"}[$__rate_interval]))",
+               "format": "time_series",
+               "instant": false,
+               "intervalFactor": 1,
+               "legendFormat": "__auto",
+               "range": true,
+               "refId": "A"
+            }
+         ],
+         "title": "I/O",
+         "transparent": false,
+         "type": "stat"
+      },
+      {
+         "datasource": "${datasource}",
+         "fieldConfig": {
+            "defaults": {
+               "color": {
+                  "mode": "palette-classic"
+               },
+               "custom": {
+                  "axisCenteredZero": false,
+                  "axisColorMode": "text",
+                  "axisLabel": "",
+                  "axisPlacement": "auto",
+                  "barAlignment": 0,
+                  "drawStyle": "line",
+                  "fillOpacity": 8,
+                  "gradientMode": "none",
+                  "hideFrom": {
+                     "legend": false,
+                     "tooltip": false,
+                     "viz": false
+                  },
+                  "lineInterpolation": "linear",
+                  "lineWidth": 1,
+                  "pointSize": 5,
+                  "scaleDistribution": {
+                     "type": "linear"
+                  },
+                  "showPoints": "auto",
+                  "spanNulls": false,
+                  "stacking": {
+                     "group": "A",
+                     "mode": "none"
+                  },
+                  "thresholdsStyle": {
+                     "mode": "off"
+                  }
+               },
+               "decimals": 2,
+               "thresholds": {
+                  "mode": "absolute",
+                  "steps": [ ]
+               },
+               "unit": "decbytes"
+            },
+            "overrides": [ ]
+         },
+         "gridPos": {
+            "h": 9,
+            "w": 12,
+            "x": 0,
+            "y": 13
+         },
+         "id": 11,
+         "options": {
+            "legend": {
+               "calcs": [
+                  "lastNotNull"
+               ],
+               "displayMode": "table",
+               "placement": "right",
+               "showLegend": true,
+               "sortBy": "Last *",
+               "sortDesc": true
+            },
+            "tooltip": {
+               "mode": "single",
+               "sort": "none"
+            }
+         },
+         "pluginVersion": "9.1.3",
+         "targets": [
+            {
+               "datasource": "${datasource}",
+               "expr": "rate(smb_smb2_request_inbytes{instance=~\"$hostname\"}[$__rate_interval])",
+               "format": "time_series",
+               "instant": false,
+               "intervalFactor": 1,
+               "legendFormat": "Inbytes.{{instance}}.{{operation}}",
+               "range": true,
+               "refId": "A"
+            },
+            {
+               "datasource": "${datasource}",
+               "expr": "rate(smb_smb2_request_outbytes{instance=~\"$hostname\"}[$__rate_interval])",
+               "format": "time_series",
+               "hide": false,
+               "instant": false,
+               "intervalFactor": 1,
+               "legendFormat": "Outbytes.{{instance}}.{{operation}}",
+               "range": true,
+               "refId": "B"
+            }
+         ],
+         "title": "Throughput",
+         "type": "timeseries"
+      },
+      {
+         "datasource": "${datasource}",
+         "fieldConfig": {
+            "defaults": {
+               "color": {
+                  "mode": "palette-classic"
+               },
+               "custom": {
+                  "axisCenteredZero": false,
+                  "axisColorMode": "text",
+                  "axisLabel": "",
+                  "axisPlacement": "auto",
+                  "barAlignment": 0,
+                  "drawStyle": "line",
+                  "fillOpacity": 8,
+                  "gradientMode": "none",
+                  "hideFrom": {
+                     "legend": false,
+                     "tooltip": false,
+                     "viz": false
+                  },
+                  "lineInterpolation": "linear",
+                  "lineWidth": 1,
+                  "pointSize": 5,
+                  "scaleDistribution": {
+                     "type": "linear"
+                  },
+                  "showPoints": "auto",
+                  "spanNulls": false,
+                  "stacking": {
+                     "group": "A",
+                     "mode": "none"
+                  },
+                  "thresholdsStyle": {
+                     "mode": "off"
+                  }
+               },
+               "decimals": 2,
+               "thresholds": {
+                  "mode": "absolute",
+                  "steps": [ ]
+               },
+               "unit": "none"
+            },
+            "overrides": [ ]
+         },
+         "gridPos": {
+            "h": 9,
+            "w": 12,
+            "x": 12,
+            "y": 13
+         },
+         "id": 12,
+         "options": {
+            "legend": {
+               "calcs": [
+                  "lastNotNull"
+               ],
+               "displayMode": "table",
+               "placement": "right",
+               "showLegend": true,
+               "sortBy": "Last *",
+               "sortDesc": true
+            },
+            "tooltip": {
+               "mode": "single",
+               "sort": "none"
+            }
+         },
+         "pluginVersion": "9.1.3",
+         "targets": [
+            {
+               "datasource": "${datasource}",
+               "expr": "rate(smb_smb2_request_total{instance=~\"$hostname\"}[$__rate_interval])",
+               "format": "time_series",
+               "instant": false,
+               "intervalFactor": 1,
+               "legendFormat": "{{instance}}.{{operation}}",
+               "range": true,
+               "refId": "A"
+            }
+         ],
+         "title": "I/O",
+         "type": "timeseries"
+      },
+      {
+         "datasource": "${datasource}",
+         "fieldConfig": {
+            "defaults": {
+               "color": {
+                  "mode": "palette-classic"
+               },
+               "custom": {
+                  "axisCenteredZero": false,
+                  "axisColorMode": "text",
+                  "axisLabel": "",
+                  "axisPlacement": "auto",
+                  "barAlignment": 0,
+                  "drawStyle": "line",
+                  "fillOpacity": 8,
+                  "gradientMode": "none",
+                  "hideFrom": {
+                     "legend": false,
+                     "tooltip": false,
+                     "viz": false
+                  },
+                  "lineInterpolation": "linear",
+                  "lineWidth": 1,
+                  "pointSize": 5,
+                  "scaleDistribution": {
+                     "type": "linear"
+                  },
+                  "showPoints": "auto",
+                  "spanNulls": false,
+                  "stacking": {
+                     "group": "A",
+                     "mode": "none"
+                  },
+                  "thresholdsStyle": {
+                     "mode": "off"
+                  }
+               },
+               "decimals": 2,
+               "thresholds": {
+                  "mode": "absolute",
+                  "steps": [ ]
+               },
+               "unit": "µs"
+            },
+            "overrides": [ ]
+         },
+         "gridPos": {
+            "h": 9,
+            "w": 12,
+            "x": 0,
+            "y": 22
+         },
+         "id": 13,
+         "options": {
+            "legend": {
+               "calcs": [
+                  "lastNotNull"
+               ],
+               "displayMode": "table",
+               "placement": "right",
+               "showLegend": true,
+               "sortBy": "Last *",
+               "sortDesc": true
+            },
+            "tooltip": {
+               "mode": "single",
+               "sort": "none"
+            }
+         },
+         "pluginVersion": "9.1.3",
+         "targets": [
+            {
+               "datasource": "${datasource}",
+               "expr": "rate(smb_smb2_request_duration_microseconds_sum{instance=~\"$hostname\"}[$__rate_interval])",
+               "format": "time_series",
+               "instant": false,
+               "intervalFactor": 1,
+               "legendFormat": "{{instance}}.{{operation}}",
+               "range": true,
+               "refId": "A"
+            }
+         ],
+         "title": "Latencies",
+         "type": "timeseries"
+      }
+   ],
+   "refresh": "30s",
+   "rows": [ ],
+   "schemaVersion": 22,
+   "style": "dark",
+   "tags": [
+      "ceph-mixin"
+   ],
+   "templating": {
+      "list": [
+         {
+            "current": {
+               "text": "default",
+               "value": "default"
+            },
+            "hide": 0,
+            "label": "Data Source",
+            "name": "datasource",
+            "options": [ ],
+            "query": "prometheus",
+            "refresh": 1,
+            "regex": "",
+            "type": "datasource"
+         },
+         {
+            "allValue": null,
+            "current": { },
+            "datasource": "$datasource",
+            "hide": 0,
+            "includeAll": false,
+            "label": null,
+            "multi": false,
+            "name": "Cluster",
+            "options": [ ],
+            "query": "label_values(ceph_health_status, cluster)",
+            "refresh": 2,
+            "regex": "",
+            "sort": 0,
+            "tagValuesQuery": "",
+            "tags": [ ],
+            "tagsQuery": "",
+            "type": "query",
+            "useTags": false
+         },
+         {
+            "allValue": null,
+            "current": { },
+            "datasource": "$datasource",
+            "hide": 0,
+            "includeAll": true,
+            "label": "SMB Cluster",
+            "multi": false,
+            "name": "SMBcluster",
+            "options": [ ],
+            "query": "label_values(smb_metrics_status,netbiosname)",
+            "refresh": 1,
+            "regex": null,
+            "sort": 1,
+            "tagValuesQuery": "",
+            "tags": [ ],
+            "tagsQuery": "",
+            "type": "query",
+            "useTags": false
+         },
+         {
+            "allValue": null,
+            "current": {
+               "text": "All",
+               "value": "All"
+            },
+            "datasource": "$datasource",
+            "hide": 0,
+            "includeAll": true,
+            "label": "Hostname",
+            "multi": false,
+            "name": "hostname",
+            "options": [ ],
+            "query": "label_values(smb_metrics_status{netbiosname=~\"$SMBcluster\"},instance)",
+            "refresh": 1,
+            "regex": null,
+            "sort": 1,
+            "tagValuesQuery": "",
+            "tags": [ ],
+            "tagsQuery": "",
+            "type": "query",
+            "useTags": false
+         }
+      ]
+   },
+   "time": {
+      "from": "now-6h",
+      "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": "SMB Overview",
+   "uid": "feem6ehrmi2o0b",
+   "version": 0
+}
diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/smb/smb-overview/smb-overview.component.html b/src/pybind/mgr/dashboard/frontend/src/app/ceph/smb/smb-overview/smb-overview.component.html
new file mode 100644 (file)
index 0000000..df5d766
--- /dev/null
@@ -0,0 +1,8 @@
+<cd-grafana
+  i18n-title
+  title="SMB overview"
+  [grafanaPath]="'smb-overview?'"
+  [type]="'metrics'"
+  uid="feem6ehrmi2o0b"
+  grafanaStyle="two">
+</cd-grafana>
diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/smb/smb-overview/smb-overview.component.scss b/src/pybind/mgr/dashboard/frontend/src/app/ceph/smb/smb-overview/smb-overview.component.scss
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/smb/smb-overview/smb-overview.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/smb/smb-overview/smb-overview.component.spec.ts
new file mode 100644 (file)
index 0000000..ec3d2a2
--- /dev/null
@@ -0,0 +1,27 @@
+import { ComponentFixture, TestBed } from '@angular/core/testing';
+
+import { SmbOverviewComponent } from './smb-overview.component';
+import { SharedModule } from '~/app/shared/shared.module';
+import { provideHttpClient } from '@angular/common/http';
+import { provideHttpClientTesting } from '@angular/common/http/testing';
+
+describe('SmbOverviewComponent', () => {
+  let component: SmbOverviewComponent;
+  let fixture: ComponentFixture<SmbOverviewComponent>;
+
+  beforeEach(async () => {
+    await TestBed.configureTestingModule({
+      imports: [SharedModule],
+      declarations: [SmbOverviewComponent],
+      providers: [provideHttpClient(), provideHttpClientTesting()]
+    }).compileComponents();
+
+    fixture = TestBed.createComponent(SmbOverviewComponent);
+    component = fixture.componentInstance;
+    fixture.detectChanges();
+  });
+
+  it('should create', () => {
+    expect(component).toBeTruthy();
+  });
+});
diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/smb/smb-overview/smb-overview.component.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/smb/smb-overview/smb-overview.component.ts
new file mode 100644 (file)
index 0000000..46249e1
--- /dev/null
@@ -0,0 +1,8 @@
+import { Component } from '@angular/core';
+
+@Component({
+  selector: 'cd-smb-overview',
+  templateUrl: './smb-overview.component.html',
+  styleUrl: './smb-overview.component.scss'
+})
+export class SmbOverviewComponent {}
index 0eab75f42f2c37832c06eb1c3b435c70118a4870..bce02b277d0b06dd3a8ade35439ec6586256a4e5 100644 (file)
     i18n-heading
     (selected)="onSelected(Tabs.usersgroups)">
   </cds-tab>
+  <cds-tab
+    heading="Overview"
+    [tabContent]="overview"
+    i18n-heading
+    (selected)="onSelected(Tabs.overview)">
+  </cds-tab>
 </cds-tabs>
 
 <ng-template #clusters>
@@ -64,3 +70,7 @@
 <ng-template #usersgroups>
   <cd-smb-users-list></cd-smb-users-list>
 </ng-template>
+
+<ng-template #overview>
+  <cd-smb-overview></cd-smb-overview>
+</ng-template>
index f5f41da37d0820ec6e1dc6e0fd3f883ce99dca7e..09c7b5550a18bef548fbcc2f11ef12859fb7e44c 100644 (file)
@@ -23,10 +23,11 @@ describe('SmbTabsComponent', () => {
 
   it('should display the heading text in the tab', () => {
     const tabs = fixture.debugElement.queryAll(By.css('cds-tab'));
-    expect(tabs.length).toBe(3);
+    expect(tabs.length).toBe(4);
     expect(tabs[0].attributes['heading']).toBe('Clusters');
     expect(tabs[1].attributes['heading']).toBe('Active Directory');
     expect(tabs[2].attributes['heading']).toBe('Standalone');
+    expect(tabs[3].attributes['heading']).toBe('Overview');
   });
 
   // If the tabs cacheActive is set to true data for all tabs will be fetched at once,
index 48a073e2f0d85eb5b4324432d5c23e30fd88ba12..3d7584007a40252bb2c9a3522b62064eb2041b7d 100644 (file)
@@ -3,7 +3,8 @@ import { Component } from '@angular/core';
 enum TABS {
   'clusters',
   'joinAuths',
-  'usersgroups'
+  'usersgroups',
+  'overview'
 }
 
 @Component({
index d2ff1c9727e063765b33c2d828e65867058f640e..957155ec18d1251d52b1f0b094ff00c5657aff28 100644 (file)
@@ -37,6 +37,7 @@ import { SmbJoinAuthListComponent } from './smb-join-auth-list/smb-join-auth-lis
 import { SmbUsersgroupsDetailsComponent } from './smb-usersgroups-details/smb-usersgroups-details.component';
 import { SmbJoinAuthFormComponent } from './smb-join-auth-form/smb-join-auth-form.component';
 import { SmbUsersgroupsFormComponent } from './smb-usersgroups-form/smb-usersgroups-form.component';
+import { SmbOverviewComponent } from './smb-overview/smb-overview.component';
 
 @NgModule({
   imports: [
@@ -79,7 +80,8 @@ import { SmbUsersgroupsFormComponent } from './smb-usersgroups-form/smb-usersgro
     SmbUsersgroupsDetailsComponent,
     SmbJoinAuthFormComponent,
     SmbUsersgroupsFormComponent,
-    SmbShareFormComponent
+    SmbShareFormComponent,
+    SmbOverviewComponent
   ]
 })
 export class SmbModule {