From c81e94b6f8801a24f57a36180c8916ca53846257 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B8=A0=E7=A3=8A?= Date: Wed, 24 Apr 2024 20:52:47 +0800 Subject: [PATCH] add check's cases about core_pattern tenant_number --- .../tasks/observer/cluster/tenant_number.yaml | 19 +++++++++++++++++++ .../tasks/observer/system/core_pattern.yaml | 11 +++++++++++ 2 files changed, 30 insertions(+) create mode 100644 handler/checker/tasks/observer/cluster/tenant_number.yaml create mode 100644 handler/checker/tasks/observer/system/core_pattern.yaml diff --git a/handler/checker/tasks/observer/cluster/tenant_number.yaml b/handler/checker/tasks/observer/cluster/tenant_number.yaml new file mode 100644 index 00000000..3c725440 --- /dev/null +++ b/handler/checker/tasks/observer/cluster/tenant_number.yaml @@ -0,0 +1,19 @@ +info: "Check the number of tenant" +task: + - version: "[4.0.0.0,*]" + steps: + - type: sql + sql: 'select count(0)/2 from oceanbase.__all_tenant where tenant_id>1000;' + result: + set_value: tenant_nu + verify_type: max + verify: 100 + err_msg: "The number of tenants: #{tenant_nu}.recommended: tenant_nu<50" + - type: sql + sql: 'select count(0)/2 from oceanbase.__all_tenant where tenant_id>1000;' + result: + set_value: tenant_nu + verify_type: max + report_type: warning + verify: 50 + err_msg: "The number of tenants: #{tenant_nu}.recommended: tenant_nu<50" \ No newline at end of file diff --git a/handler/checker/tasks/observer/system/core_pattern.yaml b/handler/checker/tasks/observer/system/core_pattern.yaml new file mode 100644 index 00000000..ba0e3f9a --- /dev/null +++ b/handler/checker/tasks/observer/system/core_pattern.yaml @@ -0,0 +1,11 @@ +info: 'Check kernel.core_pattern' +task: + - steps: + - type: get_system_parameter + parameter: kernel.core_pattern + result: + set_value: core_pattern + verify: "[[ $core_pattern == *" "* ]]" + err_msg: 'clock_source: #{clock_source}. recommended: tsc. Uneven CPU utilization during pressure testing resulted in low TPS during pressure testing' + +