Splunk Search

How to extract all values from a field with multiple values?

Lindaiyu
Path Finder

Hello,

I get the event,

IP="127.0.0.1",..., TAG_NAME="GRP_ROOT_MGT", TAG_NAME="GRP_IS_MM_MGT", TAG_NAME="GRP_RB_NN_MGT", BU_NAME="BU_RB_NN", ...

The problem is that, one field has multiple values and Splunk detects just the first "TAG_NAME" and ignores the second and third one. However, I need them all. How can I get all of them?

I want something like:

...
TAG1="xxx",
TAG2="xxx",
TAG3="xxx",
...

Please give me some idea or some help,
Thank you very much

0 Karma

somesoni2
Revered Legend

You would have to set multivalued field extractions for your data.
Using transforms (example with almost same use-case as yours)
http://docs.splunk.com/Documentation/Splunk/6.0.3/Knowledge/Createandmaintainsearch-timefieldextract...

Using fields.conf

http://docs.splunk.com/Documentation/Splunk/6.0.1/Knowledge/ConfigureSplunktoparsemulti-valuefields

0 Karma

woodcock
Esteemed Legend

Show us how you are getting the single-value field value.

0 Karma

Lindaiyu
Path Finder

Thank you for replying,
I get from a python script,
now I find a method

0 Karma

richgalloway
SplunkTrust
SplunkTrust

If you're using the rex command to extract the TAG_NAME fields, be sure to add the max_match=0 option to tell Splunk to return all instances of the field.

If you're extracting the field some other way, please explain so we can help you.

---
If this reply helps you, Karma would be appreciated.

Lindaiyu
Path Finder

it works with the parameter"max_match"
Thank you a lot!

0 Karma

woodcock
Esteemed Legend

Please click Accept to close the question.

0 Karma

sander980
Explorer

worked for me with same issue , this should be accepted answer 🙂

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!

Thanks for the Memories: .conf26 Took Learning to New Heights

Thank you, Splunk Community, for making .conf26 in Denver one for the books. From packed Splunk University ...

Best Practices: Splunk auto adjust pipeline queue

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

Splunk Auto Ingestion Parallel Pipeline Scaling

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