kubernetes-yaml/learn/learn-kubernetes-master/kiamol/ch14/grafana/update/numbers-api/grafana-dashboard-numbers-api.yaml

188 lines
4.5 KiB
YAML
Raw Normal View History

apiVersion: v1
kind: ConfigMap
metadata:
name: grafana-dashboard-numbers-api
namespace: kiamol-ch14-monitoring
data:
numbers-api.json: |-
{
"annotations": {
"list": [
{
"builtIn": 1,
"datasource": "-- Grafana --",
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"name": "Annotations & Alerts",
"type": "dashboard"
}
]
},
"editable": true,
"gnetId": null,
"graphTooltip": 0,
"id": 3,
"links": [],
"panels": [
{
"datasource": "Prometheus",
"gridPos": {
"h": 6,
"w": 5,
"x": 0,
"y": 0
},
"id": 4,
"options": {
"colorMode": "value",
"fieldOptions": {
"calcs": [
"lastNotNull"
],
"defaults": {
"mappings": [
{
"from": "",
"id": 1,
"operator": "",
"text": "OK",
"to": "",
"type": 1,
"value": "1"
},
{
"from": "",
"id": 2,
"operator": "",
"text": "NOTOK",
"to": "",
"type": 1,
"value": "0"
}
],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "red",
"value": null
},
{
"color": "red",
"value": 0
},
{
"color": "green",
"value": 1
}
]
}
},
"overrides": [],
"values": false
},
"graphMode": "area",
"justifyMode": "auto",
"orientation": "auto"
},
"pluginVersion": "6.7.4",
"targets": [
{
"expr": "probe_success{job=\"numbers-api\"}",
"interval": "",
"legendFormat": "",
"refId": "A"
}
],
"timeFrom": null,
"timeShift": null,
"title": "Status",
"type": "stat"
},
{
"datasource": "Prometheus",
"gridPos": {
"h": 6,
"w": 4,
"x": 5,
"y": 0
},
"id": 2,
"options": {
"colorMode": "value",
"fieldOptions": {
"calcs": [
"lastNotNull"
],
"defaults": {
"mappings": [],
"thresholds": {
"mode": "absolute",
"steps": [
{
"color": "green",
"value": null
},
{
"color": "red",
"value": 400
}
]
}
},
"overrides": [],
"values": false
},
"graphMode": "area",
"justifyMode": "auto",
"orientation": "auto"
},
"pluginVersion": "6.7.4",
"targets": [
{
"expr": "probe_http_status_code{job=\"numbers-api\"}",
"interval": "",
"legendFormat": "",
"refId": "A"
}
],
"timeFrom": null,
"timeShift": null,
"title": "HTTP Status Code",
"type": "stat"
}
],
"refresh": "30s",
"schemaVersion": 22,
"style": "dark",
"tags": [],
"templating": {
"list": []
},
"time": {
"from": "now-30m",
"to": "now"
},
"timepicker": {
"refresh_intervals": [
"5s",
"10s",
"30s",
"1m",
"5m",
"15m",
"30m",
"1h",
"2h",
"1d"
]
},
"timezone": "",
"title": "Random Number API",
"uid": "Tb6isdMMk",
"variables": {
"list": []
},
"version": 1
}