Getting Data In

How to pull logs using WMI with a Splunk universal forwarder?

rishabhey2016
Explorer

In reference to the following link:
https://answers.splunk.com/answers/26743/can-i-index-wmi-from-a-splunk-instance-running-on-linux.htm...
I want to know that How to pulls log using WMI by Splunk universal forwarder?

0 Karma

javiergn
Super Champion

I'm guessing you installed the UF on Windows therefore you have several ways to do this.
My preferred one would be to use a powershell input and collect WMI this way.
Example:

inputs.conf
Windows 8 and 2012 using Get-CimInstance

[powershell://CollectProcessInfoFromWmi]
script = Get-CimInstance Win32_Process | Select-Object Field1, Field2, Field3
schedule = 0 */5 * ? * *
sourcetype = Windows:MyWmiData

PRE Windows 8 and 2012 using Get-WmiObject

[powershell://CollectProcessInfoFromWmi]
script = Get-WmiObject -Class Win32_Process | Select-Object Field1, Field2, Field3
schedule = 0 */5 * ? * *
sourcetype = Windows:MyWmiData

See the following links for more info:

http://docs.splunk.com/Documentation/Splunk/6.4.0/Data/MonitorWindowsdatawithPowerShellscripts
https://technet.microsoft.com/en-us/library/hh849824.aspx
https://technet.microsoft.com/en-us/library/jj590758(v=wps.630).aspx

javiergn
Super Champion

Hi, did you get this working at all?

0 Karma
Get Updates on the Splunk Community!

Data Management Digest – December 2025

Welcome to the December edition of Data Management Digest! As we continue our journey of data innovation, the ...

Index This | What is broken 80% of the time by February?

December 2025 Edition   Hayyy Splunk Education Enthusiasts and the Eternally Curious!    We’re back with this ...

Unlock Faster Time-to-Value on Edge and Ingest Processor with New SPL2 Pipeline ...

Hello Splunk Community,   We're thrilled to share an exciting update that will help you manage your data more ...