Getting Data In

Universal ForwarderによるWindowsイベントログの収集について

sunrise
Contributor

Universal Forwarder(以下、UF)を利用してWindowsイベントログを収集する際、
current_onlyオプションによって以下の挙動になるかと思います。

<current_only=0の場合>
UFはホスト内に存在するイベントログを全てIndexerへ送信する

<current_only=1の場合>
UFが起動している時に発生したイベントログだけをIndexerへ送信する

また、Deplyment Server(以下、DS)を使い、UF初回起動時だけ"current_only=1"に設定し、
その後"current_only=0"へ変更した場合、
UF初回起動時以降に発生した全てのイベントログ(UF停止中のログも含む)を
収集できることを確認しています。

このログ収集の仕方が最も望ましいのですが、一つ問題があります。

以下の設定ファイル(serverclass.conf)で、
UFを導入するWindowsホスト(クライアント)が段階的に増えていく場合を想定しています。

serverclass.conf

[serverClass:WIN-Client]
machineTypesFilter=windows-*

[serverClass:WIN-Client:app:Apps_Name]
stateOnClient=enabled
restartSplunkd=true

この時、はじめの1台の時は上記、「current_onlyを途中で変更する」方法が出来るのですが、
マネージャを停止せず(serverclass.confを編集せず)に2台目を追加しようとした場合、
1台目のクライアントもDSの影響を受け、イベントがロストする可能性があります。

細かい話で申し訳ありませんが、
何か良い方法等ございましたら、ご教授下さい。
宜しくお願い致します。

1 Solution

melonman
Motivator

どういう環境・条件かはわからないのですが、current_onlyではなく、followTailをつけておいてから消すということはいかがでしょうか。

以下、参考まで。
http://splunk-base.splunk.com/answers/57819/when-is-it-appropriate-to-set-followtail-to-true

View solution in original post

0 Karma

melonman
Motivator

どういう環境・条件かはわからないのですが、current_onlyではなく、followTailをつけておいてから消すということはいかがでしょうか。

以下、参考まで。
http://splunk-base.splunk.com/answers/57819/when-is-it-appropriate-to-set-followtail-to-true

0 Karma

sunrise
Contributor

はい。おっしゃる通りです。

0 Karma

melonman
Motivator

要件としては、UFを導入した時点からのログのみをUFの転送対象にして、過去のログは読み込まないという状況でしょうか?

0 Karma
Get Updates on the Splunk Community!

Accelerating Observability as Code with the Splunk AI Assistant

We’ve seen in previous posts what Observability as Code (OaC) is and how it’s now essential for managing ...

Integrating Splunk Search API and Quarto to Create Reproducible Investigation ...

 Splunk is More Than Just the Web Console For Digital Forensics and Incident Response (DFIR) practitioners, ...

Congratulations to the 2025-2026 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...