Splunk Search

How do you 'Tag' based on a search?

andrewkenth
Communicator

I'm almost certian I used the wrong lingo but I'd like to essentially create a field based on search or regex, but I want my own predetermiend label to be the field value, not any of the contents of the raw log.

So, if I have a search like this:
index=myIndex sourcetype=mysourcetype "dude really did login"

I'd want all of thos results to be tagged with a field named "ServerEvent" and have the value be set to "LOGIN"

Alternativly I'd want a search like this:
index=myIndex sourcetype=mysourcetype "dude really did logout"

I'd want all of thos results to be tagged with a field named "ServerEvent" and have the value be set to "LOGOUT"

What is the most efficient way to do this in Splunk?

Tags (2)
0 Karma
1 Solution

aelliott
Motivator
0 Karma

aelliott
Motivator
0 Karma
Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Best Practices: Splunk auto adjust pipeline queue

When you enable autoAdjustQueue in Splunk, maxSize should be understood as the queue size Splunk starts with ...

Introducing the 2026 - 2027 SplunkTrust cohort!

The goal of the SplunkTrust™ membership has historically been to acknowledge and recognize those who go above ...

Splunk Auto Ingestion Parallel Pipeline Scaling

Why this feature matters Many Splunk environments experience ingestion pressure long before the host is fully ...