搭配 Google SecOps 使用 Bindplane
本文說明 Google Security Operations 適用的 Bindplane。
Bindplane 是遙測管道,可從任何來源收集、精簡及匯出記錄檔至 Google SecOps。
Bindplane 提供兩個特別為 Google 設計的版本。
Bindplane 包含下列主要元件:
- Bindplane Collector。以 OpenTelemetry (OTel) Collector 為基礎的開放原始碼代理程式。這項服務會收集各種來源的記錄,包括 Microsoft Windows 事件記錄,並傳送至 Google SecOps。您可以在地端或雲端安裝收集器。這個元件也稱為 Bindplane Distribution for OpenTelemetry (BDOT) Collector bindplane 代理程式、收集代理程式、收集器或代理程式。
- Bindplane 伺服器。這個全面整合的平台可管理 OTel 收集器部署作業,這些部署作業可位於 Google SecOps 和 Google Cloud。Bindplane Server 可在地端或 Bindplane 雲端執行。如要進一步瞭解控制台,請參閱「Bindplane 管理控制台」。這個元件也稱為 Bindplane 可觀測性管道 (OP) 管理控制台或 Bindplane 管理控制台。
Bindplane 的 Google 版本
Bindplane 提供兩種特別為 Google 設計的版本:Bindplane (Google 版) 和 Bindplane Enterprise (Google 版)。
Bindplane (Google 版本)
所有 Google SecOps 客戶皆可使用 Bindplane (Google 版),無須額外付費。詳情請參閱「Industry-Leading Observability and Security Powered by OpenTelemetry」。
您可以在 Bindplane 雲端上自助式使用 Bindplane (Google 版)。
如要瞭解如何開始安裝及自行代管 Bindplane (Google 版),請參閱 Bindplane (Google 版)。
Bindplane Enterprise (Google 版) - 適用於 Google SecOps Enterprise Plus 客戶
Google SecOps Enterprise Plus 客戶可使用 Bindplane Enterprise (Google 版)。
大規模部署作業建議使用 Bindplane Enterprise (Google 版)。
如要取得 Bindplane Enterprise (Google 版) 的授權金鑰,請與 Google 帳戶團隊聯絡。
Bindplane Google 版本 - 差異
下表列出 Bindplane Google 版本之間的差異:
功能 | Bindplane (Google 版本) | Bindplane Enterprise (Google 版本) |
---|---|---|
費用 | 所有 Google SecOps 客戶皆可使用,無須額外付費 | Google SecOps Enterprise Plus 客戶可免費使用 |
路徑/目的地 | 僅限 Google,包括 Google SecOps、Cloud Logging、BigQuery 和 Cloud Storage (透過 Google SecOps) | Google,包括 12 個月將資料傳送至非 Google 目的地的服務,以便完成 SIEM 遷移作業 |
篩選 | 使用規則運算式的基本篩選器 | 進階篩選處理器 (例如依條件、欄位、嚴重程度等篩選)、 資料縮減、記錄取樣、重複資料刪除 |
塗銷 | 不適用 | 遮蓋個人識別資訊 |
轉型 | 新增欄位、移動欄位、剖析資料 (KV、JSON、CSV、XML、時間戳記、依規則運算式剖析)、重新命名欄位、事件分隔符 | 包含 Bindplane (Google 版) 支援的所有功能,外加刪除欄位、刪除空白值、合併 |
一般平台層級功能 | 閘道 (彙整來自代理程式的資料)、用於收集資料的 Bindplane 代理程式、用於內部部署或雲端代管的 Bindplane 管理層、所有來源、透過 SecOps 處理器進行無聲主機監控、持續性佇列、豐富的遙測資料、高可用性、角色式存取控管、支援 SecOps 擷取 API、憑證模糊處理、進階機群管理 (包括代理程式分組、動態記錄類型指派) | Bindplane (Google 版) 支援的所有功能 |
Bindplane 管理控制台
使用 Bindplane 管理控制台是選用做法。許多 Google SecOps 客戶都使用 Bindplane Server。
Bindplane 管理控制台提供下列主要功能:
- 集中管理。您可以在控制台中管理所有 OTel 收集器部署作業 Google Cloud。您可以查看各項部署作業的狀態,以及執行常見的管理工作,例如啟動、停止及重新啟動收集器。
- 即時監控。主控台可即時監控 OTel 收集器部署作業。您可以追蹤 CPU 用量、記憶體用量和處理量等指標,以及查看記錄和追蹤記錄來排解問題。
- 快訊和通知:您可以在控制台中設定重要事件的快訊和通知,例如收集器停止運作或超出指標門檻時。
- 設定管理:您可以在控制台中集中管理 OTel 收集器的設定。您可以編輯設定檔、設定環境變數,並將安全性政策套用至所有部署作業。
- 與 Google Cloud整合。您可以在 Google Cloud 中建立及管理 OTel 收集器部署作業,並使用控制台存取 Google Cloud 資源。
Bindplane 代理程式架構
Bindplane Agent 可在 Linux 或 Docker 中執行,做為輕量型網頁伺服器,且沒有外部依附元件。
Bindplane 會使用 BDOT 收集器,透過 Open Agent Management Protocol (OpAMP) 標準化遙測管理作業。您也可以使用 Bindplane 建立及管理自訂 OpenTelemetry Collector 發行版本。
如要進一步瞭解 Bindplane OpenTelemetry 收集器的部署架構,請參閱「Bindplane OTel Collector」。
以下各節說明可用的架構選項。
收集代理程式會將記錄傳送至做為閘道的收集代理程式
如果是大規模部署,建議您使用 Bindplane Enterprise (Google 版) 代理程式做為閘道。這些閘道會透過網路接收其他收集器的遙測資料,視需要執行額外處理作業,然後將資料傳送至 Google SecOps。
做為閘道的收集代理程式與其他收集代理程式使用相同的二進位檔。
下圖顯示收集代理程式將記錄傳送至做為閘道的收集代理程式。
收集代理程式會將記錄直接傳送至 Google SecOps 擷取 API
下圖顯示收集代理程式直接將記錄傳送至 Google SecOps 擷取 API。
收集代理程式會直接將記錄檔傳送至 Cloud Logging
下圖顯示收集代理程式直接將記錄傳送至 Cloud Logging。
收集代理程式會將記錄檔傳送至多個目的地
下圖顯示收集代理程式將記錄傳送至多個目的地。
Bindplane 部署作業類型
Bindplane 提供雲端和內部部署選項。
地端部署作業
- Linux
- Docker
詳情請參閱「安裝 Bindplane Server」。
Linux
Linux 發行版:
- Red Hat、Centos、Oracle Linux 7、8、9
- Debian 11 和 12
- Ubuntu LTS 20.04 和 22.04
- SUSE Linux 12 和 15
- Alma 和 Rocky Linux
詳情請參閱下列資源:
Docker 容器映像檔
您可以在下列位置找到 Bindplane Docker 容器映像檔:
- GitHub 套件:
ghcr.io/observiq/Bindplane-ee
- Google 構件存放區:
us-central1-docker.pkg.dev/observiq-containers/bindplane/bindplane-ee
- Docker Hub:
observiq/bindplane-ee
容器映像檔會標記發布版本,例如發布版本 v1.35.0 會標記為 observiq/bindplane-ee:1.35.0
。
技術規定和建議
本節說明安裝及執行 Bindplane with Google SecOps 的技術規定和建議。
頻寬需求
Bindplane 會維護下列項目的網路連線:
- 收集器管理
- 收集器總處理量評估
- 指令列和網頁使用者介面
連線需求
Bindplane 預設會監聽通訊埠 3001。這個連接埠可設定。
Bindplane 通訊埠的用途如下:
- 使用 OpAMP (WebSocket) 收集器指令和控制項
- 收集器輸送量測量要求 (HTTP
POST
要求) - 瀏覽器和 CLI 使用者 (HTTP 和 WebSocket)
收集器必須能夠啟動與 Bindplane for OpAMP 的連線 (WebSocket),以及啟動與輸送量測量的連線 (HTTP)。
Bindplane 不會主動連線至收集器,您可以設定防火牆,防止 Bindplane 連上收集器網路;不過,收集器網路必須能夠透過設定的通訊埠連上 Bindplane。
Bindplane 收集器一般技術規定
如要瞭解 Bindplane 收集器的基本技術規定,請參閱下列文章:
收集器資源需求
Bindplane 的資源需求會因受管理收集器的數量而異。隨著受管理收集器的數量增加,CPU、記憶體、磁碟處理量/IOPS 和網路用量也會增加。
請參閱下表,瞭解 CPU、記憶體和儲存空間容量大小:
收藏家數量 | Bindplane 節點 | 容錯功能 | CPU 核心 | 記憶體 | 資料庫 |
---|---|---|---|---|---|
1 到 100 人 | 1 | 不適用 | 2 | 4 GB | bbolt |
100 至 25,000 | 1 | 不適用 | 4 | 16 GB | postgres |
1 到 60,000 | 3 | 1 | 2 | 8 GB | postgres |
60,001 至 125,000 | 5 | 1 | 2 | 8 GB | postgres |
125,001 到 250,000 人 | 10 | 2 | 2 | 8 GB | postgres |
規劃安裝和部署作業
以下各節提供建議和最佳做法,供您規劃 Bindplane 部署作業時參考。
考慮擴充性和容錯能力
閘道收集器會透過網路接收遙測資料。建議您搭配負載平衡器使用,以提供容錯能力和水平擴展功能。
建議採用水平擴充,因為這可提供容錯能力,並消除匯出工具瓶頸。
計算所需的收集器數量
計算工作負載所需的收集器數量時,請考量預期輸送量或記錄檔速率,並使用下表。下表假設每個收集器都有四個 CPU 核心和 16 GB 的記憶體。這份表格未將處理器納入考量,因此新增處理器時,運算需求會增加。
遙測處理量 | 每秒記錄數 | 收藏家 |
---|---|---|
5 GB/分鐘 | 250,000 | 2 |
10 GB/m | 500,000 | 3 |
20 GB/月 | 1,000,000 | 5 |
100 GB/月 | 5,000,000 | 25 |
為容錯能力過度佈建收集器機群
過度佈建收集器機群,確保容錯能力。如果一或多個收集器系統故障或離線維護,其餘收集器必須有足夠的容量來管理遙測輸送量。
如果您使用固定數量的收集器,可以實作 CPU 和記憶體的垂直擴充,以提高輸送量。
卸載處理負擔
一般來說,您會希望收集器盡可能減少工作量。如果處理需求量大,將處理作業卸載至閘道收集器叢集會很有幫助。舉例來說,您可以讓閘道收集器執行這項工作,而不是使用耗費資源的規則運算式作業篩選遙測資料。一般來說,閘道收集器會在專用系統上執行。這項做法可合理化處理程序負荷,因為與可能在資料庫伺服器上執行的非閘道收集器不同,這項做法不會耗用在同一系統上執行的其他服務運算能力。
閘道模式的最佳做法
使用 Bindplane 收集代理程式做為閘道時,請以閘道模式規劃部署作業,並遵循下列最佳做法:
- 在負載平衡器後方放置至少兩個收集器。
- 每個收集器至少要有兩個核心。
- 每個收集器至少要有 8 GB 的記憶體。
- 每個收集器應有 60 GB 的可用空間,供永久佇列使用。
視需要使用負載平衡器
以高可用性模式運作 Bindplane 時,必須使用負載平衡器。
在閘道模式下使用 Bindplane 收集代理程式時,請使用負載平衡器來提升效能和備援能力。負載平衡也能讓閘道機群進行水平擴充,並在發生故障時繼續運作,不會造成服務中斷。
在閘道模式下運作時,Bindplane 收集代理程式可與各種負載平衡器搭配使用。本文不會討論任何特定選項,因為大多數熱門的負載平衡解決方案都支援可靠運作多個收集器所需的功能。
詳情請參閱「負載平衡器」。
負載平衡通訊埠和通訊協定
Bindplane 預設會監聽通訊埠 3001。
為支援 OpenTelemetry 中各種網路型接收器,負載平衡器必須支援:
- TCP/UDP 傳輸通訊協定
- HTTP 和 gRPC 應用程式通訊協定
負載平衡大小
為確保容錯能力,Bindplane 節點管理收集器的數量不得超過 30,000 個。每個收集器都會開啟與 Bindplane 的兩條連線 (一條用於 OpAMP 遠端管理,另一條用於發布輸送量指標)。這項限制可確保您不會超過大多數負載平衡器對每個後端執行個體設定的連線限制 (約 65,535 個)。
如果機構有 10 萬個收集器,叢集大小為 3 就不夠。每個節點約負責 33,000 個收集器,也就是每個 Bindplane 執行個體有 66,000 個 TCP 連線。如果其中一個節點因維護而停機,情況會更加惡化,因為每個剩餘的 Bindplane 執行個體隨後會管理 50,000 個收集器,或 100,000 個 TCP 連線。
負載平衡大小調整最佳做法
- 實作健康狀態檢查。設定負載平衡器,確保收集器已準備好接收流量。
- 平均分配連線。連線應平均分配給收集器。
支援必要通訊協定。為支援 OpenTelemetry 中各種網路型接收器,負載平衡器必須支援:
- TCP/UDP 傳輸通訊協定
- HTTP 和 gRPC 應用程式通訊協定
詳情請參閱「收集器復原能力」。
來源類型負載平衡
任何透過網路從遠端系統接收遙測資料的來源類型,都適合進行負載平衡,包括:
- OTLP
- 系統記錄檔
- TCP/UDP
- Splunk HEC
- Fluent Forward
在正式環境中使用高可用性模式
您可以部署單一執行個體或多個執行個體的 Bindplane 執行個體。單一執行個體或多個執行個體設定。如為需要高可用性 (HA) 和復原能力的實際工作環境部署作業,建議使用多執行個體 (HA) 部署模型。
如果 Bindplane 管理的收集器超過 25,000 個,建議您以高可用性 (HA) 模式運作 Bindplane。
如要瞭解 Bindplane 中的高可用性,請參閱「高可用性」。
計算高可用性所需的收集器和 Bindplane 伺服器數量
在高可用性模式下運作 Bindplane 時,您需要考量每個 Bindplane 伺服器預計要處理多少收集器。
計算 Bindplane 執行個體總數,然後扣除因維護作業而無法使用的節點數量上限。請確保每個節點在節點中斷期間管理的收集器不超過 30,000 個。
適用於高可用性的 Postgres
以高可用性模式運作 Bindplane 時,Postgres 是必要條件。
適用於高可用性的 Prometheus
在高可用性模式下運作 Bindplane 時,必須使用 Prometheus。
詳情請參閱「Prometheus」。
高可用性事件匯流排
Bindplane 會使用事件匯流排,在 Bindplane 內的元件之間進行通訊。以高可用性模式運作 Bindplane 時,您可以使用事件匯流排在 Bindplane 伺服器之間傳送事件。
詳情請參閱「事件匯流排」。
針對測試環境或概念驗證使用單一執行個體部署
如果是測試環境或概念驗證,建議使用單一執行個體部署。
詳情請參閱「單一執行個體」。
隔離後端憑證
您不必將憑證部署至所有收集器系統,而是只保留在閘道收集器上。這項功能可簡化憑證輪替作業,並將憑證部署限制在部分系統,進而減少安全攻擊面。
為閘道收集器設定防火牆
您可以在周邊網路中放置閘道收集器,並透過防火牆與內部網路隔離。您可以設定網路,允許其他收集器將資料轉送至閘道收集器,同時禁止閘道收集器存取應用程式網路。這樣一來,您就能將遙測資料傳送至雲端後端,不必授予端點直接存取網際網路的權限。
防火牆必須允許 HTTP 流量透過設定的通訊埠連線至 Bindplane。
驗證防火牆設定
代理程式與網際網路之間的任何防火牆或經過驗證的 Proxy,都需要規則來開放存取下列主機:
連線類型 | 目的地 | 通訊埠 |
---|---|---|
TCP | malachiteingestion-pa.googleapis.com | 443 |
TCP | asia-northeast1-malachiteingestion-pa.googleapis.com | 443 |
TCP | asia-south1-malachiteingestion-pa.googleapis.com | 443 |
TCP | asia-southeast1-malachiteingestion-pa.googleapis.com | 443 |
TCP | australia-southeast1-malachiteingestion-pa.googleapis.com | 443 |
TCP | europe-malachiteingestion-pa.googleapis.com | 443 |
TCP | europe-west2-malachiteingestion-pa.googleapis.com | 443 |
TCP | europe-west3-malachiteingestion-pa.googleapis.com | 443 |
TCP | europe-west6-malachiteingestion-pa.googleapis.com | 443 |
TCP | europe-west12-malachiteingestion-pa.googleapis.com | 443 |
TCP | me-central1-malachiteingestion-pa.googleapis.com | 443 |
TCP | me-central2-malachiteingestion-pa.googleapis.com | 443 |
TCP | me-west1-malachiteingestion-pa.googleapis.com | 443 |
TCP | northamerica-northeast2-malachiteingestion-pa.googleapis.com | 443 |
TCP | accounts.google.com | 443 |
TCP | oauth2.googleapis.com | 443 |
在正式版部署作業中使用 PostgreSQL
如要在實際工作環境中部署 Bindplane,必須使用 Postgres。
如要在高可用性模式下運作 Bindplane,必須先安裝 Postgres。
CPU 核心數量和可用記憶體通常會限制 PostgreSQL 儲存空間後端的效能。建議您使用低延遲、高總處理量的儲存空間 (例如固態硬碟 (SSD)) 備份 PostgreSQL 儲存空間。
收藏者人數 | CPU 核心 | 記憶體 |
---|---|---|
1 到 60,000 | 4 | 16 GB |
60,001 至 125,000 | 8 | 32 GB |
125,001 到 250,000 人 | 16 | 64 GB |
詳情請參閱下列資源:
導入適當的驗證機制
Bindplane 支援使用下列通訊協定和服務進行驗證,請確保這些通訊協定和服務已正確導入:
- Azure Entra LDAP。詳情請參閱「Azure LDAP」和「變更 Bindplane 驗證類型」。
- LDAP。
- OpenID Connect (OIDC)。
- 當地。
- SAML。
- Postgres TLS。詳情請參閱 Postgres TLS。
- Kubernetes。詳情請參閱「GKE Workload Identity」。
安裝 Bindplane 管理控制台
大多數 Google SecOps 客戶都使用 Bindplane 管理控制台。如要安裝,必須存取 storage.googleapis.com
。如果只安裝代理程式,則不需要這項存取權。
Google 客戶也能使用 Bindplane Cloud。下載免費版本,然後傳送電子郵件至 support@bindplane.com,要求升級至 Google 支援的版本。
您可以透過三種方式部署 Bindplane 管理控制台:
- Bindplane Cloud:Bindplane 的 SaaS 產品,適用於 Bindplane Server。
- 在 Linux 主機上進行下載及安裝:提供 DEB 套件、RPM 套件或 Docker 映像檔。
- 從 Google Cloud Marketplace 安裝及佈建。
安裝 Bindplane 代理程式
本節說明如何在不同主機作業系統上安裝 Google SecOps 適用的 Bindplane 代理程式。
代理程式收集器通常會使用最少的資源。不過,處理大量記錄時,請留意資源耗用情況,以免影響其他服務。詳情請參閱「技術需求和建議」、「規劃安裝和部署作業」和「代理程式大小和資源調度」。
如要進一步瞭解如何安裝 OTel 代理程式,請參閱「安裝及解除安裝 Bindplane 收集器」。
如有任何與收集器相關的問題,請與 Google Cloud 支援團隊聯絡。
如要安裝代理程式,請備妥下列項目:
Google SecOps 擷取驗證檔案
如要下載驗證檔案,請按照下列步驟操作:
- 開啟 Google SecOps 控制台。
- 依序前往「SIEM 設定」 >「收集代理程式」。
- 下載 Google SecOps 擷取驗證檔案。
Google SecOps 客戶 ID
如要查看客戶 ID,請按照下列步驟操作:
- 開啟 Google SecOps 控制台。
- 依序前往「SIEM 設定」>「設定檔」。
- 從「機構詳細資料」部分複製客戶 ID。
Windows 2012 SP2 以上版本或搭載 systemd 的 Linux 主機
網際網路連線
GitHub 存取權
部署工具
本節說明 Bindplane 的部署工具。
GitOps
使用 GitOps 模型部署 Bindplane 資源,包括:
- Bindplane 驗證
- Bindplane CLI
- 網路存取
- 與 GitHub 存放區和 GitHub Actions 整合
- 匯出現有資源
- 管理敏感值
- 建立 GitHub Action 工作流程
- 逐步說明如何提交及測試設定、啟用自動推出功能,以及使用直接編輯或 UI 匯出方法更新資源
- 更新機密值並採用 RBAC
詳情請參閱 GitOps。
Ansible
如要瞭解如何使用 Ansible 部署 Bindplane,請參閱 bindplane-agent-ansible。
Bindplane CLI
如要瞭解 Bindplane CLI,請參閱 GitOps。
Terraform
如要瞭解如何使用 Terraform 設定 Bindplane 資源,請參閱 Bindplane Provider。
Kubernetes
如要瞭解如何搭配使用 Kubernetes 和 Bindplane,請參閱下列文章:
在 Windows 上安裝 Bindplane 代理程式
如要在 Windows 上安裝 Bindplane 代理程式,請執行下列 PowerShell 指令:
msiexec /i "https://github.com/observIQ/bindplane-agent/releases/latest/download/observiq-otel-collector.msi" /quiet
如要使用安裝精靈安裝,請下載 Windows 最新安裝程式。下載安裝程式後,請開啟安裝精靈,然後按照操作說明設定及安裝 Bindplane 代理程式。
如要進一步瞭解如何在 Windows 上安裝 Bindplane 代理程式,請參閱「Windows 安裝」。
在 Linux 上安裝 Bindplane 代理程式
您可以使用指令碼在 Linux 上安裝代理程式,該指令碼會自動判斷要安裝的套件。您也可以使用相同指令碼更新現有安裝項目。
如要使用安裝指令碼進行安裝,請執行下列指令碼:
sudo sh -c "$(curl -fsSlL https://github.com/observiq/bindplane-agent/releases/latest/download/install_unix.sh)" install_unix.sh
如要進一步瞭解如何設定收集器,請參閱 bindplane-otel-collect。
從本機套件安裝
如要從本機套件安裝代理程式,請使用 -f
和套件路徑。
sudo sh -c "$(curl -fsSlL https://github.com/observiq/bindplane-agent/releases/latest/download/install_unix.sh)" install_unix.sh -f path_to_package
RPM 安裝
從發布頁面下載適用於您架構的 RPM 套件,然後使用 rpm
安裝套件。請參考下列範例,安裝 amd64
套件:
sudo rpm -U ./observiq-otel-collector_v${VERSION}_linux_amd64.rpm sudo systemctl enable --now observiq-otel-collector
將 VERSION
替換為您下載的套件版本。
安裝 DEB
從發布頁面下載適用於您架構的 DEB 套件,然後使用 dpkg
安裝套件。請參閱下列範例,瞭解如何安裝 amd64
套件:
sudo dpkg -i --force-overwrite ./observiq-otel-collector_v${VERSION}_linux_amd64.deb sudo systemctl enable --now observiq-otel-collector
將 VERSION
替換為您下載的套件版本。
詳情請參閱「Bindplane 代理程式安裝」。
設定 Bindplane 代理程式
安裝代理程式後,observiq-otel-collector
服務就會執行,並可供設定。
您可以手動設定代理程式,也可以使用 Bindplane 管理主控台。
如果手動設定代理程式,請務必更新匯出工具參數,確保代理程式能向 Google SecOps 進行驗證。
OTel 收集器設定檔
在 Linux 中,收集器的設定檔位於 /opt/observiq-otel-collector/config.yaml
。
OTel 收集器服務和記錄檔
代理程式預設會記錄到 C:\Program Files\observIQ OpenTelemetry Collector\log\collector.log
。
代理程式程序的標準錯誤記錄檔位於 C:\Program Files\observIQ OpenTelemetry Collector\log\observiq_collector.err
。
如要進一步瞭解如何設定收集器,請參閱 bindplane-otel-collect。
在 Linux 中,如要查看收集器的記錄,請執行 sudo tail -F /opt/observiq-otel-collector/log/collector.log
。
常見的 Linux OTel 收集器服務指令:
如要停止 OTel 收集器服務,請執行
sudo systemctl stop observiq-otel-collector
。如要啟動 OTel 收集器服務,請執行
sudo systemctl start observiq-otel-collector
。如要重新啟動 OTel 收集器服務,請執行
sudo systemctl restart observiq-otel-collector
。如要在啟動時啟用 OTel 收集器服務,請執行
sudo systemctl enable observiq-otel-collector
。
重新啟動代理程式服務,以套用設定變更
變更設定時,您必須重新啟動代理程式服務,設定變更才會生效 (sudo systemctl restart observiq-otel-collector
)。
使用預設範例設定檔
根據預設,代理程式設定檔位於 C:\Program Files\observIQ OpenTelemetry Collector\config.yaml
。
您可以前往 Google SecOps 控制台 >「SIEM 設定」>「收集代理程式」,下載代理程式使用的範例設定檔和驗證權杖。
在設定檔中自訂下列兩個部分:
- 接收器:指定代理程式應收集哪些記錄並傳送至 Google SecOps。
- Exporter:指定代理程式傳送記錄檔的目的地。
系統支援下列匯出工具:
- Google SecOps 匯出工具:直接將記錄傳送至 Google SecOps 擷取 API。
- Google SecOps 轉送器匯出器:將記錄傳送至 Google SecOps 轉送器。
- Cloud Logging 匯出工具:將記錄檔傳送至 Cloud Logging。
在匯出工具中,自訂下列項目:
customer_id
:您的 Google SecOps 客戶 ID。endpoint
:您的 Google SecOps 區域端點。creds
:您的驗證權杖。或者,您也可以使用
creds_file_path
直接參照憑證檔案。如果是 Windows 設定,請使用反斜線逸出路徑。log_type
:記錄類型。建議您選取「WINDOWS_DNS」做為「記錄類型」。ingestion_labels
:擷取標籤。這些標籤可識別 Google SecOps 中的記錄。namespace
:選用命名空間。每種記錄類型都需要設定匯出工具。
記錄檔收集設定範例
下列各節包含記錄檔收集作業的設定範例。
將 Windows 事件和系統監視器直接傳送至 Google SecOps
在範例中設定下列參數:
-
namespace
ingestion_labels
log_type
customer_id
creds
範例設定:
receivers:
windowseventlog/sysmon:
channel: Microsoft-Windows-Sysmon/Operational
raw: true
windowseventlog/security:
channel: security
raw: true
windowseventlog/application:
channel: application
raw: true
windowseventlog/system:
channel: system
raw: true
processors:
batch:
exporters:
chronicle/sysmon:
endpoint: malachiteingestion-pa.googleapis.com
creds: '{
"type": "service_account",
"project_id": "malachite-projectname",
"private_key_id": "abcdefghijklmnopqrstuvwxyz123456789",
"private_key": "-----BEGIN PRIVATE KEY-----abcdefg-----END PRIVATE KEY-----\n",
"client_email": "account@malachite-projectname.iam.gserviceaccount.com",
"client_id": "123456789123456789",
"auth_uri": "https://accounts.google.com/o/oauth2/auth",
"token_uri": "https://oauth2.googleapis.com/token",
"auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
"client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/account%40malachite-projectname.iam.gserviceaccount.com",
"universe_domain": "googleapis.com"
}'
log_type: 'WINDOWS_SYSMON'
override_log_type: false
raw_log_field: body
customer_id: 'dddddddd-dddd-dddd-dddd-dddddddddddd'
chronicle/winevtlog:
endpoint: malachiteingestion-pa.googleapis.com
creds: '{
"type": "service_account",
"project_id": "malachite-projectname",
"private_key_id": "abcdefghijklmnopqrstuvwxyz123456789",
"private_key": "-----BEGIN PRIVATE KEY-----abcdefg-----END PRIVATE KEY-----\n",
"client_email": "account@malachite-projectname.iam.gserviceaccount.com",
"client_id": "123456789123456789",
"auth_uri": "https://accounts.google.com/o/oauth2/auth",
"token_uri": "https://oauth2.googleapis.com/token",
"auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
"client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/account%40malachite-projectname.iam.gserviceaccount.com",
"universe_domain": "googleapis.com"
}'
log_type: 'WINEVTLOG'
override_log_type: false
raw_log_field: body
customer_id: 'dddddddd-dddd-dddd-dddd-dddddddddddd'
service:
pipelines:
logs/sysmon:
receivers: [windowseventlog/sysmon]
processors: [batch]
exporters: [chronicle/sysmon]
logs/winevtlog:
receivers:
- windowseventlog/security
- windowseventlog/application
- windowseventlog/system
processors: [batch]
exporters: [chronicle/winevtlog]
將 Windows 事件和系統記錄直接傳送至 Google SecOps
在範例中設定下列參數:
windowseventlogreceiver
tcplogreceiver
listen_address
chronicleexporter
namespace
ingestion_labels
log_type
customer_id
creds
範例設定:
receivers:
tcplog:
listen_address: "0.0.0.0:54525"
windowseventlog/source0__application:
attributes:
log_type: windows_event.application
channel: application
max_reads: 100
poll_interval: 1s
raw: true
start_at: end
windowseventlog/source0__security:
attributes:
log_type: windows_event.security
channel: security
max_reads: 100
poll_interval: 1s
raw: true
start_at: end
windowseventlog/source0__system:
attributes:
log_type: windows_event.system
channel: system
max_reads: 100
poll_interval: 1s
raw: true
start_at: end
exporters:
chronicle/chronicle_w_labels:
compression: gzip
creds: '{ json blob for creds }'
customer_id: <customer_id>
endpoint: malachiteingestion-pa.googleapis.com
ingestion_labels:
env: dev
log_type: <applicable_log_type>
namespace: testNamespace
raw_log_field: body
service:
pipelines:
logs/source0__chronicle_w_labels-0:
receivers:
- windowseventlog/source0__system
- windowseventlog/source0__application
- windowseventlog/source0__security
exporters:
- chronicle/chronicle_w_labels
logs/source1__chronicle_w_labels-0:
receivers:
- tcplog
exporters:
- chronicle/chronicle_w_labels
將 Windows 事件和系統記錄傳送至 Google SecOps 轉送器
在範例中設定下列參數:
windowseventlogreceiver
tcplogreceiver
listen_address
chronicleforwarder
endpoint
範例設定:
receivers:
tcplog:
listen_address: "0.0.0.0:54525"
windowseventlog/source0__application:
attributes:
log_type: windows_event.application
channel: application
max_reads: 100
poll_interval: 1s
raw: true
start_at: end
windowseventlog/source0__security:
attributes:
log_type: windows_event.security
channel: security
max_reads: 100
poll_interval: 1s
raw: true
start_at: end
windowseventlog/source0__system:
attributes:
log_type: windows_event.system
channel: system
max_reads: 100
poll_interval: 1s
raw: true
start_at: end
exporters:
chronicleforwarder/forwarder:
export_type: syslog
raw_log_field: body
syslog:
endpoint: 127.0.0.1:10514
transport: udp
service:
pipelines:
logs/source0__forwarder-0:
receivers:
- windowseventlog/source0__system
- windowseventlog/source0__application
- windowseventlog/source0__security
exporters:
- chronicleforwarder/forwarder
logs/source1__forwarder-0:
receivers:
- tcplog
exporters:
- chronicleforwarder/forwarder
直接將系統記錄傳送至 Google SecOps
在範例中設定下列參數:
tcplogreceiver
listen_address
chronicleexporter
namespace
ingestion_labels
log_type
customer_id
Creds
範例設定:
receivers:
tcplog:
listen_address: "0.0.0.0:54525"
exporters:
chronicle/chronicle_w_labels:
compression: gzip
creds: '{ json blob for creds }'
customer_id: <customer_id>
endpoint: malachiteingestion-pa.googleapis.com
ingestion_labels:
env: dev
log_type: <applicable_log_type>
namespace: testNamespace
raw_log_field: body
service:
pipelines:
logs/source0__chronicle_w_labels-0:
receivers:
- tcplog
exporters:
- chronicle/chronicle_w_labels
遠端收集 Windows 事件,並直接傳送至 Google SecOps
在範例中設定下列參數:
windowseventlogreceiver
username
password
server
chronicleexporter
namespace
ingestion_labels
log_type
customer_id
creds
範例設定:
receivers:
windowseventlog/system:
channel: system
max_reads: 100
start_at: end
poll_interval: 10s
raw: true
remote:
username: "username"
password: "password"
server: "remote-server"
windowseventlog/application:
channel: application
max_reads: 100
start_at: end
poll_interval: 10s
raw: true
remote:
username: "username"
password: "password"
server: "server-ip"
windowseventlog/security:
channel: security
max_reads: 100
start_at: end
poll_interval: 10s
raw: true
remote:
username: "username"
password: "password"
server: "server-ip"
exporters:
chronicle/chronicle_w_labels:
compression: gzip
creds: '{ json blob for creds }'
customer_id: <customer_id>
endpoint: malachiteingestion-pa.googleapis.com
ingestion_labels:
env: dev
log_type: WINEVTLOG
namespace: testNamespace
raw_log_field: body
service:
pipelines:
logs/source0__chronicle_w_labels-0:
receivers:
- windowseventlog/system
- windowseventlog/application
- windowseventlog/security
exporters:
- chronicle/chronicle_w_labels
將資料傳送至 Cloud Logging
在範例中設定 credentials_file
參數。
範例設定:
exporters:
googlecloud:
credentials_file: /opt/observiq-otel-collector/credentials.json
查詢 SQL 資料庫,並將結果傳送至 Google SecOps
在範例中設定下列參數:
sqlqueryreceiver
chronicleexporter
namespace
ingestion_labels
log_type
customer_id
creds
範例設定:
receivers:
sqlquery/source0:
datasource: host=localhost port=5432 user=postgres password=s3cr3t sslmode=disable
driver: postgres
queries:
- logs:
- body_column: log_body
sql: select * from my_logs where log_id > $$1
tracking_column: log_id
tracking_start_value: "10000"
processors:
transform/source0_processor0__logs:
error_mode: ignore
log_statements:
- context: log
statements:
- set(attributes["chronicle_log_type"], "POSTGRESQL") where true
exporters:
chronicle/chronicle_sql:
compression: gzip
creds: '{
"type": "service_account",
"project_id": "malachite-projectname",
"private_key_id": "abcdefghijklmnopqrstuvwxyz123456789",
"private_key": "-----BEGIN PRIVATE KEY-----abcdefg-----END PRIVATE KEY-----\n",
"client_email": "account@malachite-projectname.iam.gserviceaccount.com",
"client_id": "123456789123456789",
"auth_uri": "https://accounts.google.com/o/oauth2/auth",
"token_uri": "https://oauth2.googleapis.com/token",
"auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
"client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/account%40malachite-projectname.iam.gserviceaccount.com",
"universe_domain": "googleapis.com"
}'
customer_id: customer_id
endpoint: malachiteingestion-pa.googleapis.com
log_type: POSTGRESQL
namespace: null
raw_log_field: body
retry_on_failure:
enabled: false
sending_queue:
enabled: false
service:
pipelines:
logs/source0_chronicle_sql-0:
receivers:
- sqlquery/source0
processors:
- transform/source0_processor0__logs
exporters:
- chronicle/chronicle_sql
捨棄符合規則運算式的記錄
您可以設定收集器,捨棄符合規則運算式的記錄。這項功能可篩除不想要的記錄,例如已知錯誤或偵錯訊息。
如要捨棄符合規則運算式的記錄,請在設定中新增 filter/drop-matching-logs-to-Chronicle
類型的處理器。這個處理器會使用 IsMatch
函式,根據規則運算式評估記錄主體。如果函式傳回 true
,系統會捨棄記錄。
以下設定範例會捨棄記錄內文中包含 <EventID>10</EventID>
或 <EventID>4799</EventID>
字串的記錄。
您可以自訂規則運算式,比對所需模式。IsMatch
函式使用 RE2 規則運算式語法。
範例設定:
processors:
filter/drop-matching-logs-to-Chronicle:
error_mode: ignore
logs:
log_record:
- (IsMatch(body, "<EventID>10</EventID>")) or (IsMatch(body, "<EventID>4799</EventID>"))
下列範例會在相同設定中,將處理器新增至管道:
service:
pipelines:
logs/winevtlog:
receivers:
- windowseventlog/security
- windowseventlog/application
- windowseventlog/system
processors:
- filter/drop-matching-logs-to-Chronicle # Add this line
- batch
exporters: [chronicle/winevtlog]
Bindplane 操作與維護
本節說明例行作業和維護動作。
驗證 OTel 設定
如要瞭解如何驗證 Bindplane OTel 設定,請參閱 OTelBin。
收集器版本更新
Bindplane 可以輪詢 bindplane-otel-collector/releases,偵測新的收集器版本。這項功能為選用項目。
如要在 Bindplane 設定中將 agentVersions.syncInterval
設為 0
,即可停用 GitHub 輪詢:
agentVersions:
syncInterval: 0
備份與災難復原
如要瞭解如何使用 Bindplane 備份及進行災難復原,請參閱 Bindplane 資源。
PostgreSQL 備份與災難復原
如要瞭解如何使用 Bindplane 備份及復原 PostgreSQL,請參閱 PostgreSQL 說明文件。
BBolt 備份和災難復原
如要瞭解如何使用 Bindplane 進行 BBolt (已淘汰) 備份和災難復原,請參閱 BBolt 商店說明文件。
韌性和重試
系統預設會對所有支援重試的目標啟用這項功能。根據預設,失敗的要求會在五秒後重試,並逐步延遲,最多可達 30 秒。五分鐘後,系統會永久捨棄要求。
詳情請參閱「收集器復原能力」。
使用嚴重性篩選器減少記錄檔資料量
如要瞭解如何減少記錄檔量,請參閱「使用嚴重性篩選器減少記錄檔量」。
Bindplane 與第三方代理程式整合
雖然使用 Bindplane 代理程式在邊緣收集資料時,Bindplane 的功能更強大,但在大多數情況下,Bindplane 仍可保留在現有基礎架構中。舉例來說,如果您已使用 Fluent Bit 或 Splunk Universal Forwarders,可以繼續使用。
將 Bindplane 與 Splunk 整合
如要瞭解如何搭配使用 Splunk 和 Bindplane,請參閱下列文章:
Bindplane 與其他第三方代理程式的整合
如要瞭解如何將 Bindplane 與第三方代理程式整合,請參閱「使用 OpAMP 擴充功能連結其他 OpenTelemetry 收集器」。
無聲主機監控
如要瞭解如何使用 Bindplane 進行無聲主機監控,請參閱下列文章:
在 Linux 上升級 Bindplane
執行安裝指令時,只要在結尾加上 --init
標記,即可升級 Bindplane。在 Bindplane 伺服器上執行這項指令碼,即可升級 Bindplane。詳情請參閱「升級、降級或解除安裝 Bindplane Server」。
監控 Bindplane
如要瞭解如何監控 Bindplane,請參閱「監控 Bindplane」。
Kubernetes 監控
如要瞭解如何使用 Bindplane 監控 Kubernetes,請參閱「Kubernetes Monitoring」(Kubernetes 監控)。
其他參考文件
如要進一步瞭解 Bindplane (舊稱 observIQ),請參閱下列資源:
還有其他問題嗎?向社群成員和 Google SecOps 專業人員尋求答案。