(import 'dashboards/ceph-cluster.libsonnet') +
(import 'dashboards/rgw-s3-analytics.libsonnet') +
(import 'dashboards/multi-cluster.libsonnet') +
+ (import 'dashboards/smb-overview.libsonnet') +
{ _config:: $._config },
}
--- /dev/null
+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,
+ ),
+ ]),
+ ]),
+}
--- /dev/null
+{
+ "__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
+}
--- /dev/null
+<cd-grafana
+ i18n-title
+ title="SMB overview"
+ [grafanaPath]="'smb-overview?'"
+ [type]="'metrics'"
+ uid="feem6ehrmi2o0b"
+ grafanaStyle="two">
+</cd-grafana>
--- /dev/null
+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();
+ });
+});
--- /dev/null
+import { Component } from '@angular/core';
+
+@Component({
+ selector: 'cd-smb-overview',
+ templateUrl: './smb-overview.component.html',
+ styleUrl: './smb-overview.component.scss'
+})
+export class SmbOverviewComponent {}
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>
<ng-template #usersgroups>
<cd-smb-users-list></cd-smb-users-list>
</ng-template>
+
+<ng-template #overview>
+ <cd-smb-overview></cd-smb-overview>
+</ng-template>
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,
enum TABS {
'clusters',
'joinAuths',
- 'usersgroups'
+ 'usersgroups',
+ 'overview'
}
@Component({
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: [
SmbUsersgroupsDetailsComponent,
SmbJoinAuthFormComponent,
SmbUsersgroupsFormComponent,
- SmbShareFormComponent
+ SmbShareFormComponent,
+ SmbOverviewComponent
]
})
export class SmbModule {