Grafana dashboard: timeseries_result_ob
Description: 查看「选定算法」在「选定数据集」的「选定序列」上的异常分数、中间结果、检测耗时和指标


{
  "__inputs": [
    {
      "name": "DS_TSAD_EVALUATOR",
      "label": "TSAD_Evaluator",
      "description": "",
      "type": "datasource",
      "pluginId": "influxdb",
      "pluginName": "InfluxDB"
    }
  ],
  "__elements": [],
  "__requires": [
    {
      "type": "grafana",
      "id": "grafana",
      "name": "Grafana",
      "version": "8.4.5"
    },
    {
      "type": "datasource",
      "id": "influxdb",
      "name": "InfluxDB",
      "version": "1.0.0"
    },
    {
      "type": "panel",
      "id": "stat",
      "name": "Stat",
      "version": ""
    },
    {
      "type": "panel",
      "id": "timeseries",
      "name": "Time series",
      "version": ""
    }
  ],
  "annotations": {
    "list": [
      {
        "builtIn": 1,
        "datasource": "-- Grafana --",
        "enable": true,
        "hide": true,
        "iconColor": "rgba(0, 211, 255, 1)",
        "name": "Annotations & Alerts",
        "target": {
          "limit": 100,
          "matchAny": false,
          "tags": [],
          "type": "dashboard"
        },
        "type": "dashboard"
      },
      {
        "datasource": "${DS_TSAD_EVALUATOR}",
        "enable": true,
        "iconColor": "red",
        "name": "label",
        "query": "select label from \"$dataset@$timeseries\" where label =1"
      },
      {
        "enable": true,
        "iconColor": "blue",
        "name": "trigger",
        "query": "select * from \"$detector@$dataset@$timeseries\" where timeEnd > 0",
        "timeEndColumn": "timeEnd",
        "datasource": "${DS_TSAD_EVALUATOR}"
      }
    ]
  },
  "editable": true,
  "fiscalYearStartMonth": 0,
  "graphTooltip": 0,
  "id": null,
  "iteration": 1655101192480,
  "links": [],
  "liveNow": false,
  "panels": [
    {
      "gridPos": {
        "h": 1,
        "w": 24,
        "x": 0,
        "y": 0
      },
      "id": 20,
      "title": "Data range",
      "type": "row"
    },
    {
      "datasource": {
        "type": "influxdb",
        "uid": "${DS_TSAD_EVALUATOR}"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "continuous-blues"
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          }
        },
        "overrides": []
      },
      "gridPos": {
        "h": 4,
        "w": 12,
        "x": 0,
        "y": 1
      },
      "id": 6,
      "options": {
        "colorMode": "value",
        "graphMode": "area",
        "justifyMode": "auto",
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "/^Time$/",
          "values": false
        },
        "text": {},
        "textMode": "auto"
      },
      "pluginVersion": "8.4.5",
      "targets": [
        {
          "query": "SELECT label FROM \"$dataset@$timeseries\" limit 1",
          "rawQuery": true,
          "refId": "A"
        }
      ],
      "title": "From",
      "transparent": true,
      "type": "stat"
    },
    {
      "datasource": {
        "type": "influxdb",
        "uid": "${DS_TSAD_EVALUATOR}"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "continuous-purples"
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          }
        },
        "overrides": []
      },
      "gridPos": {
        "h": 4,
        "w": 12,
        "x": 12,
        "y": 1
      },
      "id": 8,
      "options": {
        "colorMode": "value",
        "graphMode": "area",
        "justifyMode": "auto",
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "/^Time$/",
          "values": false
        },
        "text": {},
        "textMode": "auto"
      },
      "pluginVersion": "8.4.5",
      "targets": [
        {
          "query": "SELECT label FROM \"$dataset@$timeseries\" order by time desc limit 1",
          "rawQuery": true,
          "refId": "A"
        }
      ],
      "title": "To",
      "transparent": true,
      "type": "stat"
    },
    {
      "gridPos": {
        "h": 1,
        "w": 24,
        "x": 0,
        "y": 5
      },
      "id": 18,
      "title": "Cost time",
      "type": "row"
    },
    {
      "fieldConfig": {
        "defaults": {
          "color": {
            "fixedColor": "orange",
            "mode": "fixed"
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              }
            ]
          },
          "unit": "s"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 3,
        "w": 24,
        "x": 0,
        "y": 6
      },
      "id": 10,
      "options": {
        "colorMode": "value",
        "graphMode": "area",
        "justifyMode": "center",
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "text": {},
        "textMode": "auto"
      },
      "pluginVersion": "8.4.5",
      "targets": [
        {
          "alias": "$col",
          "datasource": {
            "type": "influxdb",
            "uid": "${DS_TSAD_EVALUATOR}"
          },
          "query": "SELECT TrainTime, TestTime, PullTime FROM \"result_ts_meta\" WHERE  \"name\" = '$detector@$dataset@$timeseries' ",
          "rawQuery": true,
          "refId": "A",
          "resultFormat": "table"
        }
      ],
      "transparent": true,
      "type": "stat"
    },
    {
      "gridPos": {
        "h": 1,
        "w": 24,
        "x": 0,
        "y": 9
      },
      "id": 16,
      "title": "Detect result",
      "type": "row"
    },
    {
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "axisLabel": "",
            "axisPlacement": "auto",
            "barAlignment": 0,
            "drawStyle": "line",
            "fillOpacity": 0,
            "gradientMode": "none",
            "hideFrom": {
              "legend": false,
              "tooltip": false,
              "viz": false
            },
            "lineInterpolation": "linear",
            "lineWidth": 1,
            "pointSize": 5,
            "scaleDistribution": {
              "type": "linear"
            },
            "showPoints": "auto",
            "spanNulls": false,
            "stacking": {
              "group": "A",
              "mode": "none"
            },
            "thresholdsStyle": {
              "mode": "off"
            }
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          }
        },
        "overrides": []
      },
      "gridPos": {
        "h": 12,
        "w": 24,
        "x": 0,
        "y": 10
      },
      "id": 2,
      "options": {
        "legend": {
          "calcs": [],
          "displayMode": "list",
          "placement": "bottom"
        },
        "tooltip": {
          "mode": "single",
          "sort": "none"
        }
      },
      "targets": [
        {
          "alias": "$col",
          "datasource": {
            "type": "influxdb",
            "uid": "${DS_TSAD_EVALUATOR}"
          },
          "hide": false,
          "query": "SELECT ${data_dim:doublequote} FROM \"$dataset@$timeseries\" WHERE $timeFilter \n",
          "rawQuery": true,
          "refId": "B",
          "resultFormat": "time_series"
        }
      ],
      "title": "Data",
      "transparent": true,
      "type": "timeseries"
    },
    {
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "axisLabel": "",
            "axisPlacement": "auto",
            "barAlignment": 0,
            "drawStyle": "line",
            "fillOpacity": 0,
            "gradientMode": "none",
            "hideFrom": {
              "legend": false,
              "tooltip": false,
              "viz": false
            },
            "lineInterpolation": "linear",
            "lineWidth": 1,
            "pointSize": 5,
            "scaleDistribution": {
              "type": "linear"
            },
            "showPoints": "auto",
            "spanNulls": false,
            "stacking": {
              "group": "A",
              "mode": "none"
            },
            "thresholdsStyle": {
              "mode": "off"
            }
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          }
        },
        "overrides": []
      },
      "gridPos": {
        "h": 12,
        "w": 24,
        "x": 0,
        "y": 22
      },
      "id": 22,
      "options": {
        "legend": {
          "calcs": [],
          "displayMode": "list",
          "placement": "bottom"
        },
        "tooltip": {
          "mode": "single",
          "sort": "none"
        }
      },
      "targets": [
        {
          "alias": "$col",
          "datasource": {
            "type": "influxdb",
            "uid": "${DS_TSAD_EVALUATOR}"
          },
          "query": "SELECT ${result_dim:doublequote} FROM \"$detector@$dataset@$timeseries\" WHERE $timeFilter",
          "rawQuery": true,
          "refId": "A",
          "resultFormat": "time_series"
        }
      ],
      "title": "Result",
      "transparent": true,
      "type": "timeseries"
    },
    {
      "collapsed": false,
      "gridPos": {
        "h": 1,
        "w": 24,
        "x": 0,
        "y": 34
      },
      "id": 14,
      "panels": [],
      "title": "Metric",
      "type": "row"
    },
    {
      "datasource": {
        "type": "influxdb",
        "uid": "${DS_TSAD_EVALUATOR}"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 0
              },
              {
                "color": "#EAB839",
                "value": 0.5
              },
              {
                "color": "green",
                "value": 0.8
              }
            ]
          },
          "unit": "none"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 5,
        "w": 24,
        "x": 0,
        "y": 35
      },
      "id": 4,
      "options": {
        "colorMode": "value",
        "graphMode": "area",
        "justifyMode": "center",
        "orientation": "vertical",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "text": {},
        "textMode": "value_and_name"
      },
      "pluginVersion": "8.4.5",
      "targets": [
        {
          "alias": "$col",
          "query": "SELECT /.*[^time]$/ FROM \"result_ts_meta\" WHERE  \"name\" = '$detector@$dataset@$timeseries' ",
          "rawQuery": true,
          "refId": "A",
          "resultFormat": "table"
        }
      ],
      "transparent": true,
      "type": "stat"
    }
  ],
  "refresh": false,
  "schemaVersion": 35,
  "style": "dark",
  "tags": [],
  "templating": {
    "list": [
      {
        "current": {},
        "datasource": {
          "type": "influxdb",
          "uid": "${DS_TSAD_EVALUATOR}"
        },
        "definition": "select ds_name from (select * from result_ts_meta )",
        "hide": 0,
        "includeAll": false,
        "multi": false,
        "name": "dataset",
        "options": [],
        "query": "select ds_name from (select * from result_ts_meta )",
        "refresh": 1,
        "regex": "",
        "skipUrlSync": false,
        "sort": 0,
        "type": "query"
      },
      {
        "current": {},
        "datasource": {
          "type": "influxdb",
          "uid": "${DS_TSAD_EVALUATOR}"
        },
        "definition": "select ts_name from (select * from result_ts_meta where ds_name = '$dataset')",
        "hide": 0,
        "includeAll": false,
        "multi": false,
        "name": "timeseries",
        "options": [],
        "query": "select ts_name from (select * from result_ts_meta where ds_name = '$dataset')",
        "refresh": 1,
        "regex": "",
        "skipUrlSync": false,
        "sort": 0,
        "type": "query"
      },
      {
        "current": {},
        "datasource": {
          "type": "influxdb",
          "uid": "${DS_TSAD_EVALUATOR}"
        },
        "definition": "show field keys from \"$dataset@$timeseries\" ",
        "hide": 0,
        "includeAll": false,
        "multi": true,
        "name": "data_dim",
        "options": [],
        "query": "show field keys from \"$dataset@$timeseries\" ",
        "refresh": 1,
        "regex": "^(?!label).*$",
        "skipUrlSync": false,
        "sort": 0,
        "type": "query"
      },
      {
        "current": {},
        "definition": "select detector_name from (select * from result_ts_meta where \"ds_name\"='$dataset' and \"ts_name\"='$timeseries')",
        "hide": 0,
        "includeAll": false,
        "multi": false,
        "name": "detector",
        "options": [],
        "query": "select detector_name from (select * from result_ts_meta where \"ds_name\"='$dataset' and \"ts_name\"='$timeseries')",
        "refresh": 1,
        "regex": "",
        "skipUrlSync": false,
        "sort": 0,
        "type": "query",
        "datasource": "${DS_TSAD_EVALUATOR}"
      },
      {
        "current": {},
        "definition": "show field keys from \"$detector@$dataset@$timeseries\" ",
        "hide": 0,
        "includeAll": false,
        "multi": true,
        "name": "result_dim",
        "options": [],
        "query": "show field keys from \"$detector@$dataset@$timeseries\" ",
        "refresh": 1,
        "regex": "/.*(?<!label)(?<!timeEnd)$/",
        "skipUrlSync": false,
        "sort": 0,
        "type": "query",
        "datasource": "${DS_TSAD_EVALUATOR}"
      }
    ]
  },
  "time": {
    "from": "2014-11-18T15:54:05.685Z",
    "to": "2015-02-09T12:30:13.557Z"
  },
  "timepicker": {},
  "timezone": "",
  "title": "timeseries_result_ob",
  "uid": "LRcc38Lnk",
  "version": 7,
  "weekStart": "",
  "gnetId": 16435,
  "description": "查看「选定算法」在「选定数据集」的「选定序列」上的异常分数、中间结果、检测耗时和指标"
}