Fluentd経由のSplunk Enterprise¶
本手順書では、WallarmとFluentdのデータ収集機能を統合し、イベントをSplunk SIEMシステムへ転送するためのサンプル統合方法を示します。
The most common logging scheme in complex systems consists of the following components:
-
Data collector: accepts logs from several sources and forwards logs to the SIEM system
-
SIEM system or log management systems: used to analyze logs and monitor the system status
使用リソース¶
-
Splunk Enterprise(WEB URL
https://109.111.35.11:8000
およびAPI URLhttps://109.111.35.11:8088
) -
Fluentd(Debian 11.x (bullseye)にインストールされ、URL
https://fluentd-example-domain.com
で利用可能) -
EUクラウドのWallarm Consoleに管理者アクセス権があり、Fluentd統合の設定が可能
Wallarm Cloud IP addresses
To provide Wallarm Cloud access to your system, you may need a list of its public IP addresses:
Splunk EnterpriseおよびFluentdのサービスへのリンクは例示であるため、実際の応答はありません。
Splunk Enterpriseの設定¶
Fluentdのログは、Wallarm Fluentd logs
という名称およびその他のデフォルト設定でSplunk HTTP Event Controllerに送信されます。
HTTP Event Controllerにアクセスするために、生成されたトークン f44b3179-91aa-44f5-a6f7-202265e10475
が使用されます。
Splunk HTTP Event Controllerの詳細な設定手順については、公式Splunkドキュメントを参照してください。
Fluentdの設定¶
Wallarmはwebhooks経由でFluentd中間データ収集機能にログを送信するため、Fluentdの設定は以下の要件を満たす必要があります。
-
POSTまたはPUTリクエストを受け付ける
-
HTTPSリクエストを受け付ける
-
パブリックURLを持つ
-
ログをSplunk Enterpriseへ転送する(この例では、
splunk_hec
プラグインを使用してログを転送します)
Fluentdはtd-agent.conf
ファイルで設定されます。
-
受信するwebhookの処理は、
source
ディレクティブで設定されます:- トラフィックはポート9880に送信されます
- FluentdはHTTPS接続のみを受け付けるように設定されています
- 公開された信頼できるCAにより署名されたFluentd TLS証明書は、
/etc/ssl/certs/fluentd.crt
ファイル内に配置されています - TLS証明書の秘密鍵は、
/etc/ssl/private/fluentd.key
ファイル内にあります
-
ログのSplunkへの転送およびログ出力は、
match
ディレクティブで設定されます:- すべてのイベントログはFluentdからコピーされ、出力プラグインfluent-plugin-splunk-hec経由でSplunk HTTP Event Controllerへ転送されます
- Fluentdのログは、さらにJSON形式でコマンドラインに表示されます(コード行19~22)。この設定は、イベントがFluentd経由でログに記録されることを確認するために使用されます
設定ファイルの詳細な説明については、公式Fluentdドキュメントを参照してください。
Fluentd設定のテスト
Fluentdのログが作成され、Splunkへ転送されることを確認するために、PUTまたはPOSTリクエストをFluentdに送信することができます。
リクエスト例:
Fluentd統合の設定¶
-
Webhooks are sent to
https://fluentd-example-domain.com
-
Webhooks are sent via POST requests
-
The webhook integration has default advanced settings
-
Webhooks sent to Webhook URLs are all available events: hits, system events, vulnerabilities, scope changes
テスト例¶
To test the configuration, a new user is added in Wallarm Console:
Fluentdは次のようにイベントをログに記録します。
Splunkのイベントには、次のエントリーが表示されます。
Splunk Enterpriseでイベントを整理しダッシュボードに表示する¶
To get Wallarm events organized into a ready-to-use dashboard in Splunk 9.0 or later, you can install the Wallarm application for Splunk.
This application provides you with a pre-configured dashboard that is automatically filled with the events received from Wallarm. In addition to that, the application enables you to proceed to detailed logs on each event and export the data from the dashboard.
To install the Wallarm application for Splunk:
-
In the Splunk UI ➝ Apps find the
Wallarm API Security
application. -
Click Install and input the Splunkbase credentials.
If some Wallarm events are already logged in Splunk, they will be displayed on the dashboard, as well as further events Wallarm will discover.
In addition, you can fully customize the ready-to-use dashboard, e.g. its view or search strings used to extract data from all Splunk records.