Advertisement
Guest User

Untitled

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