Getting Data In

WMIでWindowsイベントログが取得できない

pisc
Explorer

WMIでのWindowsイベントログ取得について教えてください。

[データ入力] - [リモートイベントログの収集]から設定をしていますが、
対象マシンのIPアドレスを入力し、[ログのサーチ]ボタンをクリックすると、以下のエラーが発生します。

データ取得に失敗しました: In handler 'win-wmi-enum-eventlogs': Unable to get wmi classes from host 'xxx.xxx.xxx.xxx'. This host may not be reachable or WMI may be misconfigured.

Universal Forwarderをインストールすると、イベントログ自体は取得出来ますが、対象マシンにインストールをすることが許可されていないため、WMIでのリモート取得をする必要があります。

上記のリモートイベントログでログを取得する場合の留意点は何かございますでしょうか?

対象マシンの構成として、ドメインには参加しておらずワークグループのコンピュータです。
当然ネットワーク上の問題はなくpingも通りますし、WMIMGMT.msc等を利用してWMI接続が出来るかを確認しても、問題なくWMIでの接続は可能です。

以上、よろしくお願いします。

0 Karma
1 Solution

melonman
Motivator

*手元にWindows環境がないので、試せてはいないのですが、ヒントとなる情報がありますので、掲載します。

ドメインに参加していない環境でのWMI経由でのデータ取得に関するAnswersがありました。
以下一部抜粋しています。

If you're not in a domain this might work: run splunk as a local user. On the remote server create a user with access to remote WMI with the same username/password. This might work. If not the only option you have is try to allow the remote computer account access to WMI, but that's a big security hole. I think from a security perspective you would be best server putting all of these machines in a domain.

How to get WMI data collection by providing to splunk the remote host credentials?

またご参考までに、以下にWMI経由のデータインプットに関するドキュメントがありますのでリンクしますね。

Monitor WMI-based data

View solution in original post

0 Karma

pisc
Explorer

教えて頂いた方法を試してみると、確かに接続できるようにはなりました。
 (1)ターゲットサーバ上に専用アカウントを作成
 (2)splunkサーバ上に同じ名前、パスワードのアカウントを作成
 (3)splunkサーバ上のsplunkdサービスの実行ユーザを変更

しかし、splunkdのサービス実行ユーザをターゲットのサーバのアカウントと揃える必要がありました。
ターゲットのサーバが複数台あり、ドメイン/非ドメイン環境が混在しているので、この方法だと全台からログを取得するのは難しそうです。

vbscript等をタスクスケジューラで実行して、WMIを個別に叩く方法なら出来そうな気がしますが、
あまりスマートではないので、splunkの標準機能(もしくはApp)で実現出来る方法はないものでしょうか?

0 Karma

pisc
Explorer

なるほど、現状ではこの方法しかないのですね。

やはりターゲットのサーバが複数台ありますので、ターゲットのサーバ台数分のSplunkサーバを用意することになりますので、それぞれ別のSplunkサーバで収集というのは難しそうです。

ユニバーサルフォワーダーをインストールしてもらえるように主幹部署に調整をお願いするか、もしくはVBScript等で独自にWMIで取得するか、別の方法を検討してみます。

0 Karma

melonman
Motivator

現状では、Domainに参加していないWindows上のWMIを叩くには、ご確認頂いた方法となってしまいます。

http://splunk-base.splunk.com/answers/11027/gathering-wmi-from-non-domain-or-workgroup-machines-it-i...

監視対象のWindowsにSplunkから接続するためのユーザと権限を設定頂く必要がありますね… Domainに参加しているWindowsで収集するSplunkと、参加していないWindowsのWMIをそれぞれ別のSplunkサーバで情報収集をして、サーチ時にDistributed Searchを使って複数のSplunk上にまたがるWindows情報をサーチするという方法はいかがでしょうか。

0 Karma

pisc
Explorer

情報をありがとうございます。

まだ内容の確認が出来ていませんが、週明けに職場で確認してみます。

結果はまた改めてフィードバックさせて頂きます。

0 Karma

melonman
Motivator

*手元にWindows環境がないので、試せてはいないのですが、ヒントとなる情報がありますので、掲載します。

ドメインに参加していない環境でのWMI経由でのデータ取得に関するAnswersがありました。
以下一部抜粋しています。

If you're not in a domain this might work: run splunk as a local user. On the remote server create a user with access to remote WMI with the same username/password. This might work. If not the only option you have is try to allow the remote computer account access to WMI, but that's a big security hole. I think from a security perspective you would be best server putting all of these machines in a domain.

How to get WMI data collection by providing to splunk the remote host credentials?

またご参考までに、以下にWMI経由のデータインプットに関するドキュメントがありますのでリンクしますね。

Monitor WMI-based data

0 Karma
Get Updates on the Splunk Community!

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...

Introducing the 2024 SplunkTrust!

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