<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: splitting and inverting in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/splitting-and-inverting/m-p/335286#M99611</link>
    <description>&lt;P&gt;thanks , helped a lot&lt;/P&gt;</description>
    <pubDate>Mon, 30 Oct 2017 16:25:34 GMT</pubDate>
    <dc:creator>jamesrender</dc:creator>
    <dc:date>2017-10-30T16:25:34Z</dc:date>
    <item>
      <title>splitting and inverting</title>
      <link>https://community.splunk.com/t5/Splunk-Search/splitting-and-inverting/m-p/335274#M99599</link>
      <description>&lt;P&gt;How do I go from:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;”metrics=[a=1,b=2,c=3]”
”metrics=[a=2,b=5,c=6]”
”metrics=[a=1,c=3,c=4]”    
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;To:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;“a,b,c”
“1,2,3”
“2,5,6”
“1,3,4”
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;UL&gt;
&lt;LI&gt;There are a lot more key, value pairs in here, so I don't want to rex them out manually&lt;/LI&gt;
&lt;LI&gt;&lt;CODE&gt;extract&lt;/CODE&gt; didn't work I'm using a remotesyslog streaming mechanism (no props.conf, transform.conf)&lt;/LI&gt;
&lt;LI&gt;Splitting by comma gave me a multivalue field, I couldn't manage to get much further - I wanted a &lt;CODE&gt;foreach value&lt;/CODE&gt;&lt;/LI&gt;
&lt;/UL&gt;

&lt;P&gt;thanks&lt;/P&gt;</description>
      <pubDate>Thu, 26 Oct 2017 14:33:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/splitting-and-inverting/m-p/335274#M99599</guid>
      <dc:creator>jamesrender</dc:creator>
      <dc:date>2017-10-26T14:33:22Z</dc:date>
    </item>
    <item>
      <title>Re: splitting and inverting</title>
      <link>https://community.splunk.com/t5/Splunk-Search/splitting-and-inverting/m-p/335275#M99600</link>
      <description>&lt;P&gt;You don't need a transform to use &lt;CODE&gt;extract&lt;/CODE&gt;.  Try this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | extract kvdelim="=" pairdelim=","
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 26 Oct 2017 14:57:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/splitting-and-inverting/m-p/335275#M99600</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2017-10-26T14:57:22Z</dc:date>
    </item>
    <item>
      <title>Re: splitting and inverting</title>
      <link>https://community.splunk.com/t5/Splunk-Search/splitting-and-inverting/m-p/335276#M99601</link>
      <description>&lt;P&gt;What is the expected output from doing this?&lt;/P&gt;

&lt;P&gt;I'd think new fields:&lt;BR /&gt;
a=1&lt;BR /&gt;
b=2&lt;BR /&gt;
c=3&lt;/P&gt;

&lt;P&gt;I don't see any effect of adding this to the query, no new fields  &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt; &lt;BR /&gt;
I've used fieldsummary to see..&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;extract kvdelim="=" pairdelim=", " | fieldsummary&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Oct 2017 15:02:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/splitting-and-inverting/m-p/335276#M99601</guid>
      <dc:creator>jamesrender</dc:creator>
      <dc:date>2017-10-26T15:02:00Z</dc:date>
    </item>
    <item>
      <title>Re: splitting and inverting</title>
      <link>https://community.splunk.com/t5/Splunk-Search/splitting-and-inverting/m-p/335277#M99602</link>
      <description>&lt;P&gt;Try this run-anywhere example.  I get separate fields with it.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults 
| eval _raw= "metrics=[a=1,b=2,c=3]" 
| extract kvdelim="=" pairdelim=",]"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 26 Oct 2017 15:24:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/splitting-and-inverting/m-p/335277#M99602</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2017-10-26T15:24:06Z</dc:date>
    </item>
    <item>
      <title>Re: splitting and inverting</title>
      <link>https://community.splunk.com/t5/Splunk-Search/splitting-and-inverting/m-p/335278#M99603</link>
      <description>&lt;P&gt;Hi jamesrender,&lt;BR /&gt;
usually Splunk recognize fields when they are in format field=value, so with a simple table command you can have the requested table:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;yoursearch
| table a b c
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Bye.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Thu, 26 Oct 2017 15:32:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/splitting-and-inverting/m-p/335278#M99603</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2017-10-26T15:32:44Z</dc:date>
    </item>
    <item>
      <title>Re: splitting and inverting</title>
      <link>https://community.splunk.com/t5/Splunk-Search/splitting-and-inverting/m-p/335279#M99604</link>
      <description>&lt;P&gt;Yes, that works nicely! &lt;BR /&gt;
wth, I wonder what gives with my real world corporate data version.&lt;BR /&gt;
This has helped reassure me that &lt;CODE&gt;extract&lt;/CODE&gt; does work!&lt;/P&gt;</description>
      <pubDate>Thu, 26 Oct 2017 15:59:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/splitting-and-inverting/m-p/335279#M99604</guid>
      <dc:creator>jamesrender</dc:creator>
      <dc:date>2017-10-26T15:59:24Z</dc:date>
    </item>
    <item>
      <title>Re: splitting and inverting</title>
      <link>https://community.splunk.com/t5/Splunk-Search/splitting-and-inverting/m-p/335280#M99605</link>
      <description>&lt;P&gt;what is the field that &lt;CODE&gt;extract&lt;/CODE&gt; is working on?  I've done a &lt;CODE&gt;rex&lt;/CODE&gt; to generate a field thats in the &lt;CODE&gt;metrics=[a=1,b=2,c=3]&lt;/CODE&gt; format&lt;/P&gt;</description>
      <pubDate>Thu, 26 Oct 2017 16:01:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/splitting-and-inverting/m-p/335280#M99605</guid>
      <dc:creator>jamesrender</dc:creator>
      <dc:date>2017-10-26T16:01:05Z</dc:date>
    </item>
    <item>
      <title>Re: splitting and inverting</title>
      <link>https://community.splunk.com/t5/Splunk-Search/splitting-and-inverting/m-p/335281#M99606</link>
      <description>&lt;P&gt;ok, by redirecting my rex'd out field to _raw and THEN running kvdelim, I've got all the fields exposed&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;| rex field=message "msg=\[\{(?&amp;lt;metrics_detail&amp;gt;.*?)\}\]" | eval _raw=metrics_detail | extract kvdelim="=" pairdelim=","&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;how do I dump them to a table without explicity doing &lt;CODE&gt;table a b c&lt;/CODE&gt;  as there are 20 or more fields&lt;/P&gt;</description>
      <pubDate>Thu, 26 Oct 2017 16:07:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/splitting-and-inverting/m-p/335281#M99606</guid>
      <dc:creator>jamesrender</dc:creator>
      <dc:date>2017-10-26T16:07:32Z</dc:date>
    </item>
    <item>
      <title>Re: splitting and inverting</title>
      <link>https://community.splunk.com/t5/Splunk-Search/splitting-and-inverting/m-p/335282#M99607</link>
      <description>&lt;P&gt;I've gotten &lt;CODE&gt;extract&lt;/CODE&gt; working when I redirect my rex'd field to _raw like so:&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;| rex field=message "msg=\[\{(?&amp;lt;metrics_detail&amp;gt;.*?)\}\]" | eval _raw=metrics_detail | extract kvdelim="=" pairdelim=","&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;So now I've a ton of fields, is there a short way to dump a lot of fields out other than explicitly doing &lt;CODE&gt;table a b c&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Oct 2017 16:09:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/splitting-and-inverting/m-p/335282#M99607</guid>
      <dc:creator>jamesrender</dc:creator>
      <dc:date>2017-10-26T16:09:39Z</dc:date>
    </item>
    <item>
      <title>Re: splitting and inverting</title>
      <link>https://community.splunk.com/t5/Splunk-Search/splitting-and-inverting/m-p/335283#M99608</link>
      <description>&lt;P&gt;richgalloway helped me to troubleshoot &lt;CODE&gt;extract&lt;/CODE&gt; command which ultimately makes this problem much easier to deal with&lt;/P&gt;</description>
      <pubDate>Thu, 26 Oct 2017 16:12:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/splitting-and-inverting/m-p/335283#M99608</guid>
      <dc:creator>jamesrender</dc:creator>
      <dc:date>2017-10-26T16:12:47Z</dc:date>
    </item>
    <item>
      <title>Re: splitting and inverting</title>
      <link>https://community.splunk.com/t5/Splunk-Search/splitting-and-inverting/m-p/335284#M99609</link>
      <description>&lt;P&gt;You can do &lt;CODE&gt;|stats values(*) AS *&lt;/CODE&gt; to display the contents of all non-internal fields.&lt;/P&gt;</description>
      <pubDate>Thu, 26 Oct 2017 16:12:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/splitting-and-inverting/m-p/335284#M99609</guid>
      <dc:creator>elliotproebstel</dc:creator>
      <dc:date>2017-10-26T16:12:50Z</dc:date>
    </item>
    <item>
      <title>Re: splitting and inverting</title>
      <link>https://community.splunk.com/t5/Splunk-Search/splitting-and-inverting/m-p/335285#M99610</link>
      <description>&lt;P&gt;You can use &lt;CODE&gt;| fields - _* | table *&lt;/CODE&gt; to display all non-internal fields.&lt;/P&gt;</description>
      <pubDate>Thu, 26 Oct 2017 16:26:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/splitting-and-inverting/m-p/335285#M99610</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2017-10-26T16:26:46Z</dc:date>
    </item>
    <item>
      <title>Re: splitting and inverting</title>
      <link>https://community.splunk.com/t5/Splunk-Search/splitting-and-inverting/m-p/335286#M99611</link>
      <description>&lt;P&gt;thanks , helped a lot&lt;/P&gt;</description>
      <pubDate>Mon, 30 Oct 2017 16:25:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/splitting-and-inverting/m-p/335286#M99611</guid>
      <dc:creator>jamesrender</dc:creator>
      <dc:date>2017-10-30T16:25:34Z</dc:date>
    </item>
  </channel>
</rss>

