Refine your search:

Thanks For Downloading!

Review the documentation below and follow any custom installation steps. If no install steps are listed, most Splunk Apps and Add-ons can be installed as follows:

Windows: Decompress the downloaded file using a tool like 7-Zip and place the resulting folder into %PROGRAMFILES%\Splunk\etc\apps. Then restart Splunk using the splunk restart command or the GUI.

Unix/Linux: Decompress the downloaded file using a tool like tar -xvf and place the resulting folder into $SPLUNK_HOME/etc/apps. Then restart Splunk using the splunk restart command or the GUI.

Description

CSV Utilities is a utility app with precisely one command so far, emailcsvs. Given a list of csvs that have been created with outputcsv, each of the csv files is attached to a message and mailed to the address provided.

Two commands so far.

matchfieldfromcsv:
Given the path to a csv file somewhere in SPLUNK_HOME, tag all events passed in with the values found in the specified field.
This is useful for counting matches of certain terms in raw in events, even if they can't easily be extracted into fields.
The raw text of each event will be tested for each value of field in the csv file, and if a match is found, that field is attached the event.

Example:
* | matchfieldfromcsv csv="/etc/apps/foo/test.csv" field="bar"
Example 2:
* [|inputlookup users | rename username as search | fields + search | format ] | matchfieldfromcsv csv="etc/apps/search/lookups/users.csv" field=username | stats count by username

emailcsvs:
Given a list of csvs that have been created with outputcsv, each of the csv files is attached to a message and mailed to the address provided.

Example:

my great search | outputcsv foo.csv | emailcsvs to="you@there.com" csvs="foo.csv"

or more complicated:

my great search | outputcsv foo.csv | append maxtime=3600 [search my other great search | outputcsv bar.csv] | emailcsvs to="you@there.com" csvs="foo.csv,bar.csv" delete_on_exit=true

I will add other commands as it comes up, or per suggestion.

Cheers,
Vincent
vbumgarner@splunk.com

Versions and Release Notes

Version 0.3 (current version - updated Jul 27, 2011)
release notes:
Added matchfieldfromcsv.
show older versions »
Version 0.2 (updated Apr 01, 2011)

posted 01 Apr '11, 02:13

vbumgarner's gravatar image

vbumgarner
1.8k210
accept rate: 23%

new version 27 Jul '11, 14:25

Be the first one to review!

Did you find this app useful?

Preview toggle preview

Copyright © 2005-2012 Splunk, Inc. All rights reserved.