数据管理服务 DAS-获取实例健康诊断报告内容:响应示例

时间:2025-02-28 11:21:47

响应示例

状态码: 200

Success.

{ 
  "success" : true, 
  "summary_info" : { 
    "analysis_results" : [ { 
      "risk_code" : "SLOW_ LOG _ISSUE", 
      "risk_level" : "WARNING", 
      "risk_content" : "慢SQL问题", 
      "reasons" : [ { 
        "reason_code" : "SLOW_LOG_EXIST", 
        "reason_content" : "存在慢SQL", 
        "suggestions" : [ { 
          "suggestion_code" : "ANALYZE_SLOW_LOG", 
          "suggestion_content" : "分析慢SQL查找问题根源" 
        } ] 
      } ] 
    } ] 
  }, 
  "instance_info" : { 
    "tenant_id" : "05204146e600d48f0f02c002850ec340", 
    "project_id" : "052041494800d57c2f02c00275b4c247", 
    "instance_id" : "bcfa975193f1402fa11a6d4fd6baf5fbin01", 
    "instance_name" : "rds-sql-勿删1", 
    "cpu" : 2, 
    "mem" : 8, 
    "disk_size" : 60, 
    "disk_type" : "CLOUDSSD", 
    "engine" : "mysql", 
    "engine_version" : "5.7" 
  }, 
  "performance_stat" : { 
    "analyze_success" : true, 
    "peak_stats" : [ { 
      "metric" : "qps", 
      "value" : 64.88, 
      "max_value" : 11178, 
      "normalized" : 0.005804258364644837, 
      "stage" : "LIGHT", 
      "timestamp" : 1728756000 
    } ], 
    "ratio_stats" : [ { 
      "metric" : "qps", 
      "max_value" : 11178, 
      "critical_ratio" : 0, 
      "medium_ratio" : 0, 
      "light_ratio" : 1 
    } ] 
  }, 
  "disk_stat" : { 
    "analyze_success" : true, 
    "peak_stats" : [ { 
      "metric" : "iops", 
      "value" : 91.9, 
      "max_value" : 4500, 
      "normalized" : 0.020422222222222224, 
      "stage" : "LIGHT", 
      "timestamp" : 1728750600 
    } ], 
    "ratio_stats" : [ { 
      "metric" : "iops", 
      "max_value" : 4500, 
      "critical_ratio" : 0, 
      "medium_ratio" : 0, 
      "light_ratio" : 1 
    } ] 
  }, 
  "table_space_stat" : { 
    "analyze_success" : true 
  }, 
  "slow_log_stat" : { 
    "analyze_success" : true, 
    "collect_slow_log" : true, 
    "top_execute_slow_logs" : [ { 
      "template_id" : "5B20B6BF446F926F", 
      "template" : "INSERT INTO test123 VALUES (?);", 
      "databases" : [ "test_db" ], 
      "times" : 83, 
      "avg_query_time" : 0.9021538595657752, 
      "max_query_time" : 45.08398997783661, 
      "avg_rows_examined" : 0, 
      "sum_rows_examined" : 0, 
      "avg_rows_sent" : 0 
    } ], 
    "rows_examined_exceeding" : [ ] 
  }, 
  "full_sql_stat" : { 
    "analyze_success" : true, 
    "collect_full_sql" : true, 
    "execute_top_templates" : [ { 
      "template_id" : "B38F825636B24B7", 
      "template" : "CREATE TABLE IF NOT EXISTS table_001 (id int)", 
      "databases" : [ "test_db" ], 
      "times" : 1, 
      "avg_query_time" : 5, 
      "avg_rows_examined" : 0, 
      "sum_rows_examined" : 0 
    } ] 
  }, 
  "inspection_stat" : { 
    "analyze_success" : true, 
    "inspection_score" : [ { 
      "score" : 100, 
      "critical" : 0, 
      "medium" : 0, 
      "light" : 0, 
      "cpu_usage" : 3.93, 
      "mem_usage" : 22.91, 
      "space_usage" : 8.66, 
      "connection_rate" : 0.54, 
      "iops_usage" : 0.28, 
      "thread_running" : 4, 
      "slow_sql_total" : 0, 
      "lost_points_detail_list" : [ { 
        "metric" : "memUsage", 
        "lost_points" : 0, 
        "risk_level" : "NORMAL" 
      }, { 
        "metric" : "cpuUsage", 
        "lost_points" : 0, 
        "risk_level" : "NORMAL" 
      }, { 
        "metric" : "spaceUsage", 
        "lost_points" : 0, 
        "risk_level" : "NORMAL" 
      }, { 
        "metric" : "iopsUsage", 
        "lost_points" : 0, 
        "risk_level" : "NORMAL" 
      }, { 
        "metric" : "connectionRate", 
        "lost_points" : 0, 
        "risk_level" : "NORMAL" 
      }, { 
        "metric" : "threadRunning", 
        "lost_points" : 0, 
        "risk_level" : "NORMAL" 
      }, { 
        "metric" : "slowSqlTotal", 
        "lost_points" : 0, 
        "risk_level" : "NORMAL" 
      } ] 
    } ] 
  } 
}
support.huaweicloud.com/api-das/das_01_0068.html