cluster

Infrastructure files for Nordgedanken and Midnightthoughts.
git clone git://archive.git.mtrnord.blog/MTRNord/cluster.git
Log | Files | Refs | README

connectivity-tester-dashboard.json (18924B)


      1 {
      2     "annotations": {
      3         "list": [
      4             {
      5                 "builtIn": 1,
      6                 "datasource": {
      7                     "type": "grafana",
      8                     "uid": "-- Grafana --"
      9                 },
     10                 "enable": true,
     11                 "hide": true,
     12                 "iconColor": "rgba(0, 211, 255, 1)",
     13                 "name": "Annotations & Alerts",
     14                 "type": "dashboard"
     15             }
     16         ]
     17     },
     18     "editable": true,
     19     "fiscalYearStartMonth": 0,
     20     "graphTooltip": 0,
     21     "id": 40,
     22     "links": [],
     23     "panels": [
     24         {
     25             "collapsed": false,
     26             "gridPos": {
     27                 "h": 1,
     28                 "w": 24,
     29                 "x": 0,
     30                 "y": 0
     31             },
     32             "id": 5,
     33             "panels": [],
     34             "title": "Alert Statistics",
     35             "type": "row"
     36         },
     37         {
     38             "datasource": {
     39                 "type": "grafana-postgresql-datasource",
     40                 "uid": "postgres-connectivity-tester"
     41             },
     42             "fieldConfig": {
     43                 "defaults": {
     44                     "color": {
     45                         "mode": "thresholds"
     46                     },
     47                     "mappings": [],
     48                     "thresholds": {
     49                         "mode": "absolute",
     50                         "steps": [
     51                             {
     52                                 "color": "green"
     53                             },
     54                             {
     55                                 "color": "red",
     56                                 "value": 1
     57                             }
     58                         ]
     59                     }
     60                 },
     61                 "overrides": []
     62             },
     63             "gridPos": {
     64                 "h": 4,
     65                 "w": 3,
     66                 "x": 0,
     67                 "y": 1
     68             },
     69             "id": 6,
     70             "options": {
     71                 "colorMode": "background_solid",
     72                 "graphMode": "none",
     73                 "justifyMode": "center",
     74                 "orientation": "auto",
     75                 "percentChangeColorMode": "standard",
     76                 "reduceOptions": {
     77                     "calcs": [
     78                         "lastNotNull"
     79                     ],
     80                     "fields": "",
     81                     "values": false
     82                 },
     83                 "showPercentChange": false,
     84                 "textMode": "auto",
     85                 "wideLayout": true
     86             },
     87             "pluginVersion": "12.0.2",
     88             "targets": [
     89                 {
     90                     "datasource": {
     91                         "type": "grafana-postgresql-datasource",
     92                         "uid": "postgres-connectivity-tester"
     93                     },
     94                     "editorMode": "code",
     95                     "format": "table",
     96                     "rawQuery": true,
     97                     "rawSql": "SELECT\n  COUNT(*) AS value\nFROM\n  alert\nWHERE\n  is_currently_failing = true\n  AND verified = true;",
     98                     "refId": "A",
     99                     "sql": {
    100                         "columns": [
    101                             {
    102                                 "parameters": [],
    103                                 "type": "function"
    104                             }
    105                         ],
    106                         "groupBy": [
    107                             {
    108                                 "property": {
    109                                     "type": "string"
    110                                 },
    111                                 "type": "groupBy"
    112                             }
    113                         ],
    114                         "limit": 50
    115                     }
    116                 }
    117             ],
    118             "title": "Active alerts",
    119             "type": "stat"
    120         },
    121         {
    122             "datasource": {
    123                 "type": "grafana-postgresql-datasource",
    124                 "uid": "postgres-connectivity-tester"
    125             },
    126             "fieldConfig": {
    127                 "defaults": {
    128                     "color": {
    129                         "mode": "palette-classic"
    130                     },
    131                     "custom": {
    132                         "axisBorderShow": false,
    133                         "axisCenteredZero": false,
    134                         "axisColorMode": "text",
    135                         "axisLabel": "",
    136                         "axisPlacement": "auto",
    137                         "barAlignment": 0,
    138                         "barWidthFactor": 0.6,
    139                         "drawStyle": "line",
    140                         "fillOpacity": 0,
    141                         "gradientMode": "none",
    142                         "hideFrom": {
    143                             "legend": false,
    144                             "tooltip": false,
    145                             "viz": false
    146                         },
    147                         "insertNulls": false,
    148                         "lineInterpolation": "linear",
    149                         "lineWidth": 1,
    150                         "pointSize": 5,
    151                         "scaleDistribution": {
    152                             "type": "linear"
    153                         },
    154                         "showPoints": "auto",
    155                         "spanNulls": false,
    156                         "stacking": {
    157                             "group": "A",
    158                             "mode": "none"
    159                         },
    160                         "thresholdsStyle": {
    161                             "mode": "off"
    162                         }
    163                     },
    164                     "mappings": [],
    165                     "thresholds": {
    166                         "mode": "absolute",
    167                         "steps": [
    168                             {
    169                                 "color": "green"
    170                             },
    171                             {
    172                                 "color": "red",
    173                                 "value": 80
    174                             }
    175                         ]
    176                     }
    177                 },
    178                 "overrides": []
    179             },
    180             "gridPos": {
    181                 "h": 8,
    182                 "w": 12,
    183                 "x": 3,
    184                 "y": 1
    185             },
    186             "id": 7,
    187             "options": {
    188                 "legend": {
    189                     "calcs": [],
    190                     "displayMode": "list",
    191                     "placement": "bottom",
    192                     "showLegend": true
    193                 },
    194                 "tooltip": {
    195                     "hideZeros": false,
    196                     "mode": "single",
    197                     "sort": "none"
    198                 }
    199             },
    200             "pluginVersion": "12.0.2",
    201             "targets": [
    202                 {
    203                     "datasource": {
    204                         "type": "grafana-postgresql-datasource",
    205                         "uid": "postgres-connectivity-tester"
    206                     },
    207                     "editorMode": "code",
    208                     "format": "table",
    209                     "rawQuery": true,
    210                     "rawSql": "SELECT\n  $__timeGroup(sent_at, '1h') AS time,\n  COUNT(*) FILTER (WHERE email_type = 'failure') AS failure_emails,\n  COUNT(*) FILTER (WHERE email_type = 'recovery') AS recovery_emails,\n  COUNT(*) AS total_emails\nFROM\n  email_log\nWHERE\n  $__timeFilter(sent_at)\nGROUP BY\n  time\nORDER BY\n  time ASC;",
    211                     "refId": "A",
    212                     "sql": {
    213                         "columns": [
    214                             {
    215                                 "parameters": [],
    216                                 "type": "function"
    217                             }
    218                         ],
    219                         "groupBy": [
    220                             {
    221                                 "property": {
    222                                     "type": "string"
    223                                 },
    224                                 "type": "groupBy"
    225                             }
    226                         ],
    227                         "limit": 50
    228                     }
    229                 }
    230             ],
    231             "title": "Email volume over time",
    232             "type": "timeseries"
    233         },
    234         {
    235             "collapsed": false,
    236             "gridPos": {
    237                 "h": 1,
    238                 "w": 24,
    239                 "x": 0,
    240                 "y": 9
    241             },
    242             "id": 2,
    243             "panels": [],
    244             "title": "Federation Statistics",
    245             "type": "row"
    246         },
    247         {
    248             "datasource": {
    249                 "type": "grafana-postgresql-datasource",
    250                 "uid": "postgres-connectivity-tester"
    251             },
    252             "fieldConfig": {
    253                 "defaults": {
    254                     "color": {
    255                         "mode": "palette-classic"
    256                     },
    257                     "custom": {
    258                         "axisBorderShow": false,
    259                         "axisCenteredZero": false,
    260                         "axisColorMode": "text",
    261                         "axisLabel": "",
    262                         "axisPlacement": "auto",
    263                         "fillOpacity": 80,
    264                         "gradientMode": "none",
    265                         "hideFrom": {
    266                             "legend": false,
    267                             "tooltip": false,
    268                             "viz": false
    269                         },
    270                         "lineWidth": 1,
    271                         "scaleDistribution": {
    272                             "type": "linear"
    273                         },
    274                         "thresholdsStyle": {
    275                             "mode": "off"
    276                         }
    277                     },
    278                     "mappings": [],
    279                     "thresholds": {
    280                         "mode": "absolute",
    281                         "steps": [
    282                             {
    283                                 "color": "green"
    284                             }
    285                         ]
    286                     }
    287                 },
    288                 "overrides": []
    289             },
    290             "gridPos": {
    291                 "h": 8,
    292                 "w": 12,
    293                 "x": 0,
    294                 "y": 10
    295             },
    296             "id": 1,
    297             "options": {
    298                 "barRadius": 0,
    299                 "barWidth": 0.25,
    300                 "fullHighlight": false,
    301                 "groupWidth": 0.7,
    302                 "legend": {
    303                     "calcs": [],
    304                     "displayMode": "table",
    305                     "placement": "bottom",
    306                     "showLegend": true
    307                 },
    308                 "orientation": "auto",
    309                 "showValue": "auto",
    310                 "stacking": "normal",
    311                 "tooltip": {
    312                     "hideZeros": false,
    313                     "mode": "single",
    314                     "sort": "none"
    315                 },
    316                 "xTickLabelRotation": 0,
    317                 "xTickLabelSpacing": 100
    318             },
    319             "pluginVersion": "12.0.2",
    320             "targets": [
    321                 {
    322                     "datasource": {
    323                         "type": "grafana-postgresql-datasource",
    324                         "uid": "postgres-connectivity-tester"
    325                     },
    326                     "editorMode": "code",
    327                     "format": "table",
    328                     "key": "Q-774d1582-40cf-46af-9f49-9b146da67c67-0",
    329                     "rawQuery": true,
    330                     "rawSql": "SELECT\n  DATE_TRUNC('hour', ts) AS time,\n  COUNT(*) FILTER (WHERE federation_ok = true) AS successful_checks,\n  COUNT(*) FILTER (WHERE federation_ok = false) AS failed_checks\nFROM\n  federation_stat_raw\nWHERE\n  $__timeFilter(ts) \nGROUP BY\n  time\nORDER BY\n  time ASC;",
    331                     "refId": "A",
    332                     "sql": {
    333                         "columns": [
    334                             {
    335                                 "parameters": [],
    336                                 "type": "function"
    337                             }
    338                         ],
    339                         "groupBy": [
    340                             {
    341                                 "property": {
    342                                     "type": "string"
    343                                 },
    344                                 "type": "groupBy"
    345                             }
    346                         ],
    347                         "limit": 50
    348                     }
    349                 }
    350             ],
    351             "title": "Federation checks over time (success/failure volume)",
    352             "type": "barchart"
    353         },
    354         {
    355             "datasource": {
    356                 "type": "grafana-postgresql-datasource",
    357                 "uid": "postgres-connectivity-tester"
    358             },
    359             "fieldConfig": {
    360                 "defaults": {
    361                     "color": {
    362                         "mode": "thresholds"
    363                     },
    364                     "custom": {
    365                         "align": "auto",
    366                         "cellOptions": {
    367                             "type": "auto"
    368                         },
    369                         "inspect": false
    370                     },
    371                     "mappings": [],
    372                     "thresholds": {
    373                         "mode": "absolute",
    374                         "steps": [
    375                             {
    376                                 "color": "green"
    377                             },
    378                             {
    379                                 "color": "red",
    380                                 "value": 80
    381                             }
    382                         ]
    383                     }
    384                 },
    385                 "overrides": []
    386             },
    387             "gridPos": {
    388                 "h": 8,
    389                 "w": 12,
    390                 "x": 12,
    391                 "y": 10
    392             },
    393             "id": 3,
    394             "options": {
    395                 "cellHeight": "sm",
    396                 "footer": {
    397                     "countRows": false,
    398                     "fields": "",
    399                     "reducer": [
    400                         "sum"
    401                     ],
    402                     "show": false
    403                 },
    404                 "showHeader": true
    405             },
    406             "pluginVersion": "12.0.2",
    407             "targets": [
    408                 {
    409                     "datasource": {
    410                         "type": "grafana-postgresql-datasource",
    411                         "uid": "postgres-connectivity-tester"
    412                     },
    413                     "editorMode": "code",
    414                     "format": "table",
    415                     "rawQuery": true,
    416                     "rawSql": "SELECT\n  server_name,\n  COUNT(*) AS total_checks,\n  SUM(CASE WHEN federation_ok THEN 1 ELSE 0 END) AS success_count,\n  SUM(CASE WHEN NOT federation_ok THEN 1 ELSE 0 END) AS failure_count\nFROM\n  federation_stat_raw\nGROUP BY\n  server_name\nORDER BY\n  total_checks DESC\nLIMIT 20;",
    417                     "refId": "A",
    418                     "sql": {
    419                         "columns": [
    420                             {
    421                                 "parameters": [],
    422                                 "type": "function"
    423                             }
    424                         ],
    425                         "groupBy": [
    426                             {
    427                                 "property": {
    428                                     "type": "string"
    429                                 },
    430                                 "type": "groupBy"
    431                             }
    432                         ],
    433                         "limit": 50
    434                     }
    435                 }
    436             ],
    437             "title": "Top servers by check volume (All Time)",
    438             "type": "table"
    439         },
    440         {
    441             "datasource": {
    442                 "type": "grafana-postgresql-datasource",
    443                 "uid": "postgres-connectivity-tester"
    444             },
    445             "fieldConfig": {
    446                 "defaults": {
    447                     "color": {
    448                         "mode": "thresholds"
    449                     },
    450                     "custom": {
    451                         "align": "auto",
    452                         "cellOptions": {
    453                             "type": "auto"
    454                         },
    455                         "inspect": false
    456                     },
    457                     "mappings": [],
    458                     "thresholds": {
    459                         "mode": "absolute",
    460                         "steps": [
    461                             {
    462                                 "color": "green"
    463                             },
    464                             {
    465                                 "color": "red",
    466                                 "value": 80
    467                             }
    468                         ]
    469                     }
    470                 },
    471                 "overrides": []
    472             },
    473             "gridPos": {
    474                 "h": 8,
    475                 "w": 12,
    476                 "x": 0,
    477                 "y": 18
    478             },
    479             "id": 4,
    480             "options": {
    481                 "cellHeight": "sm",
    482                 "footer": {
    483                     "countRows": false,
    484                     "fields": "",
    485                     "reducer": [
    486                         "sum"
    487                     ],
    488                     "show": false
    489                 },
    490                 "showHeader": true
    491             },
    492             "pluginVersion": "12.0.2",
    493             "targets": [
    494                 {
    495                     "datasource": {
    496                         "type": "grafana-postgresql-datasource",
    497                         "uid": "postgres-connectivity-tester"
    498                     },
    499                     "editorMode": "code",
    500                     "format": "table",
    501                     "rawQuery": true,
    502                     "rawSql": "SELECT\n  server_name,\n  last_seen_at,\n  failure_count,\n  (failure_count::float / NULLIF(req_count, 0) * 100) AS failure_rate\nFROM\n  federation_stat_aggregate\nWHERE\n  last_seen_at >= $__timeFrom()\n  AND failure_count > 0\nORDER BY\n  failure_rate DESC\nLIMIT 20;",
    503                     "refId": "A",
    504                     "sql": {
    505                         "columns": [
    506                             {
    507                                 "parameters": [],
    508                                 "type": "function"
    509                             }
    510                         ],
    511                         "groupBy": [
    512                             {
    513                                 "property": {
    514                                     "type": "string"
    515                                 },
    516                                 "type": "groupBy"
    517                             }
    518                         ],
    519                         "limit": 50
    520                     }
    521                 }
    522             ],
    523             "title": "Recently failing servers",
    524             "type": "table"
    525         }
    526     ],
    527     "preload": false,
    528     "refresh": "30s",
    529     "schemaVersion": 41,
    530     "tags": [],
    531     "templating": {
    532         "list": []
    533     },
    534     "time": {
    535         "from": "now-30d",
    536         "to": "now"
    537     },
    538     "timepicker": {},
    539     "timezone": "browser",
    540     "title": "Connectivity Tester",
    541     "uid": "c6527508-9d56-4edb-8fc2-4df0b28a2de1",
    542     "version": 6
    543 }