Advertisement
joaociocca

beautify github.com/maxandersen/internet-monitoring

Jan 24th, 2022
1,507
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 12.13 KB | None | 0 0
  1. cat <<EOF > $(find / -name 'ping-speed-stats.json' -print -quit 2>/dev/null)
  2. {
  3.   "annotations": {
  4.     "list": [
  5.       {
  6.         "builtIn": 1,
  7.         "datasource": "-- Grafana --",
  8.         "enable": true,
  9.         "hide": true,
  10.         "iconColor": "rgba(0, 211, 255, 1)",
  11.         "limit": 100,
  12.         "name": "Annotations & Alerts",
  13.         "showIn": 0,
  14.         "target": {
  15.           "limit": 100,
  16.           "matchAny": false,
  17.           "tags": [],
  18.           "type": "dashboard"
  19.         },
  20.         "type": "dashboard"
  21.       }
  22.     ]
  23.   },
  24.   "editable": true,
  25.   "fiscalYearStartMonth": 0,
  26.   "graphTooltip": 0,
  27.   "links": [],
  28.   "liveNow": false,
  29.   "panels": [
  30.     {
  31.       "datasource": {
  32.         "type": "prometheus",
  33.         "uid": "P1809F7CD0C75ACF3"
  34.       },
  35.       "fieldConfig": {
  36.         "defaults": {
  37.           "color": {
  38.             "mode": "palette-classic"
  39.           },
  40.           "custom": {
  41.             "axisLabel": "",
  42.             "axisPlacement": "auto",
  43.             "barAlignment": 0,
  44.             "drawStyle": "line",
  45.             "fillOpacity": 10,
  46.             "gradientMode": "none",
  47.             "hideFrom": {
  48.               "legend": false,
  49.               "tooltip": false,
  50.               "viz": false
  51.             },
  52.             "lineInterpolation": "linear",
  53.             "lineWidth": 1,
  54.             "pointSize": 5,
  55.             "scaleDistribution": {
  56.               "type": "linear"
  57.             },
  58.             "showPoints": "never",
  59.             "spanNulls": true,
  60.             "stacking": {
  61.               "group": "A",
  62.               "mode": "none"
  63.             },
  64.             "thresholdsStyle": {
  65.               "mode": "off"
  66.             }
  67.           },
  68.           "mappings": [],
  69.           "thresholds": {
  70.             "mode": "absolute",
  71.             "steps": [
  72.               {
  73.                 "color": "green",
  74.                 "value": null
  75.               },
  76.               {
  77.                 "color": "red",
  78.                 "value": 80
  79.               }
  80.             ]
  81.           },
  82.           "unit": "short"
  83.         },
  84.         "overrides": []
  85.       },
  86.       "gridPos": {
  87.         "h": 9,
  88.         "w": 12,
  89.         "x": 0,
  90.         "y": 0
  91.       },
  92.       "id": 6,
  93.       "links": [],
  94.       "options": {
  95.         "legend": {
  96.           "calcs": [],
  97.           "displayMode": "list",
  98.           "placement": "bottom"
  99.         },
  100.         "tooltip": {
  101.           "mode": "single"
  102.         }
  103.       },
  104.       "pluginVersion": "8.3.4",
  105.       "targets": [
  106.         {
  107.           "expr": "speedtest_bits_per_second{}",
  108.           "format": "time_series",
  109.           "intervalFactor": 1,
  110.           "legendFormat": "{{direction}}",
  111.           "refId": "A"
  112.         }
  113.       ],
  114.       "title": "speedtest",
  115.       "type": "timeseries"
  116.     },
  117.     {
  118.       "cards": {
  119.         "cardHSpacing": 2,
  120.         "cardMinWidth": 5,
  121.         "cardVSpacing": 2
  122.       },
  123.       "color": {
  124.         "cardColor": "#b4ff00",
  125.         "colorScale": "sqrt",
  126.         "colorScheme": "interpolateGnYlRd",
  127.         "defaultColor": "#757575",
  128.         "exponent": 0.5,
  129.         "mode": "spectrum",
  130.         "thresholds": []
  131.       },
  132.       "datasource": {
  133.         "type": "prometheus",
  134.         "uid": "P1809F7CD0C75ACF3"
  135.       },
  136.       "gridPos": {
  137.         "h": 9,
  138.         "w": 12,
  139.         "x": 12,
  140.         "y": 0
  141.       },
  142.       "highlightCards": true,
  143.       "id": 14,
  144.       "legend": {
  145.         "show": false
  146.       },
  147.       "links": [],
  148.       "nullPointMode": "as empty",
  149.       "pageSize": 15,
  150.       "seriesFilterIndex": -1,
  151.       "statusmap": {
  152.         "ConfigVersion": "v1"
  153.       },
  154.       "targets": [
  155.         {
  156.           "expr": "probe_success",
  157.           "format": "time_series",
  158.           "interval": "",
  159.           "intervalFactor": 1,
  160.           "legendFormat": "{{instance}}",
  161.           "refId": "A"
  162.         }
  163.       ],
  164.       "title": "Panel Title",
  165.       "tooltip": {
  166.         "extraInfo": "",
  167.         "freezeOnClick": true,
  168.         "items": [],
  169.         "show": true,
  170.         "showExtraInfo": false,
  171.         "showItems": false
  172.       },
  173.       "type": "flant-statusmap-panel",
  174.       "useMax": true,
  175.       "usingPagination": false,
  176.       "xAxis": {
  177.         "show": true
  178.       },
  179.       "yAxis": {
  180.         "maxWidth": -1,
  181.         "minWidth": -1,
  182.         "show": true
  183.       },
  184.       "yAxisSort": "metrics",
  185.       "yLabel": {
  186.         "delimiter": "",
  187.         "labelTemplate": "",
  188.         "usingSplitLabel": false
  189.       }
  190.     },
  191.     {
  192.       "datasource": {
  193.         "type": "prometheus",
  194.         "uid": "P1809F7CD0C75ACF3"
  195.       },
  196.       "fieldConfig": {
  197.         "defaults": {
  198.           "color": {
  199.             "mode": "thresholds"
  200.           },
  201.           "decimals": 0,
  202.           "mappings": [
  203.             {
  204.               "options": {
  205.                 "match": "null",
  206.                 "result": {
  207.                   "text": "N/A"
  208.                 }
  209.               },
  210.               "type": "special"
  211.             }
  212.           ],
  213.           "min": 0,
  214.           "thresholds": {
  215.             "mode": "absolute",
  216.             "steps": [
  217.               {
  218.                 "color": "red",
  219.                 "value": null
  220.               },
  221.               {
  222.                 "color": "rgba(237, 129, 40, 0.89)",
  223.                 "value": 200
  224.               },
  225.               {
  226.                 "color": "green",
  227.                 "value": 500
  228.               }
  229.             ]
  230.           },
  231.           "unit": "none"
  232.         },
  233.         "overrides": []
  234.       },
  235.       "gridPos": {
  236.         "h": 6,
  237.         "w": 4,
  238.         "x": 0,
  239.         "y": 9
  240.       },
  241.       "id": 8,
  242.       "links": [],
  243.       "maxDataPoints": 100,
  244.       "options": {
  245.         "orientation": "horizontal",
  246.         "reduceOptions": {
  247.           "calcs": [
  248.             "mean"
  249.           ],
  250.           "fields": "",
  251.           "values": false
  252.         },
  253.         "showThresholdLabels": false,
  254.         "showThresholdMarkers": true
  255.       },
  256.       "pluginVersion": "8.3.4",
  257.       "targets": [
  258.         {
  259.           "expr": "speedtest_bits_per_second{direction=\"downstream\"}",
  260.           "format": "time_series",
  261.           "intervalFactor": 1,
  262.           "refId": "A"
  263.         }
  264.       ],
  265.       "title": "Download",
  266.       "type": "gauge"
  267.     },
  268.     {
  269.       "datasource": {
  270.         "type": "prometheus",
  271.         "uid": "P1809F7CD0C75ACF3"
  272.       },
  273.       "fieldConfig": {
  274.         "defaults": {
  275.           "color": {
  276.             "mode": "thresholds"
  277.           },
  278.           "mappings": [
  279.             {
  280.               "options": {
  281.                 "match": "null",
  282.                 "result": {
  283.                   "text": "N/A"
  284.                 }
  285.               },
  286.               "type": "special"
  287.             }
  288.           ],
  289.           "min": 0,
  290.           "thresholds": {
  291.             "mode": "absolute",
  292.             "steps": [
  293.               {
  294.                 "color": "red",
  295.                 "value": null
  296.               },
  297.               {
  298.                 "color": "rgba(237, 129, 40, 0.89)",
  299.                 "value": 20
  300.               },
  301.               {
  302.                 "color": "green",
  303.                 "value": 100
  304.               }
  305.             ]
  306.           },
  307.           "unit": "none"
  308.         },
  309.         "overrides": []
  310.       },
  311.       "gridPos": {
  312.         "h": 6,
  313.         "w": 4,
  314.         "x": 4,
  315.         "y": 9
  316.       },
  317.       "id": 10,
  318.       "links": [],
  319.       "maxDataPoints": 100,
  320.       "options": {
  321.         "orientation": "horizontal",
  322.         "reduceOptions": {
  323.           "calcs": [
  324.             "mean"
  325.           ],
  326.           "fields": "",
  327.           "values": false
  328.         },
  329.         "showThresholdLabels": false,
  330.         "showThresholdMarkers": true
  331.       },
  332.       "pluginVersion": "8.3.4",
  333.       "targets": [
  334.         {
  335.           "expr": "speedtest_bits_per_second{direction=\"upstream\"}",
  336.           "format": "time_series",
  337.           "intervalFactor": 1,
  338.           "refId": "A"
  339.         }
  340.       ],
  341.       "title": "Upload",
  342.       "type": "gauge"
  343.     },
  344.     {
  345.       "datasource": {
  346.         "type": "prometheus",
  347.         "uid": "P1809F7CD0C75ACF3"
  348.       },
  349.       "fieldConfig": {
  350.         "defaults": {
  351.           "color": {
  352.             "mode": "thresholds"
  353.           },
  354.           "decimals": 2,
  355.           "mappings": [
  356.             {
  357.               "options": {
  358.                 "match": "null",
  359.                 "result": {
  360.                   "text": "N/A"
  361.                 }
  362.               },
  363.               "type": "special"
  364.             }
  365.           ],
  366.           "max": 100,
  367.           "min": 0,
  368.           "thresholds": {
  369.             "mode": "absolute",
  370.             "steps": [
  371.               {
  372.                 "color": "green",
  373.                 "value": null
  374.               },
  375.               {
  376.                 "color": "red",
  377.                 "value": 80
  378.               }
  379.             ]
  380.           },
  381.           "unit": "ms"
  382.         },
  383.         "overrides": []
  384.       },
  385.       "gridPos": {
  386.         "h": 6,
  387.         "w": 4,
  388.         "x": 8,
  389.         "y": 9
  390.       },
  391.       "id": 12,
  392.       "links": [],
  393.       "maxDataPoints": 100,
  394.       "options": {
  395.         "orientation": "horizontal",
  396.         "reduceOptions": {
  397.           "calcs": [
  398.             "mean"
  399.           ],
  400.           "fields": "",
  401.           "values": false
  402.         },
  403.         "showThresholdLabels": false,
  404.         "showThresholdMarkers": true
  405.       },
  406.       "pluginVersion": "8.3.4",
  407.       "targets": [
  408.         {
  409.           "expr": "speedtest_ping",
  410.           "format": "time_series",
  411.           "intervalFactor": 1,
  412.           "refId": "A"
  413.         }
  414.       ],
  415.       "title": "speedtest ping",
  416.       "type": "gauge"
  417.     },
  418.     {
  419.       "aliasColors": {},
  420.       "bars": false,
  421.       "dashLength": 10,
  422.       "dashes": false,
  423.       "datasource": {
  424.         "type": "prometheus",
  425.         "uid": "P1809F7CD0C75ACF3"
  426.       },
  427.       "fill": 1,
  428.       "fillGradient": 0,
  429.       "gridPos": {
  430.         "h": 9,
  431.         "w": 12,
  432.         "x": 12,
  433.         "y": 9
  434.       },
  435.       "hiddenSeries": false,
  436.       "id": 4,
  437.       "legend": {
  438.         "avg": false,
  439.         "current": false,
  440.         "max": false,
  441.         "min": false,
  442.         "show": true,
  443.         "total": false,
  444.         "values": false
  445.       },
  446.       "lines": true,
  447.       "linewidth": 1,
  448.       "links": [],
  449.       "maxPerRow": 12,
  450.       "nullPointMode": "null",
  451.       "options": {
  452.         "alertThreshold": true
  453.       },
  454.       "percentage": false,
  455.       "pluginVersion": "8.3.4",
  456.       "pointradius": 5,
  457.       "points": false,
  458.       "renderer": "flot",
  459.       "repeat": "host",
  460.       "repeatDirection": "h",
  461.       "seriesOverrides": [],
  462.       "spaceLength": 10,
  463.       "stack": false,
  464.       "steppedLine": false,
  465.       "targets": [
  466.         {
  467.           "expr": "sum(probe_http_duration_seconds) by (instance)",
  468.           "format": "time_series",
  469.           "intervalFactor": 1,
  470.           "legendFormat": "{{instance}}",
  471.           "refId": "A"
  472.         }
  473.       ],
  474.       "thresholds": [],
  475.       "timeRegions": [],
  476.       "title": "http duration",
  477.       "tooltip": {
  478.         "shared": true,
  479.         "sort": 0,
  480.         "value_type": "individual"
  481.       },
  482.       "type": "graph",
  483.       "xaxis": {
  484.         "mode": "time",
  485.         "show": true,
  486.         "values": []
  487.       },
  488.       "yaxes": [
  489.         {
  490.           "format": "short",
  491.           "logBase": 1,
  492.           "show": true
  493.         },
  494.         {
  495.           "format": "short",
  496.           "logBase": 1,
  497.           "show": true
  498.         }
  499.       ],
  500.       "yaxis": {
  501.         "align": false
  502.       }
  503.     }
  504.   ],
  505.   "refresh": "",
  506.   "schemaVersion": 34,
  507.   "style": "dark",
  508.   "tags": [
  509.     "speedtest",
  510.     "ping"
  511.   ],
  512.   "templating": {
  513.     "list": []
  514.   },
  515.   "time": {
  516.     "from": "now-24h",
  517.     "to": "now"
  518.   },
  519.   "timepicker": {
  520.     "refresh_intervals": [
  521.       "5s",
  522.       "10s",
  523.       "30s",
  524.       "1m",
  525.       "5m",
  526.       "15m",
  527.       "30m",
  528.       "1h",
  529.       "2h",
  530.       "1d"
  531.     ],
  532.     "time_options": [
  533.       "5m",
  534.       "15m",
  535.       "1h",
  536.       "6h",
  537.       "12h",
  538.       "24h",
  539.       "2d",
  540.       "7d",
  541.       "30d"
  542.     ]
  543.   },
  544.   "timezone": "browser",
  545.   "title": "internet connection",
  546.   "uid": "o9mIe_Aik",
  547.   "version": 3,
  548.   "weekStart": ""
  549. }
  550. EOF
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement