Grafana dashboard: SAE Job Overview
Description: 阿里云SAE任务全局大盘


{
  "__inputs": [
    {
      "name": "DS_CLOUD-PRODUCT-PROMETHEUS_CN-BEIJING_SAE_1335361019749128",
      "label": "sae",
      "description": "SAE数据源 cloud-product-prometheus_{reigonId}_sae_{userId}",
      "type": "datasource",
      "pluginId": "prometheus",
      "pluginName": "Prometheus"
    },
    {
      "name": "DS_CN-BEIJING-ALIYUN-PRODUCT-DATA-1335361019749128-CN-BEIJING-SAE_EVENT",
      "label": "sls",
      "description": "SLS数据源 cn-shenzhen-aliyun-product-data-{userId}-{reigonId}-sae_event",
      "type": "datasource",
      "pluginId": "aliyun-log-service-datasource",
      "pluginName": "log-service-datasource"
    }
  ],
  "__elements": {},
  "__requires": [
    {
      "type": "datasource",
      "id": "aliyun-log-service-datasource",
      "name": "log-service-datasource",
      "version": "2.26"
    },
    {
      "type": "grafana",
      "id": "grafana",
      "name": "Grafana",
      "version": "9.0.8"
    },
    {
      "type": "datasource",
      "id": "prometheus",
      "name": "Prometheus",
      "version": "1.0.0"
    },
    {
      "type": "panel",
      "id": "stat",
      "name": "Stat",
      "version": ""
    },
    {
      "type": "panel",
      "id": "table",
      "name": "Table",
      "version": ""
    },
    {
      "type": "panel",
      "id": "timeseries",
      "name": "Time series",
      "version": ""
    }
  ],
  "annotations": {
    "list": [
      {
        "builtIn": 1,
        "datasource": {
          "type": "datasource",
          "uid": "grafana"
        },
        "enable": false,
        "hide": true,
        "iconColor": "rgba(0, 211, 255, 1)",
        "limit": 100,
        "name": "Annotations & Alerts",
        "showIn": 0,
        "tags": [],
        "type": "dashboard"
      }
    ]
  },
  "description": "阿里云SAE任务全局大盘",
  "editable": true,
  "fiscalYearStartMonth": 0,
  "gnetId": 18556,
  "graphTooltip": 0,
  "id": null,
  "links": [],
  "liveNow": false,
  "panels": [
    {
      "collapsed": false,
      "datasource": {
        "type": "prometheus",
        "uid": "0VPlfDK4k"
      },
      "gridPos": {
        "h": 1,
        "w": 24,
        "x": 0,
        "y": 0
      },
      "id": 107,
      "panels": [],
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "0VPlfDK4k"
          },
          "refId": "A"
        }
      ],
      "title": "概览",
      "type": "row"
    },
    {
      "colorBackground": false,
      "colorValue": true,
      "colors": [
        "#299c46",
        "rgba(237, 129, 40, 0.89)",
        "#d44a3a"
      ],
      "datasource": {
        "type": "prometheus",
        "uid": "${DS_CLOUD-PRODUCT-PROMETHEUS_CN-BEIJING_SAE_1335361019749128}"
      },
      "description": "",
      "fieldConfig": {
        "defaults": {
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "dark-green",
                "value": null
              }
            ]
          }
        },
        "overrides": []
      },
      "format": "none",
      "gauge": {
        "maxValue": 100,
        "minValue": 0,
        "show": false,
        "thresholdLabels": false,
        "thresholdMarkers": true
      },
      "gridPos": {
        "h": 3,
        "w": 2,
        "x": 0,
        "y": 1
      },
      "id": 204,
      "links": [],
      "mappingType": 1,
      "mappingTypes": [
        {
          "name": "value to text",
          "value": 1
        },
        {
          "name": "range to text",
          "value": 2
        }
      ],
      "maxDataPoints": 100,
      "nullPointMode": "connected",
      "options": {
        "colorMode": "background",
        "graphMode": "area",
        "justifyMode": "auto",
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "text": {},
        "textMode": "auto"
      },
      "pluginVersion": "9.0.8",
      "postfix": "",
      "postfixFontSize": "50%",
      "prefix": "",
      "prefixFontSize": "50%",
      "rangeMaps": [
        {
          "from": "null",
          "text": "N/A",
          "to": "null"
        }
      ],
      "sparkline": {
        "fillColor": "rgba(31, 118, 189, 0.18)",
        "full": false,
        "lineColor": "rgb(31, 120, 193)",
        "show": false
      },
      "tableColumn": "",
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_CLOUD-PRODUCT-PROMETHEUS_CN-BEIJING_SAE_1335361019749128}"
          },
          "editorMode": "code",
          "exemplar": false,
          "expr": "count(count by (appId)(cpu{product=\"sae_infrastructure\",tag=\"v2\",workload=\"job\"}))",
          "instant": true,
          "interval": "",
          "legendFormat": "",
          "range": false,
          "refId": "A"
        }
      ],
      "thresholds": "",
      "title": "任务模板数",
      "type": "stat",
      "valueFontSize": "80%",
      "valueMaps": [
        {
          "op": "=",
          "text": "N/A",
          "value": "null"
        }
      ],
      "valueName": "current"
    },
    {
      "colorBackground": false,
      "colorValue": true,
      "colors": [
        "#299c46",
        "rgba(237, 129, 40, 0.89)",
        "#d44a3a"
      ],
      "datasource": {
        "type": "prometheus",
        "uid": "${DS_CLOUD-PRODUCT-PROMETHEUS_CN-BEIJING_SAE_1335361019749128}"
      },
      "description": "",
      "fieldConfig": {
        "defaults": {
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "dark-green",
                "value": null
              }
            ]
          }
        },
        "overrides": []
      },
      "format": "none",
      "gauge": {
        "maxValue": 100,
        "minValue": 0,
        "show": false,
        "thresholdLabels": false,
        "thresholdMarkers": true
      },
      "gridPos": {
        "h": 3,
        "w": 2,
        "x": 2,
        "y": 1
      },
      "id": 206,
      "links": [],
      "mappingType": 1,
      "mappingTypes": [
        {
          "name": "value to text",
          "value": 1
        },
        {
          "name": "range to text",
          "value": 2
        }
      ],
      "maxDataPoints": 100,
      "nullPointMode": "connected",
      "options": {
        "colorMode": "background",
        "graphMode": "area",
        "justifyMode": "auto",
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "textMode": "auto"
      },
      "pluginVersion": "9.0.8",
      "postfix": "",
      "postfixFontSize": "50%",
      "prefix": "",
      "prefixFontSize": "50%",
      "rangeMaps": [
        {
          "from": "null",
          "text": "N/A",
          "to": "null"
        }
      ],
      "sparkline": {
        "fillColor": "rgba(31, 118, 189, 0.18)",
        "full": false,
        "lineColor": "rgb(31, 120, 193)",
        "show": false
      },
      "tableColumn": "",
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_CLOUD-PRODUCT-PROMETHEUS_CN-BEIJING_SAE_1335361019749128}"
          },
          "editorMode": "code",
          "exemplar": false,
          "expr": "sum (count by (jobId) (job_active_count{}))",
          "instant": true,
          "interval": "",
          "legendFormat": "",
          "range": false,
          "refId": "A"
        }
      ],
      "thresholds": "",
      "title": "任务执行数",
      "type": "stat",
      "valueFontSize": "80%",
      "valueMaps": [
        {
          "op": "=",
          "text": "N/A",
          "value": "null"
        }
      ],
      "valueName": "current"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "${DS_CLOUD-PRODUCT-PROMETHEUS_CN-BEIJING_SAE_1335361019749128}"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "axisLabel": "",
            "axisPlacement": "auto",
            "barAlignment": 0,
            "drawStyle": "line",
            "fillOpacity": 17,
            "gradientMode": "none",
            "hideFrom": {
              "legend": false,
              "tooltip": false,
              "viz": false
            },
            "lineInterpolation": "linear",
            "lineStyle": {
              "fill": "solid"
            },
            "lineWidth": 2,
            "pointSize": 5,
            "scaleDistribution": {
              "type": "linear"
            },
            "showPoints": "auto",
            "spanNulls": false,
            "stacking": {
              "group": "A",
              "mode": "none"
            },
            "thresholdsStyle": {
              "mode": "off"
            }
          },
          "decimals": 0,
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          },
          "unit": "none"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 6,
        "w": 20,
        "x": 4,
        "y": 1
      },
      "id": 202,
      "options": {
        "legend": {
          "calcs": [],
          "displayMode": "list",
          "placement": "bottom"
        },
        "tooltip": {
          "mode": "single",
          "sort": "none"
        }
      },
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_CLOUD-PRODUCT-PROMETHEUS_CN-BEIJING_SAE_1335361019749128}"
          },
          "expr": "sum(job_active_count{})",
          "refId": "A"
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_CLOUD-PRODUCT-PROMETHEUS_CN-BEIJING_SAE_1335361019749128}"
          },
          "expr": "sum(job_succeeded_count{})",
          "hide": false,
          "refId": "B"
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_CLOUD-PRODUCT-PROMETHEUS_CN-BEIJING_SAE_1335361019749128}"
          },
          "expr": "sum(job_failed_count{})",
          "hide": false,
          "refId": "C"
        }
      ],
      "title": "任务执行趋势图",
      "transformations": [
        {
          "id": "seriesToColumns",
          "options": {
            "byField": "Time"
          }
        },
        {
          "id": "organize",
          "options": {
            "excludeByName": {},
            "indexByName": {},
            "renameByName": {
              "sum(app_available_replicas_count{})": "当前实例数",
              "sum(app_replicas_count{})": "目标实例数",
              "sum(job_active_count{})": "正在运行数",
              "sum(job_failed_count{})": "失败数",
              "sum(job_succeeded_count{})": "成功数"
            }
          }
        }
      ],
      "type": "timeseries"
    },
    {
      "colorBackground": false,
      "colorValue": true,
      "colors": [
        "#299c46",
        "rgba(237, 129, 40, 0.89)",
        "#d44a3a"
      ],
      "datasource": {
        "type": "prometheus",
        "uid": "${DS_CLOUD-PRODUCT-PROMETHEUS_CN-BEIJING_SAE_1335361019749128}"
      },
      "description": "",
      "fieldConfig": {
        "defaults": {
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "dark-green",
                "value": null
              }
            ]
          },
          "unit": "core"
        },
        "overrides": []
      },
      "format": "none",
      "gauge": {
        "maxValue": 100,
        "minValue": 0,
        "show": false,
        "thresholdLabels": false,
        "thresholdMarkers": true
      },
      "gridPos": {
        "h": 3,
        "w": 2,
        "x": 0,
        "y": 4
      },
      "id": 207,
      "links": [],
      "mappingType": 1,
      "mappingTypes": [
        {
          "name": "value to text",
          "value": 1
        },
        {
          "name": "range to text",
          "value": 2
        }
      ],
      "maxDataPoints": 100,
      "nullPointMode": "connected",
      "options": {
        "colorMode": "background",
        "graphMode": "area",
        "justifyMode": "auto",
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "textMode": "auto"
      },
      "pluginVersion": "9.0.8",
      "postfix": "",
      "postfixFontSize": "50%",
      "prefix": "",
      "prefixFontSize": "50%",
      "rangeMaps": [
        {
          "from": "null",
          "text": "N/A",
          "to": "null"
        }
      ],
      "sparkline": {
        "fillColor": "rgba(31, 118, 189, 0.18)",
        "full": false,
        "lineColor": "rgb(31, 120, 193)",
        "show": false
      },
      "tableColumn": "",
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_CLOUD-PRODUCT-PROMETHEUS_CN-BEIJING_SAE_1335361019749128}"
          },
          "editorMode": "code",
          "exemplar": false,
          "expr": "sum(sum by (instanceId)(cpuCore{product=\"sae_infrastructure\",tag=\"v2\",workload=\"job\"}))",
          "instant": true,
          "interval": "",
          "legendFormat": "",
          "range": false,
          "refId": "A"
        }
      ],
      "thresholds": "",
      "title": "CPU总量",
      "type": "stat",
      "valueFontSize": "80%",
      "valueMaps": [
        {
          "op": "=",
          "text": "N/A",
          "value": "null"
        }
      ],
      "valueName": "current"
    },
    {
      "colorBackground": false,
      "colorValue": true,
      "colors": [
        "#299c46",
        "rgba(237, 129, 40, 0.89)",
        "#d44a3a"
      ],
      "datasource": {
        "type": "prometheus",
        "uid": "${DS_CLOUD-PRODUCT-PROMETHEUS_CN-BEIJING_SAE_1335361019749128}"
      },
      "description": "",
      "fieldConfig": {
        "defaults": {
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "dark-green",
                "value": null
              }
            ]
          },
          "unit": "GB"
        },
        "overrides": []
      },
      "format": "none",
      "gauge": {
        "maxValue": 100,
        "minValue": 0,
        "show": false,
        "thresholdLabels": false,
        "thresholdMarkers": true
      },
      "gridPos": {
        "h": 3,
        "w": 2,
        "x": 2,
        "y": 4
      },
      "id": 208,
      "links": [],
      "mappingType": 1,
      "mappingTypes": [
        {
          "name": "value to text",
          "value": 1
        },
        {
          "name": "range to text",
          "value": 2
        }
      ],
      "maxDataPoints": 100,
      "nullPointMode": "connected",
      "options": {
        "colorMode": "background",
        "graphMode": "area",
        "justifyMode": "auto",
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "textMode": "auto"
      },
      "pluginVersion": "9.0.8",
      "postfix": "",
      "postfixFontSize": "50%",
      "prefix": "",
      "prefixFontSize": "50%",
      "rangeMaps": [
        {
          "from": "null",
          "text": "N/A",
          "to": "null"
        }
      ],
      "sparkline": {
        "fillColor": "rgba(31, 118, 189, 0.18)",
        "full": false,
        "lineColor": "rgb(31, 120, 193)",
        "show": false
      },
      "tableColumn": "",
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_CLOUD-PRODUCT-PROMETHEUS_CN-BEIJING_SAE_1335361019749128}"
          },
          "editorMode": "code",
          "exemplar": false,
          "expr": "sum(sum by (instanceId)(memoryTotalMB{product=\"sae_infrastructure\",tag=\"v2\",workload=\"job\"}))/1024",
          "instant": true,
          "interval": "",
          "legendFormat": "",
          "range": false,
          "refId": "A"
        }
      ],
      "thresholds": "",
      "title": "内存总量",
      "type": "stat",
      "valueFontSize": "80%",
      "valueMaps": [
        {
          "op": "=",
          "text": "N/A",
          "value": "null"
        }
      ],
      "valueName": "current"
    },
    {
      "collapsed": false,
      "gridPos": {
        "h": 1,
        "w": 24,
        "x": 0,
        "y": 7
      },
      "id": 190,
      "panels": [],
      "title": "事件详情",
      "type": "row"
    },
    {
      "datasource": {
        "type": "datasource",
        "uid": "-- Mixed --"
      },
      "description": "",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "custom": {
            "align": "center",
            "displayMode": "auto",
            "inspect": false
          },
          "decimals": 2,
          "mappings": [],
          "noValue": "0",
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          }
        },
        "overrides": [
          {
            "matcher": {
              "id": "byName",
              "options": "异常原因"
            },
            "properties": [
              {
                "id": "thresholds",
                "value": {
                  "mode": "absolute",
                  "steps": [
                    {
                      "color": "red",
                      "value": null
                    }
                  ]
                }
              },
              {
                "id": "custom.displayMode",
                "value": "color-background"
              },
              {
                "id": "custom.width",
                "value": 155
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "pid"
            },
            "properties": [
              {
                "id": "custom.hidden",
                "value": true
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "应用名"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 126
              },
              {
                "id": "links",
                "value": [
                  {
                    "targetBlank": true,
                    "title": "",
                    "url": "https://sae.console.aliyun.com/#/AppList/AppDetail?appId=${__data.fields.pid}"
                  }
                ]
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "命名空间"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 119
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "异常详情"
            },
            "properties": [
              {
                "id": "thresholds",
                "value": {
                  "mode": "absolute",
                  "steps": [
                    {
                      "color": "red",
                      "value": null
                    }
                  ]
                }
              },
              {
                "id": "custom.displayMode",
                "value": "color-background"
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "应用ID"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 147
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "事件原因"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 229
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 6,
        "w": 16,
        "x": 0,
        "y": 8
      },
      "id": 212,
      "options": {
        "footer": {
          "fields": "",
          "reducer": [
            "sum"
          ],
          "show": false
        },
        "showHeader": true,
        "sortBy": []
      },
      "pluginVersion": "9.0.8",
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_CLOUD-PRODUCT-PROMETHEUS_CN-BEIJING_SAE_1335361019749128}"
          },
          "editorMode": "code",
          "exemplar": false,
          "expr": "label_replace (count by (appId,appName ,namespace) (job_active_count{}),\"pid\", \"$1\", \"appId\",\"(.*)\")",
          "format": "table",
          "hide": false,
          "instant": true,
          "range": false,
          "refId": "P"
        },
        {
          "currentPage": 1,
          "datasource": {
            "type": "aliyun-log-service-datasource",
            "uid": "${DS_CN-BEIJING-ALIYUN-PRODUCT-DATA-1335361019749128-CN-BEIJING-SAE_EVENT}"
          },
          "hide": false,
          "logsPerPage": 100,
          "query": "* and level: Warning and (kind : Job or name : event* or name : manual*)   | SELECT DISTINCT app_id as pid,  reason,  max(message)  from log WHERE  app_id != '' GROUP by app_id, reason",
          "refId": "A",
          "xcol": "",
          "ycol": ""
        }
      ],
      "title": "异常事件汇总",
      "transformations": [
        {
          "id": "seriesToColumns",
          "options": {
            "byField": "pid"
          }
        },
        {
          "id": "organize",
          "options": {
            "excludeByName": {
              "Time": true,
              "Time 1": true,
              "Time 10": true,
              "Time 11": true,
              "Time 13": true,
              "Time 14": true,
              "Time 15": true,
              "Time 16": true,
              "Time 2": true,
              "Time 3": true,
              "Time 4": true,
              "Time 5": true,
              "Time 6": true,
              "Time 7": true,
              "Time 8": true,
              "Value": true,
              "Value #D": false,
              "Value #P": true,
              "appId": false,
              "appId 1": true,
              "appId 2": true,
              "appId 3": true,
              "appId 4": true,
              "appId 5": true,
              "appId 6": true,
              "appId 7": true,
              "appId 8": true,
              "namespace": false,
              "pid": false
            },
            "indexByName": {
              "Time": 5,
              "Value": 3,
              "_col2 response": 7,
              "appId": 0,
              "appName": 1,
              "namespace": 2,
              "pid": 4,
              "reason response": 6
            },
            "renameByName": {
              "Time": "",
              "Time 10": "",
              "Time 11": "",
              "Time 15": "",
              "Value": "cpu使用率",
              "Value #A": "请求数",
              "Value #B": "错误数",
              "Value #C": "平均耗时",
              "Value #D": "请求数同比",
              "Value #E": "错误数同比",
              "Value #F": "耗时同比",
              "Value #G": "实例数",
              "Value #I": "内存使用率",
              "Value #J": "cpu总",
              "Value #K": "内存总",
              "Value #L": "磁盘总",
              "Value #M": "磁盘使用率",
              "Value #N": "接收字节",
              "Value #O": "发送字节",
              "Value 1": "CPU使用率",
              "Value 2": "内存使用率",
              "_col2 response": "事件详情",
              "_col2 response1": "异常详情",
              "appId": "任务模板ID",
              "appId 1": "",
              "appId 8": "",
              "appName": "任务模板名",
              "lastTimestamp response1": "最近触发时间",
              "message response1": "异常事件",
              "name": "任务名",
              "namespace": "命名空间",
              "reason response": "事件原因",
              "reason response1": "异常原因",
              "rpc": "接口",
              "service": "应用名",
              "{service=\"sc-gateway\"}": ""
            }
          }
        },
        {
          "id": "sortBy",
          "options": {
            "fields": {},
            "sort": [
              {
                "desc": false,
                "field": "事件原因"
              }
            ]
          }
        },
        {
          "id": "filterByValue",
          "options": {
            "filters": [
              {
                "config": {
                  "id": "isNotNull",
                  "options": {}
                },
                "fieldName": "事件原因"
              },
              {
                "config": {
                  "id": "isNotNull",
                  "options": {}
                },
                "fieldName": "任务模板ID"
              }
            ],
            "match": "all",
            "type": "include"
          }
        }
      ],
      "type": "table"
    },
    {
      "datasource": {
        "type": "aliyun-log-service-datasource",
        "uid": "${DS_CN-BEIJING-ALIYUN-PRODUCT-DATA-1335361019749128-CN-BEIJING-SAE_EVENT}"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "custom": {
            "axisLabel": "",
            "axisPlacement": "auto",
            "barAlignment": 0,
            "drawStyle": "bars",
            "fillOpacity": 27,
            "gradientMode": "none",
            "hideFrom": {
              "legend": false,
              "tooltip": false,
              "viz": false
            },
            "lineInterpolation": "linear",
            "lineStyle": {
              "fill": "solid"
            },
            "lineWidth": 4,
            "pointSize": 20,
            "scaleDistribution": {
              "type": "linear"
            },
            "showPoints": "auto",
            "spanNulls": false,
            "stacking": {
              "group": "A",
              "mode": "none"
            },
            "thresholdsStyle": {
              "mode": "off"
            }
          },
          "decimals": 0,
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              }
            ]
          },
          "unit": "none"
        },
        "overrides": [
          {
            "matcher": {
              "id": "byName",
              "options": "Normal事件"
            },
            "properties": [
              {
                "id": "thresholds",
                "value": {
                  "mode": "absolute",
                  "steps": [
                    {
                      "color": "green",
                      "value": null
                    }
                  ]
                }
              },
              {
                "id": "custom.thresholdsStyle",
                "value": {
                  "mode": "line"
                }
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Warning事件"
            },
            "properties": [
              {
                "id": "thresholds",
                "value": {
                  "mode": "absolute",
                  "steps": [
                    {
                      "color": "red",
                      "value": null
                    }
                  ]
                }
              },
              {
                "id": "custom.thresholdsStyle",
                "value": {
                  "mode": "line"
                }
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 6,
        "w": 8,
        "x": 16,
        "y": 8
      },
      "id": 213,
      "options": {
        "legend": {
          "calcs": [],
          "displayMode": "list",
          "placement": "bottom"
        },
        "tooltip": {
          "mode": "single",
          "sort": "none"
        }
      },
      "targets": [
        {
          "currentPage": 1,
          "datasource": {
            "type": "aliyun-log-service-datasource",
            "uid": "${DS_CN-BEIJING-ALIYUN-PRODUCT-DATA-1335361019749128-CN-BEIJING-SAE_EVENT}"
          },
          "hide": false,
          "logsPerPage": 100,
          "query": "* and level: Warning   and (kind : Job or name : event* or name : manual*)   | select count(DISTINCT  app_id) as c, __time__-__time__%60 as t group by t",
          "refId": "A",
          "xcol": "t",
          "ycol": "c"
        },
        {
          "currentPage": 1,
          "datasource": {
            "type": "aliyun-log-service-datasource",
            "uid": "${DS_CN-BEIJING-ALIYUN-PRODUCT-DATA-1335361019749128-CN-BEIJING-SAE_EVENT}"
          },
          "hide": false,
          "logsPerPage": 100,
          "query": "* and level:Normal and (kind : Job or name : event* or name : manual*)    | select count(DISTINCT  app_id) as d, __time__-__time__%60 as t group by t",
          "refId": "B",
          "xcol": "t",
          "ycol": "d"
        }
      ],
      "title": "事件趋势图",
      "transformations": [
        {
          "id": "seriesToColumns",
          "options": {
            "byField": "time"
          }
        },
        {
          "id": "organize",
          "options": {
            "excludeByName": {},
            "indexByName": {},
            "renameByName": {
              "c": "Warning事件",
              "c response1": "异常事件",
              "d": "Normal事件",
              "d response1": "正常事件",
              "time": ""
            }
          }
        }
      ],
      "type": "timeseries"
    },
    {
      "collapsed": false,
      "datasource": {
        "type": "prometheus",
        "uid": "0VPlfDK4k"
      },
      "gridPos": {
        "h": 1,
        "w": 24,
        "x": 0,
        "y": 14
      },
      "id": 99,
      "panels": [],
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "0VPlfDK4k"
          },
          "refId": "A"
        }
      ],
      "title": "任务详情",
      "type": "row"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "${DS_CLOUD-PRODUCT-PROMETHEUS_CN-BEIJING_SAE_1335361019749128}"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "custom": {
            "align": "auto",
            "displayMode": "auto",
            "inspect": false
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          }
        },
        "overrides": [
          {
            "matcher": {
              "id": "byName",
              "options": "任务模板名称"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 166
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "命名空间"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 82
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "任务执行id"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 387
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "执行耗时"
            },
            "properties": [
              {
                "id": "noValue",
                "value": "-"
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "失败数"
            },
            "properties": [
              {
                "id": "thresholds",
                "value": {
                  "mode": "absolute",
                  "steps": [
                    {
                      "color": "green",
                      "value": null
                    },
                    {
                      "color": "red",
                      "value": 1
                    }
                  ]
                }
              },
              {
                "id": "custom.displayMode",
                "value": "color-background"
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "任务模板id"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 316
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "应用模板名"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 139
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "成功数"
            },
            "properties": [
              {
                "id": "thresholds",
                "value": {
                  "mode": "absolute",
                  "steps": [
                    {
                      "color": "green",
                      "value": null
                    }
                  ]
                }
              },
              {
                "id": "custom.displayMode",
                "value": "color-background"
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "正在执行数"
            },
            "properties": [
              {
                "id": "thresholds",
                "value": {
                  "mode": "absolute",
                  "steps": [
                    {
                      "color": "green",
                      "value": null
                    }
                  ]
                }
              },
              {
                "id": "custom.displayMode",
                "value": "color-background"
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 10,
        "w": 24,
        "x": 0,
        "y": 15
      },
      "id": 215,
      "options": {
        "footer": {
          "fields": "",
          "reducer": [
            "sum"
          ],
          "show": false
        },
        "frameIndex": 1,
        "showHeader": true,
        "sortBy": []
      },
      "pluginVersion": "9.0.8",
      "targets": [
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_CLOUD-PRODUCT-PROMETHEUS_CN-BEIJING_SAE_1335361019749128}"
          },
          "editorMode": "code",
          "exemplar": false,
          "expr": "sum by (appId,appName,namespace,jobId) (job_active_count{})",
          "format": "table",
          "instant": true,
          "range": false,
          "refId": "A"
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_CLOUD-PRODUCT-PROMETHEUS_CN-BEIJING_SAE_1335361019749128}"
          },
          "editorMode": "code",
          "exemplar": false,
          "expr": "sum by (appId,appName,namespace,jobId) (job_succeeded_count{})",
          "format": "table",
          "hide": false,
          "instant": true,
          "range": false,
          "refId": "B"
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_CLOUD-PRODUCT-PROMETHEUS_CN-BEIJING_SAE_1335361019749128}"
          },
          "editorMode": "code",
          "exemplar": false,
          "expr": "sum by (appId,appName,namespace,jobId) (job_failed_count{})",
          "format": "table",
          "hide": false,
          "instant": true,
          "range": false,
          "refId": "C"
        },
        {
          "datasource": {
            "type": "prometheus",
            "uid": "${DS_CLOUD-PRODUCT-PROMETHEUS_CN-BEIJING_SAE_1335361019749128}"
          },
          "editorMode": "code",
          "exemplar": false,
          "expr": "sum by (appId,appName,namespace,jobId) (job_cost_time{})",
          "format": "table",
          "hide": false,
          "instant": true,
          "range": false,
          "refId": "D"
        }
      ],
      "title": "任务执行明细",
      "transformations": [
        {
          "id": "seriesToColumns",
          "options": {
            "byField": "jobId"
          }
        },
        {
          "id": "organize",
          "options": {
            "excludeByName": {
              "Time 1": true,
              "Time 2": true,
              "Time 3": true,
              "Time 4": true,
              "appId 2": true,
              "appId 3": true,
              "appId 4": true,
              "appName 2": true,
              "appName 3": true,
              "appName 4": true,
              "namespace 2": true,
              "namespace 3": true,
              "namespace 4": true
            },
            "indexByName": {},
            "renameByName": {
              "Value #A": "正在执行数",
              "Value #B": "成功数",
              "Value #C": "失败数",
              "Value #D": "执行耗时",
              "appId 1": "任务模板ID",
              "appName 1": "任务模板名",
              "jobId": "任务执行ID",
              "namespace 1": "命名空间"
            }
          }
        },
        {
          "id": "sortBy",
          "options": {
            "fields": {},
            "sort": [
              {
                "desc": true,
                "field": "失败数"
              }
            ]
          }
        }
      ],
      "type": "table"
    }
  ],
  "refresh": "10s",
  "schemaVersion": 36,
  "style": "dark",
  "tags": [],
  "templating": {
    "list": []
  },
  "time": {
    "from": "now-15m",
    "to": "now"
  },
  "timepicker": {
    "refresh_intervals": [
      "10s",
      "30s",
      "1m",
      "5m",
      "15m",
      "30m",
      "1h",
      "2h",
      "1d"
    ]
  },
  "timezone": "",
  "title": "SAE Job Overview",
  "uid": "GY1R5eL4z",
  "version": 1,
  "weekStart": ""
}