icon/x Created with Sketch.

Splunk Cookie Policy

We use our own and third-party cookies to provide you with a great online experience. We also use these cookies to improve our products and services, support our marketing campaigns, and advertise to you on our website and other websites. Some cookies may continue to collect information after you have left our website. Learn more (including how to update your settings) here.
Accept Cookie Policy

We are working on something new...

A Fresh New Splunkbase
We are designing a New Splunkbase to improve search and discoverability of apps. Check out our new and improved features like Categories and Collections. New Splunkbase is currently in preview mode, as it is under active development. We welcome you to navigate New Splunkbase and give us feedback.

Accept License Agreements

This app is provided by a third party and your right to use the app is in accordance with the license provided by that third-party licensor. Splunk is not responsible for any third-party apps and does not provide any warranty or support. If you have any questions, complaints or claims with respect to this app, please contact the licensor directly.

Thank You

Downloading delimitedfields
SHA256 checksum (delimitedfields_101.zip) a6a74a40bf9e9e8b6e358f1dc36b1a78cc5e8fa1bb614d872a137895e088a181
To install your download
For instructions specific to your download, click the Details tab after closing this window.

Flag As Inappropriate

splunk

delimitedfields

This app has been archived. Learn more about app archiving.
This app is NOT supported by Splunk. Please read about what that means for you here.
Overview
Details
This command will allow you to create multiple log messages from a single message that has related, dynamic fieldnames, like:
foo_abc=1 foo_xyz=2

We have a couple of log files that look like this:
date1 username=username1 foo_abc=25 foo_bcd=23 foo_cde=23 bar_xyz=23 bar_wxy=23 date2 username=username1 foo_abc=25 foo_cde=23 foo_def=23 bar_qrs=23 bar_wxy=23

What if you want to see a chart of the sum of each type of foo, by username?

I couldn't figure out a way to make this happen with existing commands, so I wrote a little command to take those log messages with related fields and chop them up based on something common in the field name, and copy along other fields that you need later. Given our sample log messages, you would do something like this:
search... | delimitedfields prefix="foo_" copyfields="username"

This produces in effect:
_time=date1 username=username1 delimitedfield_name=abc delimitedfield_value=25 _time=date1 username=username1 delimitedfield_name=bcd delimitedfield_value=23 _time=date1 username=username1 delimitedfield_name=cde delimitedfield_value=23 _time=date2 username=username1 delimitedfield_name=abc delimitedfield_value=25 _time=date2 username=username1 delimitedfield_name=cde delimitedfield_value=23 _time=date2 username=username1 delimitedfield_name=def delimitedfield_value=22
which you can then feed to your favorite reporting command, for instance chart.

The complete search would look like this:
search... | delimitedfields prefix="foo_" copyfields="username" | chart sum(delimitedfield_value) by delimitedfield_name,username

Along with prefix, there is support for suffix and pattern. Pattern simply takes the groups capture in the regex and concatenates them.

To install, place these files in some application in bin and local. For instance:
delimitedfields.py -> etc/apps/search/bin/ commands.conf -> etc/apps/search/local/

Feel free to drop me a note at vincent.bumgarner at gmail.com

Release Notes

Version 1.0.1
June 30, 2010

Subscribe Share

Are you a developer?

As a Splunkbase app developer, you will have access to all Splunk development resources and receive a 10GB license to build an app that will help solve use cases for customers all over the world. Splunkbase has 1000+ apps from Splunk, our partners and our community. Find an app for most any data source and user need, or simply create your own with help from our developer portal.

Follow Us:
Splunk, Splunk>,Turn Data Into Doing, Data-to-Everything, and D2E are trademarks or registered trademarks of Splunk Inc. in the United States and other countries. All other brand names,product names,or trademarks belong to their respective owners.