cluster

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

flux-logs-dashboard.json (10377B)


      1 {
      2     "__inputs": [
      3         {
      4             "name": "DS_LOKI",
      5             "label": "Loki",
      6             "description": "",
      7             "type": "datasource",
      8             "pluginId": "loki",
      9             "pluginName": "Loki"
     10         }
     11     ],
     12     "annotations": {
     13         "list": [
     14             {
     15                 "builtIn": 1,
     16                 "datasource": "-- Grafana --",
     17                 "enable": true,
     18                 "hide": true,
     19                 "iconColor": "rgba(0, 211, 255, 1)",
     20                 "name": "Annotations & Alerts",
     21                 "target": {
     22                     "limit": 100,
     23                     "matchAny": false,
     24                     "tags": [],
     25                     "type": "dashboard"
     26                 },
     27                 "type": "dashboard"
     28             },
     29             {
     30                 "datasource": {
     31                     "type": "datasource",
     32                     "uid": "grafana"
     33                 },
     34                 "enable": true,
     35                 "iconColor": "red",
     36                 "name": "flux events",
     37                 "target": {
     38                     "limit": 100,
     39                     "matchAny": false,
     40                     "tags": [
     41                         "flux"
     42                     ],
     43                     "type": "tags"
     44                 }
     45             }
     46         ]
     47     },
     48     "description": "Flux logs collected from Kubernetes, stored in Loki",
     49     "editable": true,
     50     "gnetId": null,
     51     "graphTooltip": 0,
     52     "id": 29,
     53     "iteration": 1653748775696,
     54     "links": [],
     55     "liveNow": false,
     56     "panels": [
     57         {
     58             "datasource": "${DS_LOKI}",
     59             "description": "",
     60             "fieldConfig": {
     61                 "defaults": {
     62                     "color": {
     63                         "mode": "palette-classic"
     64                     },
     65                     "custom": {
     66                         "axisLabel": "",
     67                         "axisPlacement": "auto",
     68                         "barAlignment": 0,
     69                         "drawStyle": "bars",
     70                         "fillOpacity": 0,
     71                         "gradientMode": "none",
     72                         "hideFrom": {
     73                             "legend": false,
     74                             "tooltip": false,
     75                             "viz": false
     76                         },
     77                         "lineInterpolation": "linear",
     78                         "lineWidth": 1,
     79                         "pointSize": 5,
     80                         "scaleDistribution": {
     81                             "type": "linear"
     82                         },
     83                         "showPoints": "auto",
     84                         "spanNulls": false,
     85                         "stacking": {
     86                             "group": "A",
     87                             "mode": "none"
     88                         },
     89                         "thresholdsStyle": {
     90                             "mode": "off"
     91                         }
     92                     },
     93                     "mappings": [],
     94                     "thresholds": {
     95                         "mode": "absolute",
     96                         "steps": [
     97                             {
     98                                 "color": "green",
     99                                 "value": null
    100                             },
    101                             {
    102                                 "color": "red",
    103                                 "value": 80
    104                             }
    105                         ]
    106                     }
    107                 },
    108                 "overrides": []
    109             },
    110             "gridPos": {
    111                 "h": 4,
    112                 "w": 24,
    113                 "x": 0,
    114                 "y": 0
    115             },
    116             "id": 4,
    117             "options": {
    118                 "legend": {
    119                     "calcs": [],
    120                     "displayMode": "hidden",
    121                     "placement": "bottom"
    122                 },
    123                 "tooltip": {
    124                     "mode": "single",
    125                     "sort": "none"
    126                 }
    127             },
    128             "targets": [
    129                 {
    130                     "datasource": "${DS_LOKI}",
    131                     "expr": "sum(count_over_time({namespace=~\"$namespace\", stream=~\"$stream\", app =~\"$controller\"} | json | __error__!=\"JSONParserErr\" | level=~\"$level\" |= \"$query\" [$__interval]))",
    132                     "instant": false,
    133                     "legendFormat": "Log count",
    134                     "range": true,
    135                     "refId": "A"
    136                 }
    137             ],
    138             "type": "timeseries"
    139         },
    140         {
    141             "datasource": "${DS_LOKI}",
    142             "description": "Logs from services running in Kubernetes",
    143             "gridPos": {
    144                 "h": 25,
    145                 "w": 24,
    146                 "x": 0,
    147                 "y": 4
    148             },
    149             "id": 2,
    150             "options": {
    151                 "dedupStrategy": "numbers",
    152                 "enableLogDetails": false,
    153                 "prettifyLogMessage": true,
    154                 "showCommonLabels": false,
    155                 "showLabels": false,
    156                 "showTime": false,
    157                 "sortOrder": "Descending",
    158                 "wrapLogMessage": false
    159             },
    160             "targets": [
    161                 {
    162                     "datasource": "${DS_LOKI}",
    163                     "expr": "{namespace=~\"$namespace\", stream=~\"$stream\", app =~\"$controller\"} | json | __error__!=\"JSONParserErr\" | level=~\"$level\" |= \"$query\"",
    164                     "refId": "A"
    165                 }
    166             ],
    167             "type": "logs"
    168         }
    169     ],
    170     "refresh": "10s",
    171     "schemaVersion": 36,
    172     "style": "light",
    173     "tags": [
    174         "flux"
    175     ],
    176     "templating": {
    177         "list": [
    178             {
    179                 "current": {
    180                     "selected": false,
    181                     "text": "",
    182                     "value": ""
    183                 },
    184                 "description": "String to search for",
    185                 "hide": 0,
    186                 "label": "Search Query",
    187                 "name": "query",
    188                 "options": [
    189                     {
    190                         "selected": true,
    191                         "text": "",
    192                         "value": ""
    193                     }
    194                 ],
    195                 "query": "",
    196                 "skipUrlSync": false,
    197                 "type": "textbox"
    198             },
    199             {
    200                 "allValue": "info|error",
    201                 "current": {
    202                     "selected": false,
    203                     "text": "All",
    204                     "value": "$__all"
    205                 },
    206                 "hide": 0,
    207                 "includeAll": true,
    208                 "multi": false,
    209                 "name": "level",
    210                 "options": [
    211                     {
    212                         "selected": true,
    213                         "text": "All",
    214                         "value": "$__all"
    215                     },
    216                     {
    217                         "selected": false,
    218                         "text": "info",
    219                         "value": "info"
    220                     },
    221                     {
    222                         "selected": false,
    223                         "text": "error",
    224                         "value": "error"
    225                     }
    226                 ],
    227                 "query": "info,error",
    228                 "queryValue": "",
    229                 "skipUrlSync": false,
    230                 "type": "custom"
    231             },
    232             {
    233                 "allValue": ".+",
    234                 "current": {
    235                     "selected": true,
    236                     "text": [
    237                         "All"
    238                     ],
    239                     "value": [
    240                         "$__all"
    241                     ]
    242                 },
    243                 "datasource": "${DS_LOKI}",
    244                 "definition": "label_values(app)",
    245                 "hide": 0,
    246                 "includeAll": true,
    247                 "multi": true,
    248                 "name": "controller",
    249                 "options": [],
    250                 "query": "label_values(app)",
    251                 "refresh": 1,
    252                 "regex": "",
    253                 "skipUrlSync": false,
    254                 "sort": 0,
    255                 "type": "query"
    256             },
    257             {
    258                 "allValue": ".+",
    259                 "current": {
    260                     "selected": true,
    261                     "text": [
    262                         "flux-system"
    263                     ],
    264                     "value": [
    265                         "flux-system"
    266                     ]
    267                 },
    268                 "datasource": "${DS_LOKI}",
    269                 "definition": "label_values(namespace)",
    270                 "hide": 0,
    271                 "includeAll": true,
    272                 "multi": true,
    273                 "name": "namespace",
    274                 "options": [],
    275                 "query": "label_values(namespace)",
    276                 "refresh": 1,
    277                 "regex": "",
    278                 "skipUrlSync": false,
    279                 "sort": 0,
    280                 "type": "query"
    281             },
    282             {
    283                 "allValue": ".+",
    284                 "current": {
    285                     "selected": false,
    286                     "text": "All",
    287                     "value": "$__all"
    288                 },
    289                 "datasource": "${DS_LOKI}",
    290                 "definition": "label_values(stream)",
    291                 "hide": 0,
    292                 "includeAll": true,
    293                 "multi": true,
    294                 "name": "stream",
    295                 "options": [],
    296                 "query": "label_values(stream)",
    297                 "refresh": 1,
    298                 "regex": "",
    299                 "skipUrlSync": false,
    300                 "sort": 0,
    301                 "type": "query"
    302             },
    303             {
    304                 "current": {
    305                     "selected": false,
    306                     "text": "Loki",
    307                     "value": "Loki"
    308                 },
    309                 "hide": 0,
    310                 "includeAll": false,
    311                 "label": "Datasource",
    312                 "multi": false,
    313                 "name": "DS_LOKI",
    314                 "options": [],
    315                 "query": "loki",
    316                 "refresh": 1,
    317                 "regex": "",
    318                 "skipUrlSync": false,
    319                 "type": "datasource"
    320             }
    321         ]
    322     },
    323     "time": {
    324         "from": "now-6h",
    325         "to": "now"
    326     },
    327     "timepicker": {},
    328     "timezone": "",
    329     "title": "Flux Logs",
    330     "uid": "flux-logs",
    331     "version": 2
    332 }