KRM API logging.gdc.goog/v1

logging.gdc.goog/v1

包含記錄群組的 API 結構定義。

AlertRule

定義快訊規則設定。

出現位置: - LoggingRuleSpec

欄位 說明
alert 字串 快訊名稱。值必須是有效的標籤值。
expr 字串 用於評估警告規則的 PromQL 或 LogQL 運算式。
for 字串 指定條件必須符合的時間長度 (以秒為單位),警報才會從待處理狀態移至開啟狀態。
labels 物件 (鍵:字串,值:字串) 要新增或覆寫的標籤。這個欄位的必要標籤為 severity: [error, critical, warning, info, high, moderate, low]code: <short code for the error>resource: <component, service,errorcode: _gdch_project: `
annotations 物件 (鍵:字串,值:字串) 要新增的註解。

ApiServerEntry

出現位置: - AuditlogInventorySpec

欄位 說明
resourceKind 字串
auditRelevant boolean
comment 字串
resourceName 字串
namespace 字串
users 字串陣列
filters Filter 陣列

AuditlogInventory

定義 AuditlogInventory API 的結構定義。

出現位置: - AuditlogInventoryList

欄位 說明
apiVersion 字串 logging.gdc.goog/v1
kind 字串 AuditlogInventory
metadata ObjectMeta 如需 metadata 的欄位,請參閱 Kubernetes API 說明文件。
spec AuditlogInventorySpec
status AuditlogInventoryStatus

AuditlogInventoryList

包含 AuditlogInventory 清單。

欄位 說明
apiVersion 字串 logging.gdc.goog/v1
kind 字串 AuditlogInventoryList
metadata ListMeta 如需 metadata 的欄位,請參閱 Kubernetes API 說明文件。
items AuditlogInventory 陣列

AuditlogInventorySpec

顯示位置: - AuditlogInventory

欄位 說明
oc 字串
apiServer ApiServerEntry 陣列
logFiles LogFile 陣列
syslogs Syslog 陣列

AuditlogInventoryStatus

顯示位置: - AuditlogInventory

欄位 說明
conditions Condition 陣列

條件

Condition 會定義篩選器的條件。

顯示位置: -「篩選器」

欄位 說明
path 字串
match 字串

ElasticOutput

定義 Elastic 輸出設定。

顯示位置: - SIEMDestinations

欄位 說明
host 字串 目標 Elastic 服務的主機名稱。
http_credential HTTPCredential Elastic 執行個體的 HTTP 憑證。
port 整數 Elastic 執行個體的 TCP 連接埠。
tls 字串
netConnectTimeout 整數
index 字串 Elastic 執行個體的索引。如未指定,系統會使用記錄類型 (稽核或作業)。

篩選器

篩選條件會定義規則,用於從稽核記錄中移除或取代特定欄位。可用於篩除敏感資訊或與稽核記錄無關的任何欄位。

出現位置: - ApiServerEntry

欄位 說明
name 字串
action 字串
targetPath 字串
conditions Condition 陣列

HTTPCredential

定義 Elastic SIEM 的 HTTP 憑證。

顯示位置: - ElasticOutput

欄位 說明
http_user 字串 Elastic 執行個體的 HTTP 使用者
http_passwd 字串 Elastic 執行個體的 HTTP 密碼

LogFile

LogFile 代表記錄檔設定。

出現位置: - AuditlogInventorySpec

欄位 說明
name 字串
path 字串

LoggingRule

定義 Logging Rules API 的結構定義。

出現位置: - LoggingRuleList

欄位 說明
apiVersion 字串 logging.gdc.goog/v1
kind 字串 LoggingRule
metadata ObjectMeta 如需 metadata 的欄位,請參閱 Kubernetes API 說明文件。
spec LoggingRuleSpec
status LoggingRuleStatus

LoggingRuleList

包含記錄規則清單。

欄位 說明
apiVersion 字串 logging.gdc.goog/v1
kind 字串 LoggingRuleList
metadata ListMeta 如需 metadata 的欄位,請參閱 Kubernetes API 說明文件。
items LoggingRule 陣列

LoggingRuleSpec

定義 LoggingRule 物件的規格或預期狀態。

顯示於: - LoggingRule

欄位 說明
source 來源 用來做為快訊依據的記錄來源。可接受的值為 operationalaudit
interval 字串 規則評估間隔。
limit 整數 警告數量上限。值為 0 表示沒有限制。
recordRules RecordRule 陣列 記錄規則清單。
alertRules AlertRule 陣列 快訊規則清單。

LoggingRuleStatus

定義 LoggingRule 物件的觀察狀態。

顯示於: - LoggingRule

欄位 說明
conditions Condition 陣列 記錄警告堆疊中觀察到的條件清單。
lokiInstance 字串 目前安裝 LoggingRule 物件的 Loki 主機執行個體名稱。

LoggingTarget

定義作業記錄目標 API 的結構定義。

出現位置: - LoggingTargetList

欄位 說明
apiVersion 字串 logging.gdc.goog/v1
kind 字串 LoggingTarget
metadata ObjectMeta 如需 metadata 的欄位,請參閱 Kubernetes API 說明文件。
spec LoggingTargetSpec
status LoggingTargetStatus

LoggingTargetList

包含記錄目標清單。

欄位 說明
apiVersion 字串 logging.gdc.goog/v1
kind 字串 LoggingTargetList
metadata ListMeta 如需 metadata 的欄位,請參閱 Kubernetes API 說明文件。
items LoggingTarget 陣列

LoggingTargetSelectors

提供選取器,決定要從哪些 Pod 或容器收集記錄。

顯示於: - LoggingTargetSpec

欄位 說明
matchClusters 字串陣列 要從中收集記錄的叢集。預設設定是從所有叢集收集記錄。不同叢集之間的關係為 OR 關係。舉例來說,值 ["admin", "system"] 表示將管理員叢集 OR 視為系統叢集。
matchPodNames 字串陣列 要收集記錄的 Pod 名稱前置字串。可觀測性平台會擷取名稱開頭為指定前置字元的所有 Pod。值只能包含 [a-z0-9-] 個字元。不同清單元素之間的關係為 OR 關係。
matchContainerNames 字串陣列 要收集記錄的容器名稱前置字串。可觀測性平台會擷取名稱開頭為指定前置字元的所有容器。值只能包含 [a-z0-9-] 個字元。不同清單元素之間的關係為 OR 關係。

LoggingTargetSpec

定義 LoggingTarget 物件的規格或預期狀態。

顯示位置: - LoggingTarget

欄位 說明
selector LoggingTargetSelectors 比對模式,用於識別要從哪些 Pod 或容器收集記錄。不同選取器之間的關係為 AND 關係,因此系統會考量所有選取器。
logAccessLevel LogAccessLevel 記錄檔項目的存取層級。應用程式運算子的預設值為 AO
parser OperationalLogParser 記錄項目的預先定義剖析器。
serviceName 字串 要套用為標籤的服務名稱。如果是使用者工作負載,您可以考慮將這個欄位做為工作負載名稱。
additionalFields 物件 (鍵:字串,值:字串) 要套用至記錄項目的額外靜態欄位。這個欄位是鍵/值組合的對應,其中欄位名稱是鍵,欄位值是值。

LoggingTargetStatus

定義 LoggingTarget 物件的觀察狀態。

顯示位置: - LoggingTarget

欄位 說明
conditions Condition 陣列 記錄堆疊中觀察到的條件清單。

RecordRule

定義記錄規則設定。

出現位置: - LoggingRuleSpec

欄位 說明
record 字串 要寫入記錄規則的時間序列。必須是有效的指標名稱。
expr 字串 用於評估記錄規則的 PromQL 或 LogQL 運算式。
labels 物件 (鍵:字串,值:字串) 要新增或覆寫的標籤。

SIEMDestinations

SIEMDestinations 定義可能的 SIEM 目的地設定。 使用者必須在 splunkelastic 欄位下指定輸出內容。

出現位置: - SIEMOrgForwarderSpec

欄位 說明
splunkOutputs SplunkOutput 陣列 Splunk 會定義 Splunk 目的地設定清單。
elasticOutputs ElasticOutput 陣列 Elastic 會定義 Elastic 目的地設定清單。

SIEMOrgForwarder

定義 SIEMOrgForwarder API 的結構定義。 這個 API 會定義記錄類型 (稽核或作業) 和傳送記錄的外部 SIEM 目的地。

顯示於: - SIEMOrgForwarderList

欄位 說明
apiVersion 字串 logging.gdc.goog/v1
kind 字串 SIEMOrgForwarder
metadata ObjectMeta 如需 metadata 的欄位,請參閱 Kubernetes API 說明文件。
spec SIEMOrgForwarderSpec
status SIEMOrgForwarderStatus

SIEMOrgForwarderList

包含 SIEMOrgForwarder 物件清單。

欄位 說明
apiVersion 字串 logging.gdc.goog/v1
kind 字串 SIEMOrgForwarderList
metadata ListMeta 如需 metadata 的欄位,請參閱 Kubernetes API 說明文件。
items SIEMOrgForwarder 陣列

SIEMOrgForwarderSpec

定義 SIEMOrgForwarder 資源的規格或預期狀態。

出現位置: - SIEMOrgForwarder

欄位 說明
source LogType 要匯出至 SIEM 目的地的記錄類型。可接受的值為 operationalaudit
destinations SIEMDestinations 「目的地」會指定 SIEM 輸出設定。目前可用的目的地為 Splunk 和 Elastic
splunkOutputs SplunkOutput 陣列 TODO (b/427090537):這個欄位支援回溯相容性,將在 1.17 版中移除

SIEMOrgForwarderStatus

定義 SIEMOrgForwarder 資源的觀察狀態。

出現位置: - SIEMOrgForwarder

欄位 說明
conditions Condition 陣列 SIEMOrgForwarder 資源的觀察狀態。

SplunkOutput

定義 Splunk 輸出設定。

顯示於: - SIEMDestinations - SIEMOrgForwarderSpec

欄位 說明
host 字串 目標 Splunk 服務的主機名稱。
token 權杖 HTTP 事件收集器介面的驗證權杖。
tls 字串 傳輸層安全標準 (TLS) 通訊協定。詳情請參閱 https://docs.fluentbit.io/manual/administration/transport-security。
netConnectTimeout 整數 等待建立 TCP 連線的時間上限 (以秒為單位)。這個值包含 TLS 握手時間。

系統記錄檔

Syslog 代表 syslog 設定。

出現位置: - AuditlogInventorySpec

欄位 說明
name 字串
auditLoggingTargetName 字串
auditLoggingTargetNamespace 字串

權杖

定義 SIEM 匯出作業的權杖設定。

顯示於: - SplunkOutput

欄位 說明
name 字串 權杖名稱。
field 字串 權杖的欄位。