BindPlane エージェントを使用する
BindPlane エージェント(収集エージェントとも呼ばれます)は、OpenTelemetry Collector に基づくオープンソース エージェントです。Microsoft Windows イベントログなど、さまざまなソースからログを収集し、Google SecOps に送信します。
observIQ BindPlane OP 管理コンソールには、Google SecOps と Google Cloudで OpenTelemetry(OTel)コレクタのデプロイを管理するための包括的で統合されたプラットフォームが用意されています。observIQ には、BindPlane Google エディションの管理コンソールがあります。詳細については、observIQ ソリューションをご覧ください。管理コンソールはオプションです。エージェントは、コンソール有無にかかわらず使用できます。コンソールの詳細については、BindPlane OP 管理コンソールをご覧ください。
これは、オンプレミス デプロイで Cloud Logging で使用されるソリューションと同じです。
始める前に
エージェントをインストールするには、次のものが必要です。
Google SecOps 取り込み認証ファイル
認証ファイルをダウンロードする手順は次のとおりです。
- Google SecOps コンソールを開きます。
- [SIEM Settings] > [Collection Agent] に移動します。
- Google SecOps 取り込み認証ファイルをダウンロードします。
Google SecOps のお客様 ID
お客様 ID を確認する手順は次のとおりです。
- Google SecOps コンソールを開きます。
- [SIEM 設定] > [プロファイル] に移動します。
- [組織の詳細] セクションからお客様 ID をコピーします。
Windows 2012 SP2 以降、または systemd を搭載した Linux ホスト
インターネット接続
GitHub へのアクセス
ファイアウォール構成を確認する
エージェントとインターネットの間にあるファイアウォールまたは認証プロキシには、次のホストへのアクセス権を開放するルールが必要です。
接続タイプ | 宛先 | ポート |
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 |
BindPlane OP 管理コンソール
BindPlane OP 管理コンソールには、次の主な機能があります。
- 一元管理: コンソールを使用すると、 Google Cloud全体ですべての OTel コレクタのデプロイを管理できます。各デプロイのステータスを確認したり、コレクタの起動、停止、再起動などの一般的な管理タスクを実行したりできます。
- リアルタイム モニタリング: コンソールでは、OTel コレクタのデプロイをリアルタイムでモニタリングできます。CPU 使用率、メモリ使用量、スループットなどの指標を追跡したり、ログとトレースを表示して問題のトラブルシューティングを行ったりできます。
- アラートおよび通知: コンソールでは、コレクタの停止や指標のしきい値の超過など、重要なイベントのアラートと通知を設定できます。
- 構成管理: コンソールを使用すると、OTel コレクタの構成を一元的に管理できます。構成ファイルを編集したり、環境変数を設定したり、すべてのデプロイにセキュリティ ポリシーを適用したりできます。
- Google Cloudとの統合: Google Cloud で OTel コレクタのデプロイを作成して管理し、コンソールを使用して Google Cloud リソースにアクセスできます。
BindPlane OP 管理コンソールをデプロイする方法は 2 つあります。
- Linux ホストにダウンロードしてインストールする: DEB パッケージ、RPM パッケージ、Docker イメージとして使用できます。
- Google Cloud Marketplace からインストールしてプロビジョニングする。
BindPlane(Google Edition)と BindPlane Enterprise(Google Edition)の違い
BindPlane(Google エディション)または BindPlane Enterprise(Google エディション)を使用できます。Google SecOps のすべてのお客様が BindPlane(Google エディション)にアクセスできます。Google SecOps Enterprise Plus をご利用の場合は、BindPlane Enterprise(Google エディション)が含まれています。Google SecOps Enterprise Plus をご利用でない場合は、Google アカウント チームにお問い合わせください。BindPlane Enterprise(Google エディション)のライセンスキーについては、support@observIQ.com までメールでお問い合わせください。
違いは次の表のとおりです。
特徴 | BindPlane(Google エディション) | BindPlane Enterprise(Google エディション) |
費用 | Google SecOps のすべてのお客様は、BindPlane(Google エディション)を無料でご利用いただけます。 | Google SecOps Enterprise Plus をご利用のお客様は、BindPlane(Google Edition)を無料でご利用いただけます。 |
ルーティング / デスティネーション | Google のみ(Google SecOps、Cloud Logging、BigQuery、Cloud Storage(Cloud Logging 経由)など) | Google(SIEM 移行のための他の宛先への 12 か月間のルーティングを含む) |
フィルタリング | 正規表現を使用した基本フィルタ | 高度なフィルタリング プロセッサ(条件、フィールド、重大度などでフィルタリング)、データの削減、ログ サンプリング、重複除去 |
削除 | なし | 個人情報(PII)のマスキング |
変換 | フィールドの追加、フィールドの移動、データの解析(KV、JSON、CSV、XML、タイムスタンプ、正規表現による解析)、フィールドの名前変更、イベント ブレーカー | フィールドの削除、空の値の削除、統合 |
一般的なプラットフォーム レベルの機能 | Gateway(エージェントからの集計データ)、収集用の BindPlane エージェント、オンプレミスまたはクラウドでホストされるすべてのソースの BindPlane マネジメントレイヤ(BindPlane OP)、SecOps プロセッサによるサイレント ホスト モニタリング、永続キュー、テレメトリーの拡充、HA、RBAC、両方の SecOps 取り込み API のサポート、認証情報の難読化、エージェントのグループ化などの高度なフリート管理、動的ログタイプの割り当て | |
BindPlane エージェントをインストールする
このセクションでは、さまざまなホスト オペレーティング システムにエージェントをインストールする方法について説明します。
Windows
Windows に BindPlane エージェントをインストールするには、次の PowerShell コマンドを実行します。
msiexec /i "https://github.com/observIQ/bindplane-agent/releases/latest/download/observiq-otel-collector.msi" /quiet
または、インストール ウィザードを使用してインストールするには、Windows 用の最新のインストーラをダウンロードします。
インストーラをダウンロードしたら、インストール ウィザードを開き、手順に沿って BindPlane エージェントを構成してインストールします。インストールの詳細については、Windows へのインストールをご覧ください。
Linux
インストールするパッケージを自動的に決定するスクリプトを使用して、Linux にエージェントをインストールできます。このスクリプトを使用して、既存のインストールを更新することもできます。
インストール スクリプトを使用してインストールするには、次のスクリプトを実行します。
sudo sh -c "$(curl -fsSlL https://github.com/observiq/bindplane-agent/releases/latest/download/install_unix.sh)" install_unix.sh
ローカル パッケージからのインストール
ローカル パッケージからエージェントをインストールするには、-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 OP 管理コンソールを使用して行うこともできます。エージェントを手動で構成する場合は、エージェントが Google SecOps で認証されるようにエクスポータ パラメータを更新する必要があります。
エージェントをインストールすると、observiq-otel-collector
サービスが実行され、構成の準備が整います。エージェントはデフォルトで C:\Program Files\observIQ OpenTelemetry Collector\log\collector.log
にログを記録します。
エージェント プロセスの標準エラーログは C:\Program Files\observIQ OpenTelemetry Collector\log\observiq_collector.err
にあります。
デフォルトでは、エージェントの構成ファイルは C:\Program Files\observIQ OpenTelemetry Collector\config.yaml
にあります。構成を変更する場合は、構成変更を有効にするためにエージェント サービスを再起動する必要があります。
エージェントで使用されるサンプル構成ファイルと認証トークンは、Google SecOps コンソール > SIEM 設定 > 収集エージェントからダウンロードできます。
構成ファイルで次の 2 つのセクションをカスタマイズします。
- レシーバ: エージェントが収集して Google SecOps に送信するログを指定します。
- エクスポータ: エージェントがログを送信する宛先を指定します。次のエクスポータがサポートされています。
- Google SecOps エクスポータ: ログを Google SecOps 取り込み API に直接送信します。
- Google SecOps フォワーダー エクスポータ: Google SecOps フォワーダーにログを送信します。
- Cloud Logging エクスポータ: ログを(Cloud Logging)に送信します。
エクスポータで、次のようにカスタマイズします。
customer_id
: Google SecOps のお客様 IDendpoint
: Google SecOps リージョン エンドポイントcreds
: 認証トークンまたは、
creds_file_path
を使用して認証情報ファイルを直接参照することもできます。Windows 構成の場合は、パスをバックスラッシュでエスケープします。log_type
: ログタイプingestion_labels
: 取り込みラベル(省略可)namespace
: 省略可能な Namespace各ログタイプにはエクスポータを構成する必要があります。
アーキテクチャ
エージェント アーキテクチャには、次のオプションがあります。
オプション 1: 収集エージェントが Google SecOps フォワーダーにログを送信する
Google SecOps フォワーダーは複数の Syslog ストリームを受信します。各 syslog データソースは、Google SecOps 転送エージェントに構成されたリッスン ポートによって区別されます。フォワーダーは、収集されたログを配信するために、Google SecOps インスタンスに暗号化された GRPC 接続を確立します。
転送オプションを使用すると、Google SecOps に送信する前にログを集約できます。
オプション 2: 収集エージェントが Google SecOps 取り込み API にログを直接送信する
オプション 3: 収集エージェントが Cloud Logging にログを直接送信する
オプション 4: 収集エージェントが複数の宛先にログを送信する
スケーラビリティ
通常、エージェント コレクタは最小限のリソースを使用しますが、システムで大量のテレメトリー(ログまたはトレース)を処理する場合は、他のサービスに影響しないようにリソースの使用量に注意してください。詳細については、エージェントのサイズとスケーリングをご覧ください。
サポート
コレクタ エージェントに関する問題については、 Google Cloud サポートにお問い合わせください。
BindPlane OP 管理に関する問題については、ObservIQ サポートにお問い合わせください。
その他のログ収集構成のサンプル
以降のセクションでは、追加のログ収集構成のサンプルを示します。
Windows イベントと Sysmon を 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 イベントと syslog を 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 イベントと syslog を 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
syslog を 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]
リファレンス ドキュメント
observIQ の詳細については、以下をご覧ください。
- ObservIQ ソリューション
- BindPlane OP クイックスタート ガイド
- Cloud Logging にログを送信する。
- 条件プロセッサでフィルタする
- Bindplane OP で使用可能なソース