Advertisement
wjhinz2

RRDREST-Librenms

Jul 13th, 2021
3,231
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
JSON 10.50 KB | None | 0 0
  1. {
  2.   "__inputs": [
  3.     {
  4.       "name": "DS_RRDREST_API",
  5.       "label": "RRDRest API",
  6.       "description": "",
  7.       "type": "datasource",
  8.       "pluginId": "marcusolsson-json-datasource",
  9.       "pluginName": "JSON API"
  10.     },
  11.     {
  12.       "name": "DS_LIBRENMS_API",
  13.       "label": "LibreNMS API",
  14.       "description": "",
  15.       "type": "datasource",
  16.       "pluginId": "marcusolsson-json-datasource",
  17.       "pluginName": "JSON API"
  18.     }
  19.   ],
  20.   "__requires": [
  21.     {
  22.       "type": "grafana",
  23.       "id": "grafana",
  24.       "name": "Grafana"
  25.     },
  26.     {
  27.       "type": "panel",
  28.       "id": "graph",
  29.       "name": "Graph",
  30.       "version": ""
  31.     },
  32.     {
  33.       "type": "datasource",
  34.       "id": "marcusolsson-json-datasource",
  35.       "name": "JSON API",
  36.       "version": "1.2.1"
  37.     }
  38.   ],
  39.   "annotations": {
  40.     "list": [
  41.       {
  42.         "builtIn": 1,
  43.         "datasource": "-- Grafana --",
  44.         "enable": true,
  45.         "hide": true,
  46.         "iconColor": "rgba(0, 211, 255, 1)",
  47.         "name": "Annotations & Alerts",
  48.         "type": "dashboard"
  49.       }
  50.     ]
  51.   },
  52.   "editable": true,
  53.   "gnetId": null,
  54.   "graphTooltip": 0,
  55.   "id": null,
  56.   "iteration": 1626152089476,
  57.   "links": [],
  58.   "panels": [
  59.     {
  60.       "aliasColors": {},
  61.       "bars": false,
  62.       "dashLength": 10,
  63.       "dashes": false,
  64.       "datasource": "${DS_RRDREST_API}",
  65.       "fieldConfig": {
  66.         "defaults": {
  67.           "custom": {},
  68.           "unit": "bps"
  69.         },
  70.         "overrides": []
  71.       },
  72.       "fill": 1,
  73.       "fillGradient": 0,
  74.       "gridPos": {
  75.         "h": 15,
  76.         "w": 24,
  77.         "x": 0,
  78.         "y": 0
  79.       },
  80.       "hiddenSeries": false,
  81.       "id": 2,
  82.       "legend": {
  83.         "avg": false,
  84.         "current": false,
  85.         "max": false,
  86.         "min": false,
  87.         "show": true,
  88.         "total": false,
  89.         "values": false
  90.       },
  91.       "lines": true,
  92.       "linewidth": 1,
  93.       "nullPointMode": "null",
  94.       "options": {
  95.         "alertThreshold": true
  96.       },
  97.       "percentage": false,
  98.       "pluginVersion": "7.3.5",
  99.       "pointradius": 2,
  100.       "points": false,
  101.       "renderer": "flot",
  102.       "seriesOverrides": [],
  103.       "spaceLength": 10,
  104.       "stack": false,
  105.       "steppedLine": false,
  106.       "targets": [
  107.         {
  108.           "body": "",
  109.           "cacheDurationSeconds": 0,
  110.           "fields": [
  111.             {
  112.               "jsonPath": "$.data[*].time",
  113.               "name": "time",
  114.               "type": "time"
  115.             },
  116.             {
  117.               "jsonPath": "$.data[*].inoctets",
  118.               "name": "inoctets",
  119.               "type": "number"
  120.             },
  121.             {
  122.               "jsonPath": "$.data[*].outoctets",
  123.               "name": "outoctets",
  124.               "type": "number"
  125.             }
  126.           ],
  127.           "hide": false,
  128.           "method": "GET",
  129.           "params": [
  130.             [
  131.               "",
  132.               ""
  133.             ]
  134.           ],
  135.           "queryParams": "",
  136.           "refId": "A",
  137.           "urlPath": "?rrd_path=/opt/librenms/rrd/$device/port-id$portid.rrd&epoch_start_time=${__from:date:seconds}&epoch_end_time=${__to:date:seconds}"
  138.         }
  139.       ],
  140.       "thresholds": [],
  141.       "timeFrom": null,
  142.       "timeRegions": [],
  143.       "timeShift": null,
  144.       "title": "Bandwidth In/Out",
  145.       "tooltip": {
  146.         "shared": true,
  147.         "sort": 0,
  148.         "value_type": "individual"
  149.       },
  150.       "transformations": [
  151.         {
  152.           "id": "calculateField",
  153.           "options": {
  154.             "alias": "inMbps",
  155.             "binary": {
  156.               "left": "inoctets",
  157.               "operator": "*",
  158.               "reducer": "sum",
  159.               "right": "8"
  160.             },
  161.             "mode": "binary",
  162.             "reduce": {
  163.               "include": [
  164.                 "inoctets"
  165.               ],
  166.               "reducer": "lastNotNull"
  167.             },
  168.             "replaceFields": false
  169.           }
  170.         },
  171.         {
  172.           "id": "calculateField",
  173.           "options": {
  174.             "alias": "outMbps",
  175.             "binary": {
  176.               "left": "outoctets",
  177.               "operator": "*",
  178.               "reducer": "sum",
  179.               "right": "8"
  180.             },
  181.             "mode": "binary",
  182.             "reduce": {
  183.               "reducer": "sum"
  184.             },
  185.             "replaceFields": false
  186.           }
  187.         },
  188.         {
  189.           "id": "filterFieldsByName",
  190.           "options": {
  191.             "include": {
  192.               "names": [
  193.                 "time",
  194.                 "inMbps",
  195.                 "outMbps"
  196.               ]
  197.             }
  198.           }
  199.         }
  200.       ],
  201.       "type": "graph",
  202.       "xaxis": {
  203.         "buckets": null,
  204.         "mode": "time",
  205.         "name": null,
  206.         "show": true,
  207.         "values": []
  208.       },
  209.       "yaxes": [
  210.         {
  211.           "$$hashKey": "object:1546",
  212.           "format": "bps",
  213.           "label": null,
  214.           "logBase": 1,
  215.           "max": null,
  216.           "min": null,
  217.           "show": true
  218.         },
  219.         {
  220.           "$$hashKey": "object:1547",
  221.           "format": "short",
  222.           "label": null,
  223.           "logBase": 1,
  224.           "max": null,
  225.           "min": null,
  226.           "show": true
  227.         }
  228.       ],
  229.       "yaxis": {
  230.         "align": false,
  231.         "alignLevel": null
  232.       }
  233.     },
  234.     {
  235.       "aliasColors": {},
  236.       "bars": false,
  237.       "dashLength": 10,
  238.       "dashes": false,
  239.       "datasource": "${DS_RRDREST_API}",
  240.       "fieldConfig": {
  241.         "defaults": {
  242.           "custom": {},
  243.           "unit": "bps"
  244.         },
  245.         "overrides": []
  246.       },
  247.       "fill": 1,
  248.       "fillGradient": 0,
  249.       "gridPos": {
  250.         "h": 15,
  251.         "w": 24,
  252.         "x": 0,
  253.         "y": 15
  254.       },
  255.       "hiddenSeries": false,
  256.       "id": 3,
  257.       "legend": {
  258.         "avg": false,
  259.         "current": false,
  260.         "max": false,
  261.         "min": false,
  262.         "show": true,
  263.         "total": false,
  264.         "values": false
  265.       },
  266.       "lines": true,
  267.       "linewidth": 1,
  268.       "nullPointMode": "null",
  269.       "options": {
  270.         "alertThreshold": true
  271.       },
  272.       "percentage": false,
  273.       "pluginVersion": "7.3.5",
  274.       "pointradius": 2,
  275.       "points": false,
  276.       "renderer": "flot",
  277.       "seriesOverrides": [],
  278.       "spaceLength": 10,
  279.       "stack": false,
  280.       "steppedLine": false,
  281.       "targets": [
  282.         {
  283.           "body": "",
  284.           "cacheDurationSeconds": 0,
  285.           "fields": [
  286.             {
  287.               "jsonPath": "$.data[*].time",
  288.               "name": "time",
  289.               "type": "time"
  290.             },
  291.             {
  292.               "jsonPath": "$.data[*].inerrors",
  293.               "name": "inerrors",
  294.               "type": "number"
  295.             },
  296.             {
  297.               "jsonPath": "$.data[*].outerrors",
  298.               "name": "outerrors",
  299.               "type": "number"
  300.             }
  301.           ],
  302.           "hide": false,
  303.           "method": "GET",
  304.           "params": [
  305.             [
  306.               "",
  307.               ""
  308.             ]
  309.           ],
  310.           "queryParams": "",
  311.           "refId": "A",
  312.           "urlPath": "?rrd_path=/opt/librenms/rrd/$device/port-id$portid.rrd&epoch_start_time=${__from:date:seconds}&epoch_end_time=${__to:date:seconds}"
  313.         }
  314.       ],
  315.       "thresholds": [],
  316.       "timeFrom": null,
  317.       "timeRegions": [],
  318.       "timeShift": null,
  319.       "title": "Errors In/Out",
  320.       "tooltip": {
  321.         "shared": true,
  322.         "sort": 0,
  323.         "value_type": "individual"
  324.       },
  325.       "transformations": [],
  326.       "type": "graph",
  327.       "xaxis": {
  328.         "buckets": null,
  329.         "mode": "time",
  330.         "name": null,
  331.         "show": true,
  332.         "values": []
  333.       },
  334.       "yaxes": [
  335.         {
  336.           "$$hashKey": "object:1546",
  337.           "format": "bps",
  338.           "label": null,
  339.           "logBase": 1,
  340.           "max": null,
  341.           "min": null,
  342.           "show": true
  343.         },
  344.         {
  345.           "$$hashKey": "object:1547",
  346.           "format": "short",
  347.           "label": null,
  348.           "logBase": 1,
  349.           "max": null,
  350.           "min": null,
  351.           "show": true
  352.         }
  353.       ],
  354.       "yaxis": {
  355.         "align": false,
  356.         "alignLevel": null
  357.       }
  358.     }
  359.   ],
  360.   "refresh": "30s",
  361.   "schemaVersion": 26,
  362.   "style": "dark",
  363.   "tags": [],
  364.   "templating": {
  365.     "list": [
  366.       {
  367.         "allValue": null,
  368.         "current": {},
  369.         "datasource": "${DS_LIBRENMS_API}",
  370.         "definition": "$.devices[*].hostname",
  371.         "error": null,
  372.         "hide": 0,
  373.         "includeAll": false,
  374.         "label": null,
  375.         "multi": false,
  376.         "name": "device",
  377.         "options": [],
  378.         "query": {
  379.           "cacheDurationSeconds": 300,
  380.           "fields": [
  381.             {
  382.               "jsonPath": "$.devices[*].hostname"
  383.             }
  384.           ],
  385.           "method": "GET",
  386.           "queryParams": "",
  387.           "urlPath": "/devices"
  388.         },
  389.         "refresh": 1,
  390.         "regex": "",
  391.         "skipUrlSync": false,
  392.         "sort": 0,
  393.         "tagValuesQuery": "",
  394.         "tags": [],
  395.         "tagsQuery": "",
  396.         "type": "query",
  397.         "useTags": false
  398.       },
  399.       {
  400.         "allValue": null,
  401.         "current": {},
  402.         "datasource": "${DS_LIBRENMS_API}",
  403.         "definition": "$.ports[*].port_id",
  404.         "error": null,
  405.         "hide": 0,
  406.         "includeAll": false,
  407.         "label": "Interface",
  408.         "multi": false,
  409.         "name": "portid",
  410.         "options": [],
  411.         "query": {
  412.           "cacheDurationSeconds": 300,
  413.           "experimentalVariableTextField": "ifName",
  414.           "experimentalVariableValueField": "id",
  415.           "fields": [
  416.             {
  417.               "jsonPath": "$.ports[*].port_id",
  418.               "name": "id"
  419.             },
  420.             {
  421.               "jsonPath": "$.ports[*].ifName",
  422.               "name": ""
  423.             }
  424.           ],
  425.           "method": "GET",
  426.           "queryParams": "",
  427.           "urlPath": "/devices/$device/ports?columns=ifName%2Cport_id"
  428.         },
  429.         "refresh": 1,
  430.         "regex": "",
  431.         "skipUrlSync": false,
  432.         "sort": 0,
  433.         "tagValuesQuery": "",
  434.         "tags": [],
  435.         "tagsQuery": "",
  436.         "type": "query",
  437.         "useTags": false
  438.       }
  439.     ]
  440.   },
  441.   "time": {
  442.     "from": "now-12h",
  443.     "to": "now"
  444.   },
  445.   "timepicker": {},
  446.   "timezone": "",
  447.   "title": "LibrenmsRRD",
  448.   "uid": "mFveL2mn1",
  449.   "version": 27
  450. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement