規格結構定義
ObservabilityConfigSpec 會定義 ObservabilityConfig 的選取狀態。
customMetrics:
definitions:
- database: string
metricGroup: string
metrics:
- desc: string
name: string
usage: string
query: string
resourceLimits:
maxParallelWorkers: integer
statementTimeout: string
workMemory: string
dbClusterRefs:
- string
欄位 類型必要或選填 |
說明 |
|---|---|
customMetrics
| |
object必填 | 指定自訂指標設定。 |
customMetrics.definitions
| |
list (object)必填 | 自訂指標定義清單。 |
customMetrics.definitions[].database
| |
string必填 | 要連線的資料庫名稱,以執行這項查詢。 |
customMetrics.definitions[].metricGroup
| |
string必填 | 用於將相關指標分組的名稱。用於最終指標名稱:alloydb_omni_custom_<metricGroup>_<metric_name>。 |
customMetrics.definitions[].metrics
| |
list (object)必填 | 要從查詢結果擷取的指標清單。 |
customMetrics.definitions[].metrics[].desc
| |
string必填 | 使用者容易理解的指標或標籤說明。 |
customMetrics.definitions[].metrics[].name
| |
string必填 | SQL 查詢結果中的資料欄名稱。這會用做 Prometheus 指標名稱的一部分,或做為標籤名稱。 |
customMetrics.definitions[].metrics[].usage
| |
string必填 | 指定這個資料欄的使用方式。有效值為「label」、「gauge」、「counter」。 |
customMetrics.definitions[].query
| |
string必填 | 要執行的 SQL SELECT 陳述式。 |
customMetrics.resourceLimits
| |
object選填 | ResourceLimits 會指定執行自訂查詢的資源限制。 |
customMetrics.resourceLimits.maxParallelWorkers
| |
integer選填 | 指定查詢的平行工作站數量上限。如果設為 0,系統就會停用平行查詢執行作業。 |
customMetrics.resourceLimits.statementTimeout
| |
string選填 | 指定任何陳述式可執行的時間長度上限。例如:「2s」。 |
customMetrics.resourceLimits.workMemory
| |
string選填 | 指定查詢作業可使用的記憶體量上限。例如:「4MB」。 |
dbClusterRefs
| |
list (string)必填 | 受這個 ObservabilityConfig 影響的 DBCluster 執行個體參照清單。 |
狀態結構定義
ObservabilityConfigStatus 會定義 ObservabilityConfig 的觀察狀態。
conditions:
- lastTransitionTime: string
message: string
observedGeneration: integer
reason: string
status: string
type: string
criticalIncidents:
- code: string
createTime: string
message: string
messageTemplateParams: object
resource:
component: string
location:
cluster: string
group: string
kind: string
name: string
namespace: string
version: string
stackTrace:
- component: string
message: string
transientUntil: string
observedGeneration: integer
reconciled: boolean
欄位 類型必要或選填 |
說明 |
|---|---|
conditions[]
| |
object選填 | 實體目前狀態的最新可用觀察結果清單。 |
conditions[].lastTransitionTime
| |
string必填 | 條件最近一次從一個狀態轉變為另一個狀態的時間。這應該是基礎條件變更時。如果不知道,可以使用 API 欄位變更的時間。 |
conditions[].message
| |
string必填 | 使用者可理解的訊息,說明轉移作業。這個值可以是空白字串。 |
conditions[].observedGeneration
| |
integer選填 | 此條件的依據 .metadata.generation。舉例來說,如果 .metadata.generation 為 12,但 .status.conditions[x].observedGeneration 為 9,則條件過時,無法反映執行個體的目前狀態。 |
conditions[].reason
| |
string必填 | 程式輔助 ID,指出條件上次轉換的原因。特定條件類型的產生者可能會定義這個欄位的預期值和意義,以及這些值是否視為穩定的 API。值必須是 CamelCase 字串。這個欄位不得留空。 |
conditions[].status
| |
string必填 | 條件的狀態 (True、False 或 Unknown)。 |
conditions[].type
| |
string必填 | 條件類型,採用駝峰式大小寫或 foo.example.com/CamelCase。許多 .condition.type 值在各項資源中都一致 (例如「Available」),但由於任意條件可能很有用 (請參閱 .node.status.conditions),因此能夠解決衝突非常重要。相符的規則運算式為 (dns1123SubdomainFmt/)?(qualifiedNameFmt)。 |
criticalIncidents
| |
list (object)選填 | 所有未解決重大事件的平面清單。 |
criticalIncidents[]
| |
object選填 | 提供持續發生的重大事件相關資訊。 |
criticalIncidents[].code
| |
string必填 | 錯誤代碼。錯誤代碼為 DBSE+數字字串,例如「DBSE1012」。 |
criticalIncidents[].createTime
| |
string必填 | 建立事件的時間戳記。 |
criticalIncidents[].message
| |
string選填 | 訊息會說明發生的事件或錯誤。 |
criticalIncidents[].messageTemplateParams
| |
object選填 | 產生使用者介面中易於使用的資料驅動型郵件版本時,必須使用這個鍵/值組合。 |
criticalIncidents[].resource
| |
object必填 | 回報事件的資料庫服務元件相關資訊,以及叢集管理員資源相關資訊。 |
criticalIncidents[].resource.component
| |
string必填 | 回報事件的資料庫服務子系統內部 ID。 |
criticalIncidents[].resource.location
| |
object選填 | 受影響資源的 Kubernetes 特定位置 (例如叢集、命名空間、種類和名稱)。 |
criticalIncidents[].resource.location.cluster
| |
string選填 | 受影響資源的叢集名稱。 |
criticalIncidents[].resource.location.group
| |
string選填 | Cluster Manager 資源的群組名稱。 |
criticalIncidents[].resource.location.kind
| |
string選填 | 說明資源類型。 |
criticalIncidents[].resource.location.name
| |
string選填 | 受影響資源的名稱。 |
criticalIncidents[].resource.location.namespace
| |
string選填 | 受影響資源的命名空間。 |
criticalIncidents[].resource.location.version
| |
string選填 | 資源版本。 |
criticalIncidents[].stackTrace
| |
object選填 | 堆疊追蹤中的非結構化訊息清單。 |
criticalIncidents[].stackTrace.component
| |
string選填 | 記錄訊息的資料庫服務元件名稱。 |
criticalIncidents[].stackTrace.message
| |
string選填 | 記錄訊息。 |
criticalIncidents[].transientUntil
| |
string選填 | 如果採用這項設定,代表問題必須視為暫時性問題,直到指定時間為止。 |
observedGeneration
| |
integer選填 | 內部:控制器觀察到的世代。 |
reconciled
| |
boolean選填 | 資源是否已由控制器調解。 |