All Apps and Add-ons

Splunk Add-on for Microsoft Windows: How do I limit indexed data by service Name or DisplayName?

corey_reynders
Path Finder

sourcetype=WinHostMon
source=service

How do I only index data for specific Name or DisplayName values of these events?

I don't want data for all of the services, just for the ones that fit masks that I apply. For perfmon collectors you can do it with instances = in inputs.conf but how do I do the same for WinHostMon?

0 Karma
1 Solution

corey_reynders
Path Finder

Ended up having to do it with props / transforms.conf

$SPLUNK_HOME/etc/system/local/props.conf (indexer and heavy forwarders)
[source::service]
sourcetype = WinHostMon
TRANSFORMS-limit-winhostmon-service = winhostmon-service-setnull, winhostmon-service-keep

$SPLUNK_HOME/etc/system/local/transforms.conf (indexer and heavy forwarders)
[winhostmon-service-setnull]
REGEX = .
DEST_KEY = queue
FORMAT = nullQueue

[winhostmon-service-keep]
REGEX = (?i)name=".*(name1|name2|name3)
DEST_KEY = queue
FORMAT = indexQueue

Can't do it with instances=(regex) or blacklist/whitelist. Oh well.

View solution in original post

corey_reynders
Path Finder

Ended up having to do it with props / transforms.conf

$SPLUNK_HOME/etc/system/local/props.conf (indexer and heavy forwarders)
[source::service]
sourcetype = WinHostMon
TRANSFORMS-limit-winhostmon-service = winhostmon-service-setnull, winhostmon-service-keep

$SPLUNK_HOME/etc/system/local/transforms.conf (indexer and heavy forwarders)
[winhostmon-service-setnull]
REGEX = .
DEST_KEY = queue
FORMAT = nullQueue

[winhostmon-service-keep]
REGEX = (?i)name=".*(name1|name2|name3)
DEST_KEY = queue
FORMAT = indexQueue

Can't do it with instances=(regex) or blacklist/whitelist. Oh well.

aaraneta_splunk
Splunk Employee
Splunk Employee

Hi @corey_reynders - Glad to hear that you were able to figure out the answer yourself. Please don't forget to resolve this post by clicking "Accept" below your answer (and give yourself some karma points :D). Thanks!

0 Karma

corey_reynders
Path Finder

I could still use some advice if anyone has any. I figured this would be a common task. Mayhaps I misjudged the scenario.

0 Karma
Get Updates on the Splunk Community!

Threat Hunting Unlocked: How to Uplevel Your Threat Hunting With the PEAK Framework ...

WATCH NOWAs AI starts tackling low level alerts, it's more critical than ever to uplevel your threat hunting ...

Splunk APM: New Product Features + Community Office Hours Recap!

Howdy Splunk Community! Over the past few months, we’ve had a lot going on in the world of Splunk Application ...

Index This | Forward, I’m heavy; backward, I’m not. What am I?

April 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...