Oracledb_Dashboard_202210
Oracle dashboard monitors db status, active sessions, user commits, wait times and more. 
监控图作者：蒋勇

监控oracle的exporter：https://github.com/iamseth/oracledb_exporter

替换default-metrics.toml用的文件：https://github.com/saitiger008/oracledb_exporter_metrics

如果GitHub不好打开，备选：

https://gitee.com/mirrors_iamseth/oracledb_exporter_1
https://gitee.com/laosai/oracledb_exporter_metrics

注意：

a）监控不同版本的数据库，需要装不同版本的客户端，我目前测试的大版本一致就行，我现在采集服务器装了11g、12c、18c的；可能12c也能兼容18c，没测试。

b）数据库监控账户，我使用的是自带的dbsnmp，这个账户实际上有dba的权限；实际上权限取决于default-metrics.toml文件中的指标采集sql需要的权限。

c）监控账户密码不能带%，带的话会报错；

d）CDB\PDB容器数据库未测试，目前我监控的都是传统数据库；

e）有问题请反馈至https://github.com/saitiger008/oracledb_exporter_metrics
Oracle dashboard monitors db status, active sessions, user commits, wait times and more.
{
  "__inputs": [
    {
      "name": "DS_PROMETHEUS",
      "label": "Prometheus",
      "description": "",
      "type": "datasource",
      "pluginId": "prometheus",
      "pluginName": "Prometheus"
    }
  ],
  "__elements": [],
  "__requires": [
    {
      "type": "panel",
      "id": "gauge",
      "name": "Gauge",
      "version": ""
    },
    {
      "type": "grafana",
      "id": "grafana",
      "name": "Grafana",
      "version": "8.4.0"
    },
    {
      "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": "-- Grafana --",
        "enable": true,
        "hide": true,
        "iconColor": "rgba(0, 211, 255, 1)",
        "name": "Annotations & Alerts",
        "target": {
          "limit": 100,
          "matchAny": false,
          "tags": [],
          "type": "dashboard"
        },
        "type": "dashboard"
      }
    ]
  },
  "description": "Oracle dashboard monitors db status, active sessions, user commits, wait times and more. ",
  "editable": true,
  "fiscalYearStartMonth": 0,
  "gnetId": 17136,
  "graphTooltip": 1,
  "id": null,
  "iteration": 1665124988522,
  "links": [
    {
      "asDropdown": true,
      "icon": "external link",
      "tags": [],
      "type": "dashboards"
    }
  ],
  "liveNow": false,
  "panels": [
    {
      "collapsed": false,
      "gridPos": {
        "h": 1,
        "w": 24,
        "x": 0,
        "y": 0
      },
      "id": 84,
      "panels": [],
      "title": "资源总览（关联JOB项）当前选中：$host，数据库：$oracle_instance",
      "type": "row"
    },
    {
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "custom": {
            "align": "left",
            "displayMode": "auto",
            "minWidth": 100
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          }
        },
        "overrides": [
          {
            "matcher": {
              "id": "byName",
              "options": "实例类型"
            },
            "properties": [
              {
                "id": "mappings",
                "value": [
                  {
                    "options": {
                      "0": {
                        "index": 0,
                        "text": "单实例"
                      },
                      "1": {
                        "index": 1,
                        "text": "RAC"
                      }
                    },
                    "type": "value"
                  }
                ]
              },
              {
                "id": "custom.width",
                "value": 80
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "数据量"
            },
            "properties": [
              {
                "id": "unit",
                "value": "bytes"
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "运行时长"
            },
            "properties": [
              {
                "id": "unit",
                "value": "d"
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "闪回"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 80
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "归档模式"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 133
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "状态"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 72
              },
              {
                "id": "thresholds",
                "value": {
                  "mode": "absolute",
                  "steps": [
                    {
                      "color": "orange",
                      "value": null
                    },
                    {
                      "color": "red",
                      "value": 0
                    },
                    {
                      "color": "green",
                      "value": 1
                    }
                  ]
                }
              },
              {
                "id": "custom.displayMode",
                "value": "color-background-solid"
              },
              {
                "id": "mappings",
                "value": [
                  {
                    "options": {
                      "0": {
                        "index": 1,
                        "text": "DOWN"
                      },
                      "1": {
                        "index": 0,
                        "text": "UP"
                      }
                    },
                    "type": "value"
                  }
                ]
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "平台"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 129
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "实例名"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 104
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "字符集"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 123
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "是否有DG"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 78
              },
              {
                "id": "mappings",
                "value": [
                  {
                    "options": {
                      "0": {
                        "index": 0,
                        "text": "NO"
                      },
                      "1": {
                        "index": 1,
                        "text": "YES"
                      }
                    },
                    "type": "value"
                  }
                ]
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "DG状态"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 67
              },
              {
                "id": "mappings",
                "value": [
                  {
                    "options": {
                      "0": {
                        "color": "transparent",
                        "index": 0,
                        "text": "#"
                      },
                      "1": {
                        "color": "red",
                        "index": 1,
                        "text": "ERR"
                      },
                      "2": {
                        "color": "green",
                        "index": 2,
                        "text": "OK"
                      }
                    },
                    "type": "value"
                  }
                ]
              },
              {
                "id": "custom.displayMode",
                "value": "color-background-solid"
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 6,
        "w": 24,
        "x": 0,
        "y": 1
      },
      "id": 82,
      "options": {
        "footer": {
          "fields": "",
          "reducer": [
            "sum"
          ],
          "show": false
        },
        "frameIndex": 0,
        "showHeader": true,
        "sortBy": []
      },
      "pluginVersion": "8.4.0",
      "targets": [
        {
          "exemplar": true,
          "expr": "oracledb_env_version{job=\"$job\"}",
          "format": "table",
          "instant": true,
          "interval": "",
          "legendFormat": "",
          "refId": "A"
        },
        {
          "exemplar": true,
          "expr": "oracledb_env_is_rac{job=\"$job\"}",
          "format": "table",
          "hide": false,
          "instant": true,
          "interval": "",
          "legendFormat": "",
          "refId": "B"
        },
        {
          "exemplar": true,
          "expr": "oracledb_env_value{job=\"$job\"}",
          "format": "table",
          "hide": false,
          "instant": true,
          "interval": "",
          "legendFormat": "",
          "refId": "C"
        },
        {
          "exemplar": true,
          "expr": "oracledb_env_running_time{job=\"$job\"}",
          "format": "table",
          "hide": false,
          "instant": true,
          "interval": "",
          "legendFormat": "",
          "refId": "D"
        },
        {
          "exemplar": true,
          "expr": "oracledb_env_vols{job=\"$job\"}",
          "format": "table",
          "hide": false,
          "instant": true,
          "interval": "",
          "legendFormat": "",
          "refId": "E"
        },
        {
          "exemplar": true,
          "expr": "oracledb_up{job=\"$job\"}",
          "format": "table",
          "hide": false,
          "instant": true,
          "interval": "",
          "legendFormat": "",
          "refId": "F"
        },
        {
          "exemplar": true,
          "expr": "oracledb_dataguard_exist_value{job=\"$job\"}",
          "format": "table",
          "hide": false,
          "instant": true,
          "interval": "",
          "legendFormat": "",
          "refId": "G"
        },
        {
          "exemplar": true,
          "expr": "oracledb_dataguard_status_value{job=\"$job\"}",
          "format": "table",
          "hide": false,
          "instant": true,
          "interval": "",
          "legendFormat": "",
          "refId": "H"
        }
      ],
      "title": "数据库总览",
      "transformations": [
        {
          "id": "seriesToColumns",
          "options": {
            "byField": "instance"
          }
        },
        {
          "id": "filterFieldsByName",
          "options": {
            "include": {
              "names": [
                "host_name",
                "oracle_instance 1",
                "oracle_ip 1",
                "Value #B",
                "database_role",
                "flashback_on",
                "force_logging",
                "log_mode",
                "nls_characterset",
                "open_mode",
                "platform_name",
                "version",
                "Value #D",
                "Value #E",
                "Value #F",
                "Value #G",
                "Value #H"
              ]
            }
          }
        },
        {
          "id": "organize",
          "options": {
            "excludeByName": {},
            "indexByName": {
              "Value #B": 3,
              "Value #D": 7,
              "Value #E": 9,
              "Value #F": 5,
              "database_role": 10,
              "flashback_on": 11,
              "force_logging": 12,
              "host_name": 2,
              "log_mode": 13,
              "nls_characterset": 14,
              "open_mode": 8,
              "oracle_instance 1": 4,
              "oracle_ip 1": 0,
              "platform_name": 1,
              "version": 6
            },
            "renameByName": {
              "Value #A": "数据库版本",
              "Value #B": "实例类型",
              "Value #C": "",
              "Value #D": "运行时长",
              "Value #E": "数据量",
              "Value #F": "状态",
              "Value #G": "是否有DG",
              "Value #H": "DG状态",
              "Value #I": "数据量",
              "database_role": "实例角色",
              "flashback_on": "闪回",
              "force_logging": "",
              "host_name": "主机名",
              "host_name 1": "主机名",
              "log_mode": "归档模式",
              "nls_characterset": "字符集",
              "open_mode": "",
              "oracle_instance 1": "实例名",
              "oracle_ip 1": "IP",
              "platform_name": "平台",
              "version": ""
            }
          }
        }
      ],
      "type": "table"
    },
    {
      "collapsed": false,
      "gridPos": {
        "h": 1,
        "w": 24,
        "x": 0,
        "y": 7
      },
      "id": 69,
      "panels": [],
      "repeat": "oracle_instance",
      "title": "服务器：【$host】数据库：【$oracle_instance】",
      "type": "row"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "${DS_PROMETHEUS}"
      },
      "description": "No data表示oracledb_exporter进程宕掉或其他异常",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "mappings": [
            {
              "options": {
                "0": {
                  "index": 0,
                  "text": "DOWN"
                },
                "1": {
                  "index": 1,
                  "text": "UP"
                }
              },
              "type": "value"
            }
          ],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "rgba(245, 54, 54, 0.9)",
                "value": null
              },
              {
                "color": "red",
                "value": 0
              },
              {
                "color": "green",
                "value": 1
              }
            ]
          },
          "unit": "none"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 6,
        "w": 3,
        "x": 0,
        "y": 8
      },
      "id": 12,
      "interval": "$interval",
      "links": [],
      "maxDataPoints": 100,
      "options": {
        "colorMode": "value",
        "graphMode": "area",
        "justifyMode": "auto",
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "text": {},
        "textMode": "auto"
      },
      "pluginVersion": "8.4.0",
      "targets": [
        {
          "calculatedInterval": "10m",
          "datasourceErrors": {},
          "errors": {},
          "exemplar": true,
          "expr": "oracledb_up{oracle_ip=~\"$host\",oracle_instance=\"$oracle_instance\",job=\"$job\"}",
          "format": "table",
          "hide": false,
          "instant": true,
          "interval": "5m",
          "intervalFactor": 1,
          "legendFormat": "",
          "metric": "",
          "refId": "A",
          "step": 300
        }
      ],
      "title": "数据库状态",
      "type": "stat"
    },
    {
      "datasource": {
        "type": "prometheus",
        "uid": "${DS_PROMETHEUS}"
      },
      "description": "No data表示oracledb_exporter进程宕掉或其他异常",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "mappings": [
            {
              "options": {
                "0": {
                  "index": 0,
                  "text": "ERR"
                },
                "1": {
                  "index": 1,
                  "text": "OK"
                }
              },
              "type": "value"
            }
          ],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "rgba(245, 54, 54, 0.9)",
                "value": null
              },
              {
                "color": "red",
                "value": 0
              },
              {
                "color": "green",
                "value": 1
              }
            ]
          },
          "unit": "none"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 6,
        "w": 3,
        "x": 3,
        "y": 8
      },
      "id": 186,
      "interval": "$interval",
      "links": [],
      "maxDataPoints": 100,
      "options": {
        "colorMode": "value",
        "graphMode": "area",
        "justifyMode": "auto",
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "text": {},
        "textMode": "auto"
      },
      "pluginVersion": "8.4.0",
      "targets": [
        {
          "calculatedInterval": "10m",
          "datasourceErrors": {},
          "errors": {},
          "exemplar": true,
          "expr": "oracledb_rman_status_value{oracle_ip=~\"$host\",oracle_instance=\"$oracle_instance\",job=\"$job\"}",
          "format": "table",
          "hide": false,
          "instant": true,
          "interval": "5m",
          "intervalFactor": 1,
          "legendFormat": "",
          "metric": "",
          "refId": "A",
          "step": 300
        }
      ],
      "title": "RMAN备份",
      "type": "stat"
    },
    {
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "axisLabel": "",
            "axisPlacement": "auto",
            "barAlignment": 0,
            "drawStyle": "bars",
            "fillOpacity": 0,
            "gradientMode": "none",
            "hideFrom": {
              "legend": false,
              "tooltip": false,
              "viz": false
            },
            "lineInterpolation": "linear",
            "lineWidth": 2,
            "pointSize": 5,
            "scaleDistribution": {
              "type": "linear"
            },
            "showPoints": "auto",
            "spanNulls": false,
            "stacking": {
              "group": "A",
              "mode": "none"
            },
            "thresholdsStyle": {
              "mode": "off"
            }
          },
          "mappings": [],
          "max": 1,
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          }
        },
        "overrides": []
      },
      "gridPos": {
        "h": 6,
        "w": 9,
        "x": 6,
        "y": 8
      },
      "id": 184,
      "options": {
        "legend": {
          "calcs": [],
          "displayMode": "list",
          "placement": "bottom"
        },
        "tooltip": {
          "mode": "single",
          "sort": "none"
        }
      },
      "pluginVersion": "8.1.1",
      "targets": [
        {
          "exemplar": true,
          "expr": "oracledb_up{oracle_ip=~\"$host\",oracle_instance=\"$oracle_instance\",job=\"$job\"}",
          "instant": false,
          "interval": "",
          "legendFormat": "数据库可用性",
          "refId": "A"
        }
      ],
      "title": "数据库可用性",
      "type": "timeseries"
    },
    {
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              }
            ]
          }
        },
        "overrides": [
          {
            "matcher": {
              "id": "byName",
              "options": "会话与限额百分比"
            },
            "properties": [
              {
                "id": "unit",
                "value": "percent"
              },
              {
                "id": "thresholds",
                "value": {
                  "mode": "percentage",
                  "steps": [
                    {
                      "color": "green",
                      "value": null
                    },
                    {
                      "color": "red",
                      "value": 80
                    }
                  ]
                }
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 6,
        "w": 9,
        "x": 15,
        "y": 8
      },
      "id": 65,
      "options": {
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "showThresholdLabels": false,
        "showThresholdMarkers": true,
        "text": {}
      },
      "pluginVersion": "8.4.0",
      "targets": [
        {
          "exemplar": true,
          "expr": "sum(oracledb_sessions_value{oracle_ip=~\"$host\",oracle_instance=\"$oracle_instance\",status=\"ACTIVE\"})",
          "format": "time_series",
          "hide": false,
          "instant": true,
          "interval": "",
          "legendFormat": "活跃会话数",
          "refId": "C"
        },
        {
          "exemplar": true,
          "expr": "sum(oracledb_sessions_value{oracle_ip=~\"$host\",oracle_instance=\"$oracle_instance\"})",
          "format": "time_series",
          "hide": false,
          "instant": true,
          "interval": "",
          "legendFormat": "总会话数",
          "refId": "A"
        },
        {
          "exemplar": true,
          "expr": "sum(oracledb_sessions_value{oracle_ip=~\"$host\",oracle_instance=\"$oracle_instance\"})/sum(oracledb_parameter_sessions_value {oracle_ip=~\"$host\",oracle_instance=\"$oracle_instance\"}) * 100",
          "format": "time_series",
          "hide": false,
          "instant": false,
          "interval": "",
          "legendFormat": "会话与限额百分比",
          "refId": "B"
        }
      ],
      "title": "会话数",
      "transformations": [],
      "type": "gauge"
    },
    {
      "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": [],
          "min": 0,
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          }
        },
        "overrides": []
      },
      "gridPos": {
        "h": 8,
        "w": 12,
        "x": 0,
        "y": 14
      },
      "id": 73,
      "options": {
        "legend": {
          "calcs": [],
          "displayMode": "list",
          "placement": "bottom"
        },
        "tooltip": {
          "mode": "single",
          "sort": "none"
        }
      },
      "targets": [
        {
          "exemplar": true,
          "expr": "sum(oracledb_sessions_value{oracle_ip=~\"$host\",oracle_instance=\"$oracle_instance\"})",
          "interval": "",
          "legendFormat": "会话历史",
          "refId": "A"
        }
      ],
      "thresholds": [],
      "title": "会话数",
      "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": [],
          "min": 0,
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          }
        },
        "overrides": []
      },
      "gridPos": {
        "h": 8,
        "w": 12,
        "x": 12,
        "y": 14
      },
      "id": 119,
      "options": {
        "legend": {
          "calcs": [],
          "displayMode": "list",
          "placement": "bottom"
        },
        "tooltip": {
          "mode": "single",
          "sort": "none"
        }
      },
      "targets": [
        {
          "exemplar": true,
          "expr": "oracledb_sysmetric_logons_per_sec{oracle_ip=~\"$host\",oracle_instance=\"$oracle_instance\"}",
          "interval": "",
          "legendFormat": "每秒登陆用户",
          "refId": "A"
        },
        {
          "exemplar": true,
          "expr": "oracledb_sysmetric_user_transaction_per_sec{oracle_ip=~\"$host\",oracle_instance=\"$oracle_instance\"}",
          "hide": false,
          "interval": "",
          "legendFormat": "每秒事务数",
          "refId": "B"
        }
      ],
      "title": "每秒用户数/事务数",
      "type": "timeseries"
    },
    {
      "description": "",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "mappings": [],
          "max": 100,
          "min": 0,
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "dark-red",
                "value": null
              },
              {
                "color": "light-yellow",
                "value": 90
              },
              {
                "color": "semi-dark-blue",
                "value": 95
              },
              {
                "color": "green",
                "value": 99
              }
            ]
          },
          "unit": "percent"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 5,
        "w": 24,
        "x": 0,
        "y": 22
      },
      "id": 129,
      "options": {
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "showThresholdLabels": false,
        "showThresholdMarkers": true,
        "text": {}
      },
      "pluginVersion": "8.4.0",
      "targets": [
        {
          "exemplar": true,
          "expr": "oracledb_sysmetric_buffer_cache_hit_ratio{oracle_ip=~\"$host\",oracle_instance=\"$oracle_instance\"}",
          "format": "time_series",
          "instant": true,
          "interval": "",
          "legendFormat": "Buffer Cache Hit Ratio %",
          "refId": "A"
        },
        {
          "exemplar": true,
          "expr": "oracledb_sysmetric_library_cache_hit_ratio{oracle_ip=~\"$host\",oracle_instance=\"$oracle_instance\"}",
          "hide": false,
          "instant": true,
          "interval": "",
          "legendFormat": "Library Cache Hit Ratio %",
          "refId": "B"
        },
        {
          "exemplar": true,
          "expr": "oracledb_sysmetric_row_cache_hit_ratio{oracle_ip=~\"$host\",oracle_instance=\"$oracle_instance\"}",
          "hide": false,
          "instant": true,
          "interval": "",
          "legendFormat": "Row Cache Hit Ratio %",
          "refId": "C"
        },
        {
          "exemplar": true,
          "expr": "oracledb_sysmetric_pga_cache_hit_{oracle_ip=~\"$host\",oracle_instance=\"$oracle_instance\"}",
          "hide": false,
          "instant": true,
          "interval": "",
          "legendFormat": "PGA Cache Hit %",
          "refId": "D"
        },
        {
          "exemplar": true,
          "expr": "oracledb_sysmetric_memory_sorts_ratio{oracle_ip=~\"$host\",oracle_instance=\"$oracle_instance\"}",
          "hide": false,
          "instant": true,
          "interval": "",
          "legendFormat": "Memory Sorts Ratio %",
          "refId": "E"
        },
        {
          "exemplar": true,
          "expr": "oracledb_sysmetric_redo_allocation_hit_ratio{oracle_ip=~\"$host\",oracle_instance=\"$oracle_instance\"}",
          "hide": false,
          "instant": true,
          "interval": "",
          "legendFormat": "Redo Allocation Hit Ratio %",
          "refId": "F"
        }
      ],
      "title": "实例命中率【实时】",
      "type": "gauge"
    },
    {
      "description": "",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "mappings": [],
          "max": 100,
          "min": 0,
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "dark-red",
                "value": null
              },
              {
                "color": "light-yellow",
                "value": 90
              },
              {
                "color": "semi-dark-blue",
                "value": 95
              },
              {
                "color": "green",
                "value": 99
              }
            ]
          },
          "unit": "percent"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 5,
        "w": 24,
        "x": 0,
        "y": 27
      },
      "id": 130,
      "options": {
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "lastNotNull"
          ],
          "fields": "",
          "values": false
        },
        "showThresholdLabels": false,
        "showThresholdMarkers": true,
        "text": {}
      },
      "pluginVersion": "8.4.0",
      "targets": [
        {
          "exemplar": true,
          "expr": "sum_over_time(oracledb_sysmetric_buffer_cache_hit_ratio{oracle_ip=\"$host\",oracle_instance=\"$oracle_instance\"}[$interval])/count_over_time(oracledb_sysmetric_buffer_cache_hit_ratio{oracle_ip=\"$host\",oracle_instance=\"$oracle_instance\"}[$interval])",
          "format": "time_series",
          "instant": true,
          "interval": "",
          "legendFormat": "Buffer Cache Hit Ratio %",
          "refId": "A"
        },
        {
          "exemplar": true,
          "expr": "sum_over_time(oracledb_sysmetric_library_cache_hit_ratio{oracle_ip=\"$host\",oracle_instance=\"$oracle_instance\"}[$interval])/count_over_time(oracledb_sysmetric_library_cache_hit_ratio{oracle_ip=\"$host\",oracle_instance=\"$oracle_instance\"}[$interval])",
          "hide": false,
          "instant": true,
          "interval": "",
          "legendFormat": "Library Cache Hit Ratio %",
          "refId": "B"
        },
        {
          "exemplar": true,
          "expr": "sum_over_time(oracledb_sysmetric_row_cache_hit_ratio{oracle_ip=\"$host\",oracle_instance=\"$oracle_instance\"}[$interval])/count_over_time(oracledb_sysmetric_row_cache_hit_ratio{oracle_ip=\"$host\",oracle_instance=\"$oracle_instance\"}[$interval])",
          "hide": false,
          "instant": true,
          "interval": "",
          "legendFormat": "Row Cache Hit Ratio %",
          "refId": "C"
        },
        {
          "exemplar": true,
          "expr": "sum_over_time(oracledb_sysmetric_pga_cache_hit_{oracle_ip=\"$host\",oracle_instance=\"$oracle_instance\"}[$interval])/count_over_time(oracledb_sysmetric_pga_cache_hit_{oracle_ip=\"$host\",oracle_instance=\"$oracle_instance\"}[$interval])",
          "hide": false,
          "instant": true,
          "interval": "",
          "legendFormat": "PGA Cache Hit %",
          "refId": "D"
        },
        {
          "exemplar": true,
          "expr": "sum_over_time(oracledb_sysmetric_memory_sorts_ratio{oracle_ip=\"$host\",oracle_instance=\"$oracle_instance\"}[$interval])/count_over_time(oracledb_sysmetric_memory_sorts_ratio{oracle_ip=\"$host\",oracle_instance=\"$oracle_instance\"}[$interval])",
          "hide": false,
          "instant": true,
          "interval": "",
          "legendFormat": "Memory Sorts Ratio %",
          "refId": "E"
        },
        {
          "exemplar": true,
          "expr": "sum_over_time(oracledb_sysmetric_redo_allocation_hit_ratio{oracle_ip=\"$host\",oracle_instance=\"$oracle_instance\"}[$interval])/count_over_time(oracledb_sysmetric_redo_allocation_hit_ratio{oracle_ip=\"$host\",oracle_instance=\"$oracle_instance\"}[$interval])",
          "hide": false,
          "instant": true,
          "interval": "",
          "legendFormat": "Redo Allocation Hit Ratio %",
          "refId": "F"
        }
      ],
      "title": "实例历史命中率【最近$interval内】",
      "type": "gauge"
    },
    {
      "description": "注意：若Archive destination 未设置为USE_DB_RECOVERY_FILE_DEST，则该目录不会统计archivelog",
      "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": [],
          "max": 100,
          "min": 0,
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          },
          "unit": "percent"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 8,
        "w": 12,
        "x": 0,
        "y": 32
      },
      "id": 178,
      "options": {
        "legend": {
          "calcs": [],
          "displayMode": "list",
          "placement": "bottom"
        },
        "tooltip": {
          "mode": "single",
          "sort": "none"
        }
      },
      "targets": [
        {
          "exemplar": true,
          "expr": "oracledb_db_recovery_file_dest_value{oracle_ip=~\"$host\",oracle_instance=\"$oracle_instance\"}",
          "interval": "",
          "legendFormat": "db_recovery_file_dest - 使用百分比",
          "refId": "A"
        }
      ],
      "title": "db_recovery_file_dest - 使用百分比",
      "type": "timeseries"
    },
    {
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "custom": {
            "align": "left",
            "displayMode": "auto"
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          }
        },
        "overrides": []
      },
      "gridPos": {
        "h": 8,
        "w": 12,
        "x": 12,
        "y": 32
      },
      "id": 180,
      "options": {
        "footer": {
          "fields": "",
          "reducer": [
            "sum"
          ],
          "show": false
        },
        "showHeader": true,
        "sortBy": [
          {
            "desc": true,
            "displayName": "percent_space_used"
          }
        ]
      },
      "pluginVersion": "8.4.0",
      "targets": [
        {
          "exemplar": true,
          "expr": "oracledb_db_recovery_file_dest_percent_space_used{oracle_ip=~\"$host\",oracle_instance=\"$oracle_instance\"}",
          "format": "table",
          "instant": true,
          "interval": "",
          "legendFormat": "",
          "refId": "A"
        }
      ],
      "title": "db_recovery_file_dest - 文件分布",
      "transformations": [
        {
          "id": "organize",
          "options": {
            "excludeByName": {
              "Time": true,
              "__name__": true,
              "file_type": false,
              "group": true,
              "instance": true,
              "job": true,
              "oracle_instance": true,
              "oracle_ip": true
            },
            "indexByName": {},
            "renameByName": {
              "Value": "percent_space_used"
            }
          }
        }
      ],
      "type": "table"
    },
    {
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "custom": {
            "align": "left",
            "displayMode": "auto"
          },
          "mappings": [
            {
              "options": {
                "enq: TX - row lock contention": {
                  "color": "red",
                  "index": 0
                }
              },
              "type": "value"
            }
          ],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          }
        },
        "overrides": [
          {
            "matcher": {
              "id": "byName",
              "options": "event_name"
            },
            "properties": [
              {
                "id": "custom.width"
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 8,
        "w": 12,
        "x": 0,
        "y": 40
      },
      "id": 136,
      "options": {
        "footer": {
          "fields": "",
          "reducer": [
            "sum"
          ],
          "show": false
        },
        "showHeader": true,
        "sortBy": []
      },
      "pluginVersion": "8.4.0",
      "targets": [
        {
          "exemplar": true,
          "expr": "oracledb_events_value{oracle_ip=\"$host\",oracle_instance=\"$oracle_instance\"}",
          "format": "table",
          "instant": true,
          "interval": "",
          "legendFormat": "",
          "refId": "A"
        }
      ],
      "title": "等待事件【实时】",
      "transformations": [
        {
          "id": "organize",
          "options": {
            "excludeByName": {
              "Time": true,
              "__name__": true,
              "group": true,
              "instance": true,
              "job": true,
              "oracle_instance": true,
              "oracle_ip": true
            },
            "indexByName": {},
            "renameByName": {}
          }
        },
        {
          "id": "sortBy",
          "options": {
            "fields": {},
            "sort": [
              {
                "desc": true,
                "field": "Value"
              }
            ]
          }
        }
      ],
      "type": "table"
    },
    {
      "description": "",
      "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": [],
          "min": 0,
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          }
        },
        "overrides": []
      },
      "gridPos": {
        "h": 8,
        "w": 12,
        "x": 12,
        "y": 40
      },
      "id": 134,
      "options": {
        "legend": {
          "calcs": [],
          "displayMode": "list",
          "placement": "bottom"
        },
        "tooltip": {
          "mode": "single",
          "sort": "none"
        }
      },
      "targets": [
        {
          "exemplar": true,
          "expr": "oracledb_sysmetric_database_time_per_sec{oracle_ip=\"$host\",oracle_instance=\"$oracle_instance\"}/100",
          "interval": "",
          "legendFormat": "DB_Time（单位：秒）",
          "refId": "A"
        }
      ],
      "title": "每秒DB_Time",
      "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": [],
          "min": 0,
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          }
        },
        "overrides": []
      },
      "gridPos": {
        "h": 8,
        "w": 12,
        "x": 0,
        "y": 48
      },
      "id": 154,
      "options": {
        "legend": {
          "calcs": [],
          "displayMode": "list",
          "placement": "bottom"
        },
        "tooltip": {
          "mode": "single",
          "sort": "none"
        }
      },
      "targets": [
        {
          "exemplar": true,
          "expr": "oracledb_sysmetric_logical_reads_per_sec{oracle_ip=\"$host\",oracle_instance=\"$oracle_instance\"}",
          "interval": "",
          "legendFormat": "每秒逻辑读（单位：block）",
          "refId": "A"
        }
      ],
      "title": "每秒逻辑读",
      "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": [],
          "min": 0,
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          }
        },
        "overrides": []
      },
      "gridPos": {
        "h": 8,
        "w": 12,
        "x": 12,
        "y": 48
      },
      "id": 171,
      "options": {
        "legend": {
          "calcs": [],
          "displayMode": "list",
          "placement": "bottom"
        },
        "tooltip": {
          "mode": "single",
          "sort": "none"
        }
      },
      "targets": [
        {
          "exemplar": true,
          "expr": "oracledb_sysmetric_physical_read_total_io_requests_per_sec{oracle_ip=\"$host\",oracle_instance=\"$oracle_instance\"}",
          "interval": "",
          "legendFormat": "读IOPS",
          "refId": "A"
        },
        {
          "exemplar": true,
          "expr": "oracledb_sysmetric_physical_write_total_io_requests_per_sec{oracle_ip=\"$host\",oracle_instance=\"$oracle_instance\"} + oracledb_sysmetric_redo_writes_per_sec{oracle_ip=\"$host\",oracle_instance=\"$oracle_instance\"}",
          "hide": false,
          "interval": "",
          "legendFormat": "写IOPS",
          "refId": "B"
        },
        {
          "exemplar": true,
          "expr": "oracledb_sysmetric_physical_read_total_io_requests_per_sec{oracle_ip=\"$host\",oracle_instance=\"$oracle_instance\"}+oracledb_sysmetric_physical_write_total_io_requests_per_sec{oracle_ip=\"$host\",oracle_instance=\"$oracle_instance\"} + oracledb_sysmetric_redo_writes_per_sec{oracle_ip=\"$host\",oracle_instance=\"$oracle_instance\"}",
          "hide": false,
          "interval": "",
          "legendFormat": "总IOPS",
          "refId": "C"
        }
      ],
      "title": "数据库IOPS",
      "type": "timeseries"
    },
    {
      "description": "",
      "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": [],
          "min": 0,
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          }
        },
        "overrides": []
      },
      "gridPos": {
        "h": 8,
        "w": 12,
        "x": 0,
        "y": 56
      },
      "id": 127,
      "options": {
        "legend": {
          "calcs": [],
          "displayMode": "list",
          "placement": "bottom"
        },
        "tooltip": {
          "mode": "single",
          "sort": "none"
        }
      },
      "targets": [
        {
          "exemplar": true,
          "expr": "rate(oracledb_sysstat_bytes_received_via_sqlnet_from_client{oracle_ip=\"$host\",oracle_instance=\"$oracle_instance\"}[$interval])/1024/1024",
          "interval": "",
          "legendFormat": "from client（单位：MB）",
          "refId": "A"
        },
        {
          "exemplar": true,
          "expr": "rate(oracledb_sysstat_bytes_sent_via_sqlnet_to_client{oracle_ip=\"$host\",oracle_instance=\"$oracle_instance\"}[$interval])/1024/1024",
          "hide": false,
          "interval": "",
          "legendFormat": "to client（单位：MB）",
          "refId": "B"
        }
      ],
      "title": "每秒received via SQL*Net from client/每秒bytes sent via SQL*Net to client",
      "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": [],
          "min": 0,
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          }
        },
        "overrides": []
      },
      "gridPos": {
        "h": 8,
        "w": 12,
        "x": 12,
        "y": 56
      },
      "id": 155,
      "options": {
        "legend": {
          "calcs": [],
          "displayMode": "list",
          "placement": "bottom"
        },
        "tooltip": {
          "mode": "single",
          "sort": "none"
        }
      },
      "targets": [
        {
          "exemplar": true,
          "expr": "oracledb_sysmetric_physical_read_total_bytes_per_sec{oracle_ip=\"$host\",oracle_instance=\"$oracle_instance\"}/1024/1024",
          "interval": "",
          "legendFormat": "每秒IO读（单位：MB）",
          "refId": "A"
        },
        {
          "exemplar": true,
          "expr": "(oracledb_sysmetric_physical_write_total_bytes_per_sec{oracle_ip=\"$host\",oracle_instance=\"$oracle_instance\"}+oracledb_sysmetric_redo_generated_per_sec{oracle_ip=\"$host\",oracle_instance=\"$oracle_instance\"})/1024/1024",
          "hide": false,
          "interval": "",
          "legendFormat": "每秒IO写（单位：MB）",
          "refId": "B"
        },
        {
          "exemplar": true,
          "expr": "oracledb_sysmetric_physical_read_total_bytes_per_sec{oracle_ip=\"$host\",oracle_instance=\"$oracle_instance\"}/1024/1024+(oracledb_sysmetric_physical_write_total_bytes_per_sec{oracle_ip=\"$host\",oracle_instance=\"$oracle_instance\"}+oracledb_sysmetric_redo_generated_per_sec{oracle_ip=\"$host\",oracle_instance=\"$oracle_instance\"})/1024/1024",
          "hide": false,
          "interval": "",
          "legendFormat": "总读写（单位：MB）",
          "refId": "C"
        }
      ],
      "title": "数据库MBPS",
      "type": "timeseries"
    },
    {
      "description": "log_size 单位：MB",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "custom": {
            "align": "left",
            "displayMode": "auto"
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          }
        },
        "overrides": []
      },
      "gridPos": {
        "h": 9,
        "w": 5,
        "x": 0,
        "y": 64
      },
      "id": 173,
      "options": {
        "footer": {
          "fields": "",
          "reducer": [
            "sum"
          ],
          "show": false
        },
        "showHeader": true
      },
      "pluginVersion": "8.4.0",
      "targets": [
        {
          "exemplar": true,
          "expr": "oracledb_env_redo_value{oracle_ip=\"$host\",oracle_instance=\"$oracle_instance\"}",
          "format": "table",
          "instant": true,
          "interval": "",
          "legendFormat": "",
          "refId": "A"
        }
      ],
      "title": "redo配置",
      "transformations": [
        {
          "id": "organize",
          "options": {
            "excludeByName": {
              "Time": true,
              "__name__": true,
              "group": true,
              "instance": true,
              "job": true,
              "oracle_instance": true,
              "oracle_ip": true
            },
            "indexByName": {
              "Time": 0,
              "Value": 6,
              "__name__": 1,
              "group": 2,
              "instance": 3,
              "job": 4,
              "name": 5,
              "oracle_instance": 7,
              "oracle_ip": 8
            },
            "renameByName": {
              "Value": ""
            }
          }
        }
      ],
      "type": "table"
    },
    {
      "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": [],
          "min": 0,
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          }
        },
        "overrides": []
      },
      "gridPos": {
        "h": 9,
        "w": 7,
        "x": 5,
        "y": 64
      },
      "id": 138,
      "options": {
        "legend": {
          "calcs": [],
          "displayMode": "list",
          "placement": "bottom"
        },
        "tooltip": {
          "mode": "single",
          "sort": "none"
        }
      },
      "targets": [
        {
          "exemplar": true,
          "expr": "oracledb_sysmetric_redo_generated_per_sec{oracle_ip=\"$host\",oracle_instance=\"$oracle_instance\"}/1024/1024",
          "interval": "",
          "legendFormat": "每秒redo（单位：MB）",
          "refId": "A"
        }
      ],
      "title": "每秒redo size",
      "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": [],
          "min": 0,
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          }
        },
        "overrides": []
      },
      "gridPos": {
        "h": 9,
        "w": 12,
        "x": 12,
        "y": 64
      },
      "id": 174,
      "options": {
        "legend": {
          "calcs": [],
          "displayMode": "list",
          "placement": "bottom"
        },
        "tooltip": {
          "mode": "single",
          "sort": "none"
        }
      },
      "targets": [
        {
          "exemplar": true,
          "expr": "increase(oracledb_env_redo_switch_value{oracle_ip=\"$host\",oracle_instance=\"$oracle_instance\"}[$interval])",
          "interval": "",
          "legendFormat": "redo log切换次数",
          "refId": "A"
        }
      ],
      "title": "redo log【最近$interval内】切换次数",
      "type": "timeseries"
    },
    {
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "custom": {
            "align": "left",
            "displayMode": "auto"
          },
          "mappings": [],
          "max": 1,
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          },
          "unit": "bytes"
        },
        "overrides": [
          {
            "matcher": {
              "id": "byName",
              "options": "Value #D"
            },
            "properties": [
              {
                "id": "unit",
                "value": "percentunit"
              },
              {
                "id": "custom.displayMode",
                "value": "lcd-gauge"
              },
              {
                "id": "thresholds",
                "value": {
                  "mode": "absolute",
                  "steps": [
                    {
                      "color": "green",
                      "value": null
                    },
                    {
                      "color": "yellow",
                      "value": 0.7
                    },
                    {
                      "color": "red",
                      "value": 0.9
                    }
                  ]
                }
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 9,
        "w": 24,
        "x": 0,
        "y": 73
      },
      "id": 75,
      "options": {
        "footer": {
          "fields": "",
          "reducer": [
            "sum"
          ],
          "show": false
        },
        "frameIndex": 0,
        "showHeader": true,
        "sortBy": [
          {
            "desc": true,
            "displayName": "使用率"
          }
        ]
      },
      "pluginVersion": "8.4.0",
      "targets": [
        {
          "exemplar": true,
          "expr": "oracledb_tablespace_bytes{oracle_ip=\"$host\",oracle_instance=\"$oracle_instance\"}",
          "format": "table",
          "instant": true,
          "interval": "",
          "legendFormat": "",
          "refId": "A"
        },
        {
          "exemplar": true,
          "expr": "oracledb_tablespace_free{oracle_ip=\"$host\",oracle_instance=\"$oracle_instance\"}",
          "format": "table",
          "hide": false,
          "instant": true,
          "interval": "",
          "legendFormat": "",
          "refId": "B"
        },
        {
          "exemplar": true,
          "expr": "oracledb_tablespace_max_bytes{oracle_ip=\"$host\",oracle_instance=\"$oracle_instance\"}",
          "format": "table",
          "hide": false,
          "instant": true,
          "interval": "",
          "legendFormat": "",
          "refId": "C"
        },
        {
          "exemplar": true,
          "expr": "(1-oracledb_tablespace_free{oracle_ip=\"$host\",oracle_instance=\"$oracle_instance\"}/oracledb_tablespace_bytes{oracle_ip=\"$host\",oracle_instance=\"$oracle_instance\"})",
          "format": "table",
          "hide": false,
          "instant": true,
          "interval": "",
          "legendFormat": "",
          "refId": "D"
        }
      ],
      "title": "表空间",
      "transformations": [
        {
          "id": "filterFieldsByName",
          "options": {
            "include": {
              "names": [
                "tablespace",
                "Value #A",
                "Value #B",
                "Value #C",
                "Value #D",
                "type"
              ]
            }
          }
        },
        {
          "id": "seriesToColumns",
          "options": {
            "byField": "tablespace"
          }
        },
        {
          "id": "organize",
          "options": {
            "excludeByName": {
              "type 2": true,
              "type 3": true,
              "type 4": true
            },
            "indexByName": {},
            "renameByName": {
              "Value #A": "已分配容量",
              "Value #B": "已分配剩余",
              "Value #C": "最大容量",
              "Value #D": "使用率",
              "tablespace": "表空间",
              "type 1": "类型",
              "type 2": "",
              "type 3": ""
            }
          }
        }
      ],
      "type": "table"
    },
    {
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "custom": {
            "align": "left",
            "displayMode": "auto",
            "filterable": false
          },
          "mappings": [
            {
              "options": {
                "<nil>": {
                  "index": 0,
                  "text": "null"
                }
              },
              "type": "value"
            }
          ],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          }
        },
        "overrides": [
          {
            "matcher": {
              "id": "byName",
              "options": "参数名"
            },
            "properties": [
              {
                "id": "custom.filterable",
                "value": true
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 11,
        "w": 24,
        "x": 0,
        "y": 82
      },
      "id": 99,
      "options": {
        "footer": {
          "fields": "",
          "reducer": [
            "sum"
          ],
          "show": false
        },
        "showHeader": true,
        "sortBy": [
          {
            "desc": false,
            "displayName": "参数名"
          }
        ]
      },
      "pluginVersion": "8.4.0",
      "targets": [
        {
          "exemplar": true,
          "expr": "oracledb_parameter_value{oracle_ip=\"$host\",oracle_instance=\"$oracle_instance\"}",
          "format": "table",
          "instant": true,
          "interval": "",
          "legendFormat": "",
          "refId": "A"
        }
      ],
      "title": "数据库参数",
      "transformations": [
        {
          "id": "organize",
          "options": {
            "excludeByName": {
              "Time": true,
              "Value": true,
              "__name__": true,
              "group": true,
              "instance": true,
              "job": true,
              "oracle_instance": true,
              "oracle_ip": true
            },
            "indexByName": {},
            "renameByName": {
              "name": "参数名",
              "value": "参数值"
            }
          }
        }
      ],
      "type": "table"
    },
    {
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "custom": {
            "align": "left",
            "displayMode": "auto",
            "filterable": false
          },
          "mappings": [
            {
              "options": {
                "<nil>": {
                  "index": 0,
                  "text": "null"
                }
              },
              "type": "value"
            }
          ],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          }
        },
        "overrides": [
          {
            "matcher": {
              "id": "byName",
              "options": "start_time"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 275
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "completion_time"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 235
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 11,
        "w": 24,
        "x": 0,
        "y": 93
      },
      "id": 185,
      "options": {
        "footer": {
          "fields": "",
          "reducer": [
            "sum"
          ],
          "show": false
        },
        "showHeader": true,
        "sortBy": [
          {
            "desc": true,
            "displayName": "recid"
          }
        ]
      },
      "pluginVersion": "8.4.0",
      "targets": [
        {
          "exemplar": true,
          "expr": "oracledb_rman_info_value{oracle_ip=\"$host\",oracle_instance=\"$oracle_instance\"}",
          "format": "table",
          "instant": true,
          "interval": "",
          "legendFormat": "",
          "refId": "A"
        }
      ],
      "title": "数据库rman备份信息",
      "transformations": [
        {
          "id": "organize",
          "options": {
            "excludeByName": {
              "Time": true,
              "Value": true,
              "__name__": true,
              "group": true,
              "instance": true,
              "job": true,
              "oracle_instance": true,
              "oracle_ip": true
            },
            "indexByName": {
              "Time": 0,
              "Value": 18,
              "__name__": 1,
              "bak_size": 7,
              "completion_time": 6,
              "compressed": 8,
              "controlfile_included": 9,
              "device_type": 10,
              "elapsed_seconds": 11,
              "group": 12,
              "instance": 13,
              "job": 14,
              "lv_type": 4,
              "oracle_instance": 15,
              "oracle_ip": 16,
              "recid": 2,
              "start_time": 5,
              "status": 17,
              "tag": 3
            },
            "renameByName": {
              "bak_size": "bak_size(单位：G)",
              "name": "参数名",
              "value": "参数值"
            }
          }
        }
      ],
      "type": "table"
    }
  ],
  "refresh": "5m",
  "schemaVersion": 35,
  "style": "dark",
  "tags": [
    "oracle"
  ],
  "templating": {
    "list": [
      {
        "current": {},
        "datasource": {
          "type": "prometheus",
          "uid": "${DS_PROMETHEUS}"
        },
        "definition": "label_values(oracledb_up, job)",
        "hide": 0,
        "includeAll": false,
        "label": "JOB",
        "multi": false,
        "name": "job",
        "options": [],
        "query": {
          "query": "label_values(oracledb_up, job)",
          "refId": "StandardVariableQuery"
        },
        "refresh": 1,
        "regex": "",
        "skipUrlSync": false,
        "sort": 0,
        "type": "query"
      },
      {
        "current": {},
        "datasource": {
          "type": "prometheus",
          "uid": "${DS_PROMETHEUS}"
        },
        "definition": "label_values(oracledb_up{job=\"$job\"}, group)",
        "hide": 0,
        "includeAll": false,
        "label": "group",
        "multi": false,
        "name": "group",
        "options": [],
        "query": {
          "query": "label_values(oracledb_up{job=\"$job\"}, group)",
          "refId": "StandardVariableQuery"
        },
        "refresh": 1,
        "regex": "",
        "skipUrlSync": false,
        "sort": 0,
        "type": "query"
      },
      {
        "allFormat": "glob",
        "current": {},
        "datasource": {
          "type": "prometheus",
          "uid": "${DS_PROMETHEUS}"
        },
        "definition": "label_values(oracledb_up{job=\"$job\",group=\"$group\"}, oracle_ip)",
        "hide": 0,
        "includeAll": false,
        "label": "数据库IP",
        "multi": false,
        "multiFormat": "regex values",
        "name": "host",
        "options": [],
        "query": {
          "query": "label_values(oracledb_up{job=\"$job\",group=\"$group\"}, oracle_ip)",
          "refId": "StandardVariableQuery"
        },
        "refresh": 1,
        "refresh_on_load": false,
        "regex": "",
        "skipUrlSync": false,
        "sort": 1,
        "type": "query",
        "useTags": false
      },
      {
        "allFormat": "glob",
        "current": {},
        "datasource": {
          "type": "prometheus",
          "uid": "${DS_PROMETHEUS}"
        },
        "definition": "label_values(oracledb_up{job=\"$job\",oracle_ip=\"$host\"}, oracle_instance)",
        "hide": 0,
        "includeAll": false,
        "label": "数据库实例",
        "multi": false,
        "multiFormat": "regex values",
        "name": "oracle_instance",
        "options": [],
        "query": {
          "query": "label_values(oracledb_up{job=\"$job\",oracle_ip=\"$host\"}, oracle_instance)",
          "refId": "StandardVariableQuery"
        },
        "refresh": 1,
        "refresh_on_load": false,
        "regex": "",
        "skipUrlSync": false,
        "sort": 1,
        "type": "query",
        "useTags": false
      },
      {
        "allFormat": "glob",
        "auto": true,
        "auto_count": 200,
        "auto_min": "1s",
        "current": {
          "selected": false,
          "text": "1m",
          "value": "1m"
        },
        "datasource": "Prometheus",
        "hide": 0,
        "includeAll": false,
        "label": "Interval",
        "multi": false,
        "multiFormat": "glob",
        "name": "interval",
        "options": [
          {
            "selected": false,
            "text": "auto",
            "value": "$__auto_interval_interval"
          },
          {
            "selected": false,
            "text": "1s",
            "value": "1s"
          },
          {
            "selected": false,
            "text": "5s",
            "value": "5s"
          },
          {
            "selected": true,
            "text": "1m",
            "value": "1m"
          },
          {
            "selected": false,
            "text": "5m",
            "value": "5m"
          },
          {
            "selected": false,
            "text": "1h",
            "value": "1h"
          },
          {
            "selected": false,
            "text": "6h",
            "value": "6h"
          },
          {
            "selected": false,
            "text": "1d",
            "value": "1d"
          }
        ],
        "query": "1s,5s,1m,5m,1h,6h,1d",
        "queryValue": "",
        "refresh": 2,
        "skipUrlSync": false,
        "type": "interval"
      }
    ]
  },
  "time": {
    "from": "now-1h",
    "to": "now"
  },
  "timepicker": {
    "collapse": false,
    "enable": true,
    "notice": false,
    "now": true,
    "refresh_intervals": [
      "5s",
      "10s",
      "30s",
      "1m",
      "5m",
      "15m",
      "30m",
      "1h",
      "2h",
      "1d"
    ],
    "status": "Stable",
    "time_options": [
      "5m",
      "15m",
      "1h",
      "6h",
      "12h",
      "24h",
      "2d",
      "7d",
      "30d"
    ],
    "type": "timepicker"
  },
  "timezone": "browser",
  "title": "Oracledb_Dashboard_202210",
  "uid": "kHEcoO3nz",
  "version": 1,
  "weekStart": ""
}