From 4813e1f6800a313383f09533f9a0db17a3274fc6 Mon Sep 17 00:00:00 2001 From: Dillon Buchanan Date: Mon, 13 Mar 2017 16:54:19 -0400 Subject: [PATCH 1/2] Add Summary File To Dist --- Gruntfile.js | 6 +++--- SUMMARY.md | 7 +++++++ 2 files changed, 10 insertions(+), 3 deletions(-) create mode 100644 SUMMARY.md diff --git a/Gruntfile.js b/Gruntfile.js index d2c57dd..8f473c2 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -19,9 +19,9 @@ module.exports = function Grunt(grunt) { dest: 'dist', }, pluginDef: { - expand: true, - src: ['README.md'], - dest: 'dist', + expand: false, + src: 'SUMMARY.md', + dest: 'dist/README.md', }, }, diff --git a/SUMMARY.md b/SUMMARY.md new file mode 100644 index 0000000..4ad742e --- /dev/null +++ b/SUMMARY.md @@ -0,0 +1,7 @@ +# 128T Grafana Datasource + +This plugin provides support for the 128T product as a metric datasource. The 128T application exports a variety of analytical metrics which are accessed, by this plugin, via it's HTTP interface. In addition to analytics, this plugin also queries the alarm interface on the 128T product and displays them in Grafana as annotations. + +Read more about it here: + +[https://github.com/128technology/grafana-datasource](https://github.com/128technology/grafana-datasource) \ No newline at end of file From c6e8d4170e750dd8c166e8825dbb50c8c4a4d51e Mon Sep 17 00:00:00 2001 From: Dillon Buchanan Date: Tue, 14 Mar 2017 12:16:01 -0400 Subject: [PATCH 2/2] Add to Readme and a Starter Dashboard --- README.md | 6 + src/dashboards/starter.json | 789 ++++++++++++++++++++++++++++++++++++ src/plugin.json | 3 + 3 files changed, 798 insertions(+) create mode 100644 src/dashboards/starter.json diff --git a/README.md b/README.md index aa126e7..90dd7de 100644 --- a/README.md +++ b/README.md @@ -8,3 +8,9 @@ This plugin provides support for the 128T product as a metric datasource. The 12 ![Screenshot](media/screenshot1.png?raw=true) +## Getting Started + +Please see the [Getting Started wiki page](https://github.com/128technology/grafana-datasource/wiki/Getting-Started) for a detailed walkthrough getting Grafana and the 128T Datasource installed an operational. Any feedback is appreciated and can be suggested via [an issue](https://github.com/128technology/grafana-datasource/issues/new) + + + diff --git a/src/dashboards/starter.json b/src/dashboards/starter.json new file mode 100644 index 0000000..5b4ff20 --- /dev/null +++ b/src/dashboards/starter.json @@ -0,0 +1,789 @@ +{ + "__inputs": [ + { + "name": "DS_NAME", + "type": "datasource", + "pluginId": "128t-datasource", + "pluginName": "128T" + } + ], + "__requires": [ + { + "type": "datasource", + "id": "128t-datasource", + "name": "128T", + "version": "1.0.0" + }, + { + "type": "grafana", + "id": "grafana", + "name": "Grafana", + "version": "4.1.1" + }, + { + "type": "panel", + "id": "graph", + "name": "Graph", + "version": "" + }, + { + "type": "panel", + "id": "singlestat", + "name": "Singlestat", + "version": "" + } + ], + "annotations": { + "list": [ + { + "datasource": "${DS_NAME}", + "enable": true, + "iconColor": "rgba(255, 96, 96, 1)", + "limit": 100, + "name": "Alarms", + "query": "*", + "type": "alert" + } + ] + }, + "editable": true, + "gnetId": null, + "graphTooltip": 1, + "hideControls": false, + "id": null, + "links": [], + "refresh": false, + "rows": [ + { + "collapse": false, + "height": "150", + "panels": [ + { + "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": "${DS_NAME}", + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "id": 8, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "span": 3, + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": true, + "lineColor": "rgb(31, 120, 193)", + "show": true + }, + "targets": [ + { + "alias": "Sessions", + "metric": "session_count", + "refId": "A", + "target": "node=$node,router=$router", + "transform": "max" + } + ], + "thresholds": "", + "title": "Sessions", + "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": "${DS_NAME}", + "format": "decbytes", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "id": 9, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "span": 3, + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": true + }, + "targets": [ + { + "alias": "", + "metric": "tx_data", + "refId": "A", + "target": "node=$node,router=$router", + "transform": "max" + } + ], + "thresholds": "", + "title": "Tx Data", + "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": "${DS_NAME}", + "format": "decbytes", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "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, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "span": 3, + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": true + }, + "targets": [ + { + "alias": "Sessions", + "metric": "rx_data", + "refId": "A", + "target": "node=$node,router=$router", + "transform": "max" + } + ], + "thresholds": "", + "title": "Rx Data", + "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": "${DS_NAME}", + "format": "decbytes", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "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, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "span": 3, + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": true + }, + "targets": [ + { + "alias": "Total Data", + "metric": "total_data", + "refId": "A", + "target": "node=$node,router=$router", + "transform": "max" + } + ], + "thresholds": "", + "title": "Total Data", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "total" + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": false, + "title": "Stats", + "titleSize": "h6" + }, + { + "collapse": false, + "height": 294, + "panels": [ + { + "aliasColors": {}, + "bars": false, + "datasource": "${DS_NAME}", + "fill": 1, + "id": 1, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "hideEmpty": false, + "hideZero": false, + "max": true, + "min": true, + "show": true, + "total": true, + "values": true + }, + "lines": true, + "linewidth": 2, + "links": [], + "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "span": 6, + "stack": false, + "steppedLine": false, + "targets": [ + { + "alias": "Lab Primary", + "hide": false, + "metric": "bandwidth", + "rawQuery": false, + "refId": "A", + "target": "node=$node,router=$router" + } + ], + "thresholds": [], + "timeFrom": null, + "timeShift": null, + "title": "Bandwidth", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "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 + } + ] + }, + { + "aliasColors": {}, + "bars": false, + "datasource": "${DS_NAME}", + "decimals": null, + "fill": 1, + "hideTimeOverride": false, + "id": 4, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "hideEmpty": false, + "hideZero": false, + "max": true, + "min": true, + "show": true, + "total": true, + "values": true + }, + "lines": true, + "linewidth": 2, + "links": [], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "span": 6, + "stack": false, + "steppedLine": false, + "targets": [ + { + "alias": "Sessions", + "metric": "session_count", + "refId": "A", + "target": "node=$node,router=$router" + }, + { + "alias": "Arrivals", + "metric": "session_arrival_rate", + "refId": "B", + "target": "node=$node,router=$router" + }, + { + "alias": "Departures", + "metric": "session_departure_rate", + "refId": "C", + "target": "node=$node,router=$router" + } + ], + "thresholds": [], + "timeFrom": null, + "timeShift": null, + "title": "Sessions", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "name": null, + "show": true, + "values": [ + "total" + ] + }, + "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 + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": false, + "title": "Dashboard Row", + "titleSize": "h6" + }, + { + "collapse": false, + "height": 250, + "panels": [ + { + "aliasColors": {}, + "bars": false, + "datasource": "${DS_NAME}", + "fill": 1, + "id": 3, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "hideEmpty": false, + "hideZero": false, + "max": true, + "min": true, + "rightSide": false, + "show": true, + "total": true, + "values": true + }, + "lines": true, + "linewidth": 2, + "links": [], + "nullPointMode": "null", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "repeat": null, + "seriesOverrides": [], + "span": 6, + "stack": false, + "steppedLine": false, + "targets": [ + { + "alias": "Rx Data", + "hide": false, + "metric": "rx_data", + "rawQuery": false, + "refId": "A", + "target": "node=$node,router=$router" + }, + { + "alias": "Tx Data", + "hide": false, + "metric": "tx_data", + "rawQuery": false, + "refId": "C", + "target": "node=$node,router=$router" + } + ], + "thresholds": [], + "timeFrom": null, + "timeShift": null, + "title": "Data", + "tooltip": { + "shared": true, + "sort": 1, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "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 + } + ] + }, + { + "aliasColors": {}, + "bars": false, + "datasource": "${DS_NAME}", + "fill": 1, + "hideTimeOverride": false, + "id": 6, + "legend": { + "alignAsTable": true, + "avg": true, + "current": true, + "hideEmpty": false, + "hideZero": false, + "max": false, + "min": false, + "show": true, + "total": true, + "values": true + }, + "lines": true, + "linewidth": 1, + "links": [], + "nullPointMode": "null as zero", + "percentage": false, + "pointradius": 5, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "span": 6, + "stack": false, + "steppedLine": false, + "targets": [ + { + "alias": "Entitlement", + "metric": "gross_entitlement", + "refId": "A", + "target": "node=$node,router=$router" + } + ], + "thresholds": [], + "timeFrom": null, + "timeShift": null, + "title": "Gross Entitlement", + "tooltip": { + "shared": true, + "sort": 2, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "mode": "time", + "name": null, + "show": true, + "values": [ + "total" + ] + }, + "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 + } + ] + } + ], + "repeat": null, + "repeatIteration": null, + "repeatRowId": null, + "showTitle": false, + "title": "Dashboard Row", + "titleSize": "h6" + } + ], + "schemaVersion": 14, + "style": "dark", + "tags": [], + "templating": { + "list": [ + { + "allValue": null, + "current": {}, + "datasource": "${DS_NAME}", + "hide": 0, + "includeAll": false, + "label": "Router:", + "multi": false, + "name": "router", + "options": [], + "query": "authority.router.*.id", + "refresh": 1, + "regex": "", + "sort": 0, + "tagValuesQuery": "", + "tags": [], + "tagsQuery": "", + "type": "query", + "useTags": false + }, + { + "allValue": null, + "current": {}, + "datasource": "${DS_NAME}", + "hide": 0, + "includeAll": false, + "label": "Node:", + "multi": false, + "name": "node", + "options": [], + "query": "authority.router.$router.node.*.id", + "refresh": 1, + "regex": "", + "sort": 0, + "tagValuesQuery": "", + "tags": [], + "tagsQuery": "", + "type": "query", + "useTags": false + } + ] + }, + "time": { + "from": "now-30m", + "to": "now" + }, + "timepicker": { + "refresh_intervals": [ + "5s", + "10s", + "30s", + "1m", + "5m", + "15m", + "30m" + ], + "time_options": [ + "5m", + "15m", + "1h" + ] + }, + "timezone": "utc", + "title": "Starter Dashboard", + "version": 1 +} \ No newline at end of file diff --git a/src/plugin.json b/src/plugin.json index b56a260..f50d24b 100644 --- a/src/plugin.json +++ b/src/plugin.json @@ -4,6 +4,9 @@ "type": "datasource", "metrics": true, "annotations": true, + "includes": [ + {"type": "dashboard", "name": "Starter 128T Dashboard", "path": "dashboards/starter.json"} + ], "info": { "description": "An analytic datasource for the 128T router.", "author": {