通过HTTP API导出和导入Grafana仪表板

通过HTTP API导出和导入Grafana仪表板,api,import,export,grafana,prometheus,Api,Import,Export,Grafana,Prometheus,我正在尝试通过grafana实例的HTTP API导出仪表板,并使用HTTP API重新导入它们 重新导入给了我以下错误(412): 我所做的 出口 内容 导出的内容如下所示: { "meta":{ "type":"db", "canSave":true, "canEdit":true, "canStar":true, "slug":"microservice-xyz-overview-current-values-m",

我正在尝试通过grafana实例的HTTP API导出仪表板,并使用HTTP API重新导入它们

重新导入给了我以下错误(412):

我所做的

出口

内容

导出的内容如下所示:

{
   "meta":{
      "type":"db",
      "canSave":true,
      "canEdit":true,
      "canStar":true,
      "slug":"microservice-xyz-overview-current-values-m",
      "expires":"0001-01-01T00:00:00Z",
      "created":"2017-11-22T17:41:12Z",
      "updated":"2017-11-22T17:41:12Z",
      "updatedBy":"admin",
      "createdBy":"admin",
      "version":1
   },
   "dashboard":{
      "annotations":{
         "list":[
            {
               "builtIn":1,
               "datasource":"-- Grafana --",
               "enable":true,
               "hide":true,
               "iconColor":"rgba(0, 211, 255, 1)",
               "name":"Annotations \u0026 Alerts",
               "type":"dashboard"
            }
         ]
      },
      "editable":true,
      "gnetId":null,
      "graphTooltip":0,
      "hideControls":false,
      "id":3,
      "links":[

      ],
      "refresh":"5s",
      "rows":[
         {
            "collapse":false,
            "height":"180",
            "panels":[
               {
                  "cacheTimeout":null,
                  "colorBackground":true,
                  "colorValue":false,
                  "colors":[
                     "rgba(50, 172, 45, 0.97)",
                     "rgba(237, 129, 40, 0.89)",
                     "rgba(245, 54, 54, 0.9)"
                  ],
                  "datasource":"Prometheus",
                  "description":"Average of all 95th percentile of last minute.",
                  "format":"s",
                  "gauge":{
                     "maxValue":1000,
                     "minValue":0,
                     "show":false,
                     "thresholdLabels":true,
                     "thresholdMarkers":true
                  },
                  "hideTimeOverride":false,
                  "id":11,
                  "interval":null,
                  "links":[

                  ],
                  "mappingType":1,
                  "mappingTypes":[
                     {
                        "name":"value to text",
                        "value":1
                     },
                     {
                        "name":"range to text",
                        "value":2
                     }
                  ],
                  "maxDataPoints":100,
                  "nullPointMode":"connected",
                  "nullText":null,
                  "postfix":"",
                  "postfixFontSize":"50%",
                  "prefix":"",
                  "prefixFontSize":"50%",
                  "rangeMaps":[
                     {
                        "from":"null",
                        "text":"N/A",
                        "to":"null"
                     }
                  ],
                  "span":4,
                  "sparkline":{
                     "fillColor":"rgba(255, 255, 255, 0.08)",
                     "full":true,
                     "lineColor":"rgb(255, 255, 255)",
                     "show":true
                  },
                  "tableColumn":"handler",
                  "targets":[
                     {
                        "expr":"avg(http_response_time{status=~\"2[0-9]{2}\", handler=\"xyz\", quantile=\"0.95\"})",
                        "format":"time_series",
                        "interval":"15s",
                        "intervalFactor":1,
                        "refId":"A",
                        "step":15
                     }
                  ],
                  "thresholds":"400,500",
                  "timeFrom":null,
                  "title":"95-th response time",
                  "type":"singlestat",
                  "valueFontSize":"120%",
                  "valueMaps":[
                     {
                        "op":"=",
                        "text":"0",
                        "value":"null"
                     }
                  ],
                  "valueName":"current"
               },
               {
                  "cacheTimeout":null,
                  "colorBackground":true,
                  "colorValue":false,
                  "colors":[
                     "rgba(245, 54, 54, 0.9)",
                     "rgba(237, 129, 40, 0.89)",
                     "rgba(50, 172, 45, 0.97)"
                  ],
                  "datasource":"Prometheus",
                  "description":"Number of running xyzz/xyzzz services.",
                  "format":"short",
                  "gauge":{
                     "maxValue":10,
                     "minValue":0,
                     "show":false,
                     "thresholdLabels":false,
                     "thresholdMarkers":true
                  },
                  "hideTimeOverride":false,
                  "id":17,
                  "interval":null,
                  "links":[

                  ],
                  "mappingType":1,
                  "mappingTypes":[
                     {
                        "name":"value to text",
                        "value":1
                     },
                     {
                        "name":"range to text",
                        "value":2
                     }
                  ],
                  "maxDataPoints":100,
                  "nullPointMode":"connected",
                  "nullText":null,
                  "postfix":"",
                  "postfixFontSize":"50%",
                  "prefix":"",
                  "prefixFontSize":"50%",
                  "rangeMaps":[
                     {
                        "from":"null",
                        "text":"N/A",
                        "to":"null"
                     }
                  ],
                  "span":4,
                  "sparkline":{
                     "fillColor":"rgba(255, 255, 255, 0.18)",
                     "full":true,
                     "lineColor":"rgb(255, 255, 255)",
                     "show":true
                  },
                  "tableColumn":"",
                  "targets":[
                     {
                        "expr":"sum(up{job=~\"xyzz|xyzzz\"})",
                        "format":"time_series",
                        "interval":"",
                        "intervalFactor":1,
                        "refId":"A",
                        "step":1
                     }
                  ],
                  "thresholds":"2,2",
                  "timeFrom":null,
                  "title":"running instances",
                  "type":"singlestat",
                  "valueFontSize":"120%",
                  "valueMaps":[
                     {
                        "op":"=",
                        "text":"N/A",
                        "value":"null"
                     }
                  ],
                  "valueName":"current"
               },
               {
                  "cacheTimeout":null,
                  "colorBackground":true,
                  "colorValue":false,
                  "colors":[
                     "rgba(50, 172, 45, 0.97)",
                     "rgba(237, 129, 40, 0.89)",
                     "rgba(245, 54, 54, 0.9)"
                  ],
                  "datasource":"Prometheus",
                  "format":"none",
                  "gauge":{
                     "maxValue":100,
                     "minValue":0,
                     "show":false,
                     "thresholdLabels":false,
                     "thresholdMarkers":true
                  },
                  "id":22,
                  "interval":null,
                  "links":[

                  ],
                  "mappingType":1,
                  "mappingTypes":[
                     {
                        "name":"value to text",
                        "value":1
                     },
                     {
                        "name":"range to text",
                        "value":2
                     }
                  ],
                  "maxDataPoints":100,
                  "nullPointMode":"connected",
                  "nullText":null,
                  "postfix":"",
                  "postfixFontSize":"50%",
                  "prefix":"",
                  "prefixFontSize":"50%",
                  "rangeMaps":[
                     {
                        "from":"null",
                        "text":"N/A",
                        "to":"null"
                     }
                  ],
                  "span":4,
                  "sparkline":{
                     "fillColor":"rgba(255, 255, 255, 0.18)",
                     "full":true,
                     "lineColor":"rgb(255, 255, 255)",
                     "show":true
                  },
                  "tableColumn":"handler",
                  "targets":[
                     {
                        "expr":"sum(rate(http_response_time_count{handler=\"xyz\", status=~\"2[0-9]{2}\"}[1m]))",
                        "format":"time_series",
                        "intervalFactor":1,
                        "legendFormat":"",
                        "metric":"http_response_time_count",
                        "refId":"A",
                        "step":30
                     }
                  ],
                  "thresholds":"1000,3000",
                  "timeFrom":null,
                  "title":"HTTP-2XX / min",
                  "type":"singlestat",
                  "valueFontSize":"120%",
                  "valueMaps":[
                     {
                        "op":"=",
                        "text":"N/A",
                        "value":"null"
                     }
                  ],
                  "valueName":"current"
               }
            ],
            "repeat":null,
            "repeatIteration":null,
            "repeatRowId":null,
            "showTitle":false,
            "title":"Dashboard Row",
            "titleSize":"h6"
         },
         {
            "collapse":false,
            "height":"180",
            "panels":[
               {
                  "cacheTimeout":null,
                  "colorBackground":true,
                  "colorValue":false,
                  "colors":[
                     "rgba(50, 172, 45, 0.97)",
                     "rgba(237, 129, 40, 0.89)",
                     "rgba(245, 54, 54, 0.9)"
                  ],
                  "datasource":"Prometheus",
                  "decimals":null,
                  "format":"short",
                  "gauge":{
                     "maxValue":100,
                     "minValue":0,
                     "show":false,
                     "thresholdLabels":false,
                     "thresholdMarkers":true
                  },
                  "hideTimeOverride":false,
                  "id":20,
                  "interval":null,
                  "links":[

                  ],
                  "mappingType":1,
                  "mappingTypes":[
                     {
                        "name":"value to text",
                        "value":1
                     },
                     {
                        "name":"range to text",
                        "value":2
                     }
                  ],
                  "maxDataPoints":100,
                  "nullPointMode":"connected",
                  "nullText":null,
                  "postfix":"",
                  "postfixFontSize":"50%",
                  "prefix":"",
                  "prefixFontSize":"50%",
                  "rangeMaps":[
                     {
                        "from":"null",
                        "text":"N/A",
                        "to":"null"
                     }
                  ],
                  "span":4,
                  "sparkline":{
                     "fillColor":"rgba(255, 255, 255, 0.18)",
                     "full":true,
                     "lineColor":"rgb(255, 255, 255)",
                     "show":true
                  },
                  "tableColumn":"",
                  "targets":[
                     {
                        "expr":"sum(rate(http_response_time_count{handler=\"xyz\", status=~\"4[0-9]{2}\"}[1m]))",
                        "format":"time_series",
                        "intervalFactor":1,
                        "refId":"A",
                        "step":2
                     }
                  ],
                  "thresholds":"100",
                  "timeFrom":null,
                  "timeShift":null,
                  "title":"HTTP-4XX / min",
                  "type":"singlestat",
                  "valueFontSize":"120%",
                  "valueMaps":[
                     {
                        "op":"=",
                        "text":"N/A",
                        "value":"null"
                     }
                  ],
                  "valueName":"diff"
               },
               {
                  "cacheTimeout":null,
                  "colorBackground":true,
                  "colorValue":false,
                  "colors":[
                     "rgba(50, 172, 45, 0.97)",
                     "rgba(237, 129, 40, 0.89)",
                     "rgba(245, 54, 54, 0.9)"
                  ],
                  "datasource":"Prometheus",
                  "format":"short",
                  "gauge":{
                     "maxValue":100,
                     "minValue":0,
                     "show":false,
                     "thresholdLabels":false,
                     "thresholdMarkers":true
                  },
                  "hideTimeOverride":false,
                  "id":18,
                  "interval":null,
                  "links":[

                  ],
                  "mappingType":1,
                  "mappingTypes":[
                     {
                        "name":"value to text",
                        "value":1
                     },
                     {
                        "name":"range to text",
                        "value":2
                     }
                  ],
                  "maxDataPoints":100,
                  "nullPointMode":"connected",
                  "nullText":null,
                  "postfix":"",
                  "postfixFontSize":"50%",
                  "prefix":"",
                  "prefixFontSize":"50%",
                  "rangeMaps":[
                     {
                        "from":"null",
                        "text":"N/A",
                        "to":"null"
                     }
                  ],
                  "span":4,
                  "sparkline":{
                     "fillColor":"rgba(255, 255, 255, 0.18)",
                     "full":true,
                     "lineColor":"rgb(255, 255, 255)",
                     "show":true
                  },
                  "tableColumn":"",
                  "targets":[
                     {
                        "expr":"sum(rate(http_response_time_count{handler=\"xyz\", status=~\"5[0-9]{2}\"}[1m]))",
                        "format":"time_series",
                        "intervalFactor":1,
                        "refId":"A",
                        "step":2
                     }
                  ],
                  "thresholds":"10,100",
                  "timeFrom":null,
                  "timeShift":null,
                  "title":"HTTP-5XX / min",
                  "type":"singlestat",
                  "valueFontSize":"120%",
                  "valueMaps":[
                     {
                        "op":"=",
                        "text":"0",
                        "value":"null"
                     }
                  ],
                  "valueName":"diff"
               },
               {
                  "cacheTimeout":null,
                  "colorBackground":true,
                  "colorValue":false,
                  "colors":[
                     "rgba(50, 172, 45, 0.97)",
                     "rgba(237, 129, 40, 0.89)",
                     "rgba(245, 54, 54, 0.9)"
                  ],
                  "datasource":"Prometheus",
                  "format":"none",
                  "gauge":{
                     "maxValue":100,
                     "minValue":0,
                     "show":false,
                     "thresholdLabels":false,
                     "thresholdMarkers":true
                  },
                  "hideTimeOverride":false,
                  "id":21,
                  "interval":null,
                  "links":[

                  ],
                  "mappingType":2,
                  "mappingTypes":[
                     {
                        "name":"value to text",
                        "value":1
                     },
                     {
                        "name":"range to text",
                        "value":2
                     }
                  ],
                  "maxDataPoints":100,
                  "nullPointMode":"connected",
                  "nullText":null,
                  "postfix":"",
                  "postfixFontSize":"50%",
                  "prefix":"",
                  "prefixFontSize":"50%",
                  "rangeMaps":[
                     {
                        "from":"null",
                        "text":"Come on. Not a single error?",
                        "to":"null"
                     },
                     {
                        "from":"0",
                        "text":"Come on. Not a single error?",
                        "to":"1"
                     },
                     {
                        "from":"1",
                        "text":"Repair that!",
                        "to":"100"
                     },
                     {
                        "from":"100",
                        "text":"That will not end good for you...",
                        "to":"1000"
                     },
                     {
                        "from":"1000",
                        "text":"You have lost the match.",
                        "to":"99999999"
                     }
                  ],
                  "span":4,
                  "sparkline":{
                     "fillColor":"rgba(31, 118, 189, 0.18)",
                     "full":false,
                     "lineColor":"rgb(31, 120, 193)",
                     "show":false
                  },
                  "tableColumn":"",
                  "targets":[
                     {
                        "expr":"sum(rate(http_response_time_count{handler=\"xyz\", status=~\"4[0-9]{2}\"}[1m]))",
                        "format":"time_series",
                        "intervalFactor":1,
                        "refId":"A",
                        "step":2
                     }
                  ],
                  "thresholds":"1,1000",
                  "timeFrom":null,
                  "timeShift":null,
                  "title":"",
                  "type":"singlestat",
                  "valueFontSize":"70%",
                  "valueMaps":[
                     {
                        "op":"=",
                        "text":"0",
                        "value":"null"
                     }
                  ],
                  "valueName":"current"
               }
            ],
            "repeat":null,
            "repeatIteration":null,
            "repeatRowId":null,
            "showTitle":false,
            "title":"SLA quantiles",
            "titleSize":"h6"
         }
      ],
      "schemaVersion":14,
      "style":"dark",
      "tags":[

      ],
      "templating":{
         "list":[

         ]
      },
      "time":{
         "from":"now-1h",
         "to":"now"
      },
      "timepicker":{
         "refresh_intervals":[
            "5s",
            "10s",
            "30s",
            "1m",
            "5m",
            "15m",
            "30m",
            "1h",
            "2h",
            "1d"
         ],
         "time_options":[
            "5m",
            "15m",
            "1h",
            "6h",
            "12h",
            "24h",
            "2d",
            "7d",
            "30d"
         ]
      },
      "timezone":"utc",
      "title":"Microservice | XYZ | Overview | Current Values | M",
      "version":1
   }
}
有人知道我如何解决这个问题吗?更改版本有助于防止版本不匹配错误(这应该只是一种解决方法)


信息:导入的grafana实例与导出实例不同。但它的版本与数据源完全相同。

您尝试导入的仪表板json有
id
字段(
“id”:3
),json中有
id
字段意味着您正试图更新现有仪表板

仪表板属于plugin Prometheus。错误是因为不允许您更新属于数据源或插件的仪表板


要导入新的仪表板,只需删除id字段,Grafana将使用导入的json创建一个新仪表板(并为其分配一个新id)。

…但是我们如何使用id更新现有仪表板?Web UI会给出“是否要覆盖”提示。@bryn您的意思是通过Grafana API更新后,在Grafana中打开更新的仪表板时会收到覆盖警告吗?或者你是在问其他问题?不,我只是想通过API覆盖。现在我看到您可以在请求中设置一个属性:
“overwrite”:true
-这应该可以帮我解决:)
curl --fail --insecure --user $USER:$PASSWORD --request "GET" "$TARGET/api/search" --header "Accept: application/json" | jq -r '.[].uri | select(. | startswith("db/"))' > /tmp/grafanaDashboards.txt

while read F  ; do
   FILENAME=$(basename "$F").json
   OUT=$(curl --silent --fail --insecure --user $USER:$PASSWORD --request "GET" "$TARGET/api/dashboards/$F" --header "Accept: application/json" --output "$FILENAME" --write-out '%{http_code}') 2>/dev/null
done </tmp/grafanaDashboards.txt || exit 1
for FILENAME in $SOURCE/micro*; do
   OUT=$(curl --fail --insecure --user $USER:$PASSWORD --request "POST" "$TARGET/api/dashboards/db" --header "Content-Type: application/json" --data-binary @$FILENAME --write-out '%{http_code}')
done || exit 1
{
   "meta":{
      "type":"db",
      "canSave":true,
      "canEdit":true,
      "canStar":true,
      "slug":"microservice-xyz-overview-current-values-m",
      "expires":"0001-01-01T00:00:00Z",
      "created":"2017-11-22T17:41:12Z",
      "updated":"2017-11-22T17:41:12Z",
      "updatedBy":"admin",
      "createdBy":"admin",
      "version":1
   },
   "dashboard":{
      "annotations":{
         "list":[
            {
               "builtIn":1,
               "datasource":"-- Grafana --",
               "enable":true,
               "hide":true,
               "iconColor":"rgba(0, 211, 255, 1)",
               "name":"Annotations \u0026 Alerts",
               "type":"dashboard"
            }
         ]
      },
      "editable":true,
      "gnetId":null,
      "graphTooltip":0,
      "hideControls":false,
      "id":3,
      "links":[

      ],
      "refresh":"5s",
      "rows":[
         {
            "collapse":false,
            "height":"180",
            "panels":[
               {
                  "cacheTimeout":null,
                  "colorBackground":true,
                  "colorValue":false,
                  "colors":[
                     "rgba(50, 172, 45, 0.97)",
                     "rgba(237, 129, 40, 0.89)",
                     "rgba(245, 54, 54, 0.9)"
                  ],
                  "datasource":"Prometheus",
                  "description":"Average of all 95th percentile of last minute.",
                  "format":"s",
                  "gauge":{
                     "maxValue":1000,
                     "minValue":0,
                     "show":false,
                     "thresholdLabels":true,
                     "thresholdMarkers":true
                  },
                  "hideTimeOverride":false,
                  "id":11,
                  "interval":null,
                  "links":[

                  ],
                  "mappingType":1,
                  "mappingTypes":[
                     {
                        "name":"value to text",
                        "value":1
                     },
                     {
                        "name":"range to text",
                        "value":2
                     }
                  ],
                  "maxDataPoints":100,
                  "nullPointMode":"connected",
                  "nullText":null,
                  "postfix":"",
                  "postfixFontSize":"50%",
                  "prefix":"",
                  "prefixFontSize":"50%",
                  "rangeMaps":[
                     {
                        "from":"null",
                        "text":"N/A",
                        "to":"null"
                     }
                  ],
                  "span":4,
                  "sparkline":{
                     "fillColor":"rgba(255, 255, 255, 0.08)",
                     "full":true,
                     "lineColor":"rgb(255, 255, 255)",
                     "show":true
                  },
                  "tableColumn":"handler",
                  "targets":[
                     {
                        "expr":"avg(http_response_time{status=~\"2[0-9]{2}\", handler=\"xyz\", quantile=\"0.95\"})",
                        "format":"time_series",
                        "interval":"15s",
                        "intervalFactor":1,
                        "refId":"A",
                        "step":15
                     }
                  ],
                  "thresholds":"400,500",
                  "timeFrom":null,
                  "title":"95-th response time",
                  "type":"singlestat",
                  "valueFontSize":"120%",
                  "valueMaps":[
                     {
                        "op":"=",
                        "text":"0",
                        "value":"null"
                     }
                  ],
                  "valueName":"current"
               },
               {
                  "cacheTimeout":null,
                  "colorBackground":true,
                  "colorValue":false,
                  "colors":[
                     "rgba(245, 54, 54, 0.9)",
                     "rgba(237, 129, 40, 0.89)",
                     "rgba(50, 172, 45, 0.97)"
                  ],
                  "datasource":"Prometheus",
                  "description":"Number of running xyzz/xyzzz services.",
                  "format":"short",
                  "gauge":{
                     "maxValue":10,
                     "minValue":0,
                     "show":false,
                     "thresholdLabels":false,
                     "thresholdMarkers":true
                  },
                  "hideTimeOverride":false,
                  "id":17,
                  "interval":null,
                  "links":[

                  ],
                  "mappingType":1,
                  "mappingTypes":[
                     {
                        "name":"value to text",
                        "value":1
                     },
                     {
                        "name":"range to text",
                        "value":2
                     }
                  ],
                  "maxDataPoints":100,
                  "nullPointMode":"connected",
                  "nullText":null,
                  "postfix":"",
                  "postfixFontSize":"50%",
                  "prefix":"",
                  "prefixFontSize":"50%",
                  "rangeMaps":[
                     {
                        "from":"null",
                        "text":"N/A",
                        "to":"null"
                     }
                  ],
                  "span":4,
                  "sparkline":{
                     "fillColor":"rgba(255, 255, 255, 0.18)",
                     "full":true,
                     "lineColor":"rgb(255, 255, 255)",
                     "show":true
                  },
                  "tableColumn":"",
                  "targets":[
                     {
                        "expr":"sum(up{job=~\"xyzz|xyzzz\"})",
                        "format":"time_series",
                        "interval":"",
                        "intervalFactor":1,
                        "refId":"A",
                        "step":1
                     }
                  ],
                  "thresholds":"2,2",
                  "timeFrom":null,
                  "title":"running instances",
                  "type":"singlestat",
                  "valueFontSize":"120%",
                  "valueMaps":[
                     {
                        "op":"=",
                        "text":"N/A",
                        "value":"null"
                     }
                  ],
                  "valueName":"current"
               },
               {
                  "cacheTimeout":null,
                  "colorBackground":true,
                  "colorValue":false,
                  "colors":[
                     "rgba(50, 172, 45, 0.97)",
                     "rgba(237, 129, 40, 0.89)",
                     "rgba(245, 54, 54, 0.9)"
                  ],
                  "datasource":"Prometheus",
                  "format":"none",
                  "gauge":{
                     "maxValue":100,
                     "minValue":0,
                     "show":false,
                     "thresholdLabels":false,
                     "thresholdMarkers":true
                  },
                  "id":22,
                  "interval":null,
                  "links":[

                  ],
                  "mappingType":1,
                  "mappingTypes":[
                     {
                        "name":"value to text",
                        "value":1
                     },
                     {
                        "name":"range to text",
                        "value":2
                     }
                  ],
                  "maxDataPoints":100,
                  "nullPointMode":"connected",
                  "nullText":null,
                  "postfix":"",
                  "postfixFontSize":"50%",
                  "prefix":"",
                  "prefixFontSize":"50%",
                  "rangeMaps":[
                     {
                        "from":"null",
                        "text":"N/A",
                        "to":"null"
                     }
                  ],
                  "span":4,
                  "sparkline":{
                     "fillColor":"rgba(255, 255, 255, 0.18)",
                     "full":true,
                     "lineColor":"rgb(255, 255, 255)",
                     "show":true
                  },
                  "tableColumn":"handler",
                  "targets":[
                     {
                        "expr":"sum(rate(http_response_time_count{handler=\"xyz\", status=~\"2[0-9]{2}\"}[1m]))",
                        "format":"time_series",
                        "intervalFactor":1,
                        "legendFormat":"",
                        "metric":"http_response_time_count",
                        "refId":"A",
                        "step":30
                     }
                  ],
                  "thresholds":"1000,3000",
                  "timeFrom":null,
                  "title":"HTTP-2XX / min",
                  "type":"singlestat",
                  "valueFontSize":"120%",
                  "valueMaps":[
                     {
                        "op":"=",
                        "text":"N/A",
                        "value":"null"
                     }
                  ],
                  "valueName":"current"
               }
            ],
            "repeat":null,
            "repeatIteration":null,
            "repeatRowId":null,
            "showTitle":false,
            "title":"Dashboard Row",
            "titleSize":"h6"
         },
         {
            "collapse":false,
            "height":"180",
            "panels":[
               {
                  "cacheTimeout":null,
                  "colorBackground":true,
                  "colorValue":false,
                  "colors":[
                     "rgba(50, 172, 45, 0.97)",
                     "rgba(237, 129, 40, 0.89)",
                     "rgba(245, 54, 54, 0.9)"
                  ],
                  "datasource":"Prometheus",
                  "decimals":null,
                  "format":"short",
                  "gauge":{
                     "maxValue":100,
                     "minValue":0,
                     "show":false,
                     "thresholdLabels":false,
                     "thresholdMarkers":true
                  },
                  "hideTimeOverride":false,
                  "id":20,
                  "interval":null,
                  "links":[

                  ],
                  "mappingType":1,
                  "mappingTypes":[
                     {
                        "name":"value to text",
                        "value":1
                     },
                     {
                        "name":"range to text",
                        "value":2
                     }
                  ],
                  "maxDataPoints":100,
                  "nullPointMode":"connected",
                  "nullText":null,
                  "postfix":"",
                  "postfixFontSize":"50%",
                  "prefix":"",
                  "prefixFontSize":"50%",
                  "rangeMaps":[
                     {
                        "from":"null",
                        "text":"N/A",
                        "to":"null"
                     }
                  ],
                  "span":4,
                  "sparkline":{
                     "fillColor":"rgba(255, 255, 255, 0.18)",
                     "full":true,
                     "lineColor":"rgb(255, 255, 255)",
                     "show":true
                  },
                  "tableColumn":"",
                  "targets":[
                     {
                        "expr":"sum(rate(http_response_time_count{handler=\"xyz\", status=~\"4[0-9]{2}\"}[1m]))",
                        "format":"time_series",
                        "intervalFactor":1,
                        "refId":"A",
                        "step":2
                     }
                  ],
                  "thresholds":"100",
                  "timeFrom":null,
                  "timeShift":null,
                  "title":"HTTP-4XX / min",
                  "type":"singlestat",
                  "valueFontSize":"120%",
                  "valueMaps":[
                     {
                        "op":"=",
                        "text":"N/A",
                        "value":"null"
                     }
                  ],
                  "valueName":"diff"
               },
               {
                  "cacheTimeout":null,
                  "colorBackground":true,
                  "colorValue":false,
                  "colors":[
                     "rgba(50, 172, 45, 0.97)",
                     "rgba(237, 129, 40, 0.89)",
                     "rgba(245, 54, 54, 0.9)"
                  ],
                  "datasource":"Prometheus",
                  "format":"short",
                  "gauge":{
                     "maxValue":100,
                     "minValue":0,
                     "show":false,
                     "thresholdLabels":false,
                     "thresholdMarkers":true
                  },
                  "hideTimeOverride":false,
                  "id":18,
                  "interval":null,
                  "links":[

                  ],
                  "mappingType":1,
                  "mappingTypes":[
                     {
                        "name":"value to text",
                        "value":1
                     },
                     {
                        "name":"range to text",
                        "value":2
                     }
                  ],
                  "maxDataPoints":100,
                  "nullPointMode":"connected",
                  "nullText":null,
                  "postfix":"",
                  "postfixFontSize":"50%",
                  "prefix":"",
                  "prefixFontSize":"50%",
                  "rangeMaps":[
                     {
                        "from":"null",
                        "text":"N/A",
                        "to":"null"
                     }
                  ],
                  "span":4,
                  "sparkline":{
                     "fillColor":"rgba(255, 255, 255, 0.18)",
                     "full":true,
                     "lineColor":"rgb(255, 255, 255)",
                     "show":true
                  },
                  "tableColumn":"",
                  "targets":[
                     {
                        "expr":"sum(rate(http_response_time_count{handler=\"xyz\", status=~\"5[0-9]{2}\"}[1m]))",
                        "format":"time_series",
                        "intervalFactor":1,
                        "refId":"A",
                        "step":2
                     }
                  ],
                  "thresholds":"10,100",
                  "timeFrom":null,
                  "timeShift":null,
                  "title":"HTTP-5XX / min",
                  "type":"singlestat",
                  "valueFontSize":"120%",
                  "valueMaps":[
                     {
                        "op":"=",
                        "text":"0",
                        "value":"null"
                     }
                  ],
                  "valueName":"diff"
               },
               {
                  "cacheTimeout":null,
                  "colorBackground":true,
                  "colorValue":false,
                  "colors":[
                     "rgba(50, 172, 45, 0.97)",
                     "rgba(237, 129, 40, 0.89)",
                     "rgba(245, 54, 54, 0.9)"
                  ],
                  "datasource":"Prometheus",
                  "format":"none",
                  "gauge":{
                     "maxValue":100,
                     "minValue":0,
                     "show":false,
                     "thresholdLabels":false,
                     "thresholdMarkers":true
                  },
                  "hideTimeOverride":false,
                  "id":21,
                  "interval":null,
                  "links":[

                  ],
                  "mappingType":2,
                  "mappingTypes":[
                     {
                        "name":"value to text",
                        "value":1
                     },
                     {
                        "name":"range to text",
                        "value":2
                     }
                  ],
                  "maxDataPoints":100,
                  "nullPointMode":"connected",
                  "nullText":null,
                  "postfix":"",
                  "postfixFontSize":"50%",
                  "prefix":"",
                  "prefixFontSize":"50%",
                  "rangeMaps":[
                     {
                        "from":"null",
                        "text":"Come on. Not a single error?",
                        "to":"null"
                     },
                     {
                        "from":"0",
                        "text":"Come on. Not a single error?",
                        "to":"1"
                     },
                     {
                        "from":"1",
                        "text":"Repair that!",
                        "to":"100"
                     },
                     {
                        "from":"100",
                        "text":"That will not end good for you...",
                        "to":"1000"
                     },
                     {
                        "from":"1000",
                        "text":"You have lost the match.",
                        "to":"99999999"
                     }
                  ],
                  "span":4,
                  "sparkline":{
                     "fillColor":"rgba(31, 118, 189, 0.18)",
                     "full":false,
                     "lineColor":"rgb(31, 120, 193)",
                     "show":false
                  },
                  "tableColumn":"",
                  "targets":[
                     {
                        "expr":"sum(rate(http_response_time_count{handler=\"xyz\", status=~\"4[0-9]{2}\"}[1m]))",
                        "format":"time_series",
                        "intervalFactor":1,
                        "refId":"A",
                        "step":2
                     }
                  ],
                  "thresholds":"1,1000",
                  "timeFrom":null,
                  "timeShift":null,
                  "title":"",
                  "type":"singlestat",
                  "valueFontSize":"70%",
                  "valueMaps":[
                     {
                        "op":"=",
                        "text":"0",
                        "value":"null"
                     }
                  ],
                  "valueName":"current"
               }
            ],
            "repeat":null,
            "repeatIteration":null,
            "repeatRowId":null,
            "showTitle":false,
            "title":"SLA quantiles",
            "titleSize":"h6"
         }
      ],
      "schemaVersion":14,
      "style":"dark",
      "tags":[

      ],
      "templating":{
         "list":[

         ]
      },
      "time":{
         "from":"now-1h",
         "to":"now"
      },
      "timepicker":{
         "refresh_intervals":[
            "5s",
            "10s",
            "30s",
            "1m",
            "5m",
            "15m",
            "30m",
            "1h",
            "2h",
            "1d"
         ],
         "time_options":[
            "5m",
            "15m",
            "1h",
            "6h",
            "12h",
            "24h",
            "2d",
            "7d",
            "30d"
         ]
      },
      "timezone":"utc",
      "title":"Microservice | XYZ | Overview | Current Values | M",
      "version":1
   }
}