<?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: How to chart values that belong a group which is determined by similar field names in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-chart-values-that-belong-a-group-which-is-determined-by/m-p/327003#M175342</link>
    <description>&lt;P&gt;It puts the group names in alphabetical order.  If you need them in another order, then some kind of sorting prefix will need to be added.&lt;/P&gt;</description>
    <pubDate>Tue, 28 Feb 2017 03:26:30 GMT</pubDate>
    <dc:creator>DalJeanis</dc:creator>
    <dc:date>2017-02-28T03:26:30Z</dc:date>
    <item>
      <title>How to chart values that belong a group which is determined by similar field names</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-chart-values-that-belong-a-group-which-is-determined-by/m-p/326999#M175338</link>
      <description>&lt;P&gt;I'm wondering what the most efficient way to deal events that contain values that should be grouped based on the field names. For example, I would like to chart the counts the group names using the example event below. &lt;/P&gt;

&lt;P&gt;Note: there is no way to tell exactly how many groups the event will contain. Some times there may be just 2 groups (Z_f1 and Z_f2) other times there may be ten or twenty (Z_f1, Z_f2, Z_f3 etc. etc.)&lt;/P&gt;

&lt;P&gt;Show Z_f1_count by Z_f1_a1&lt;/P&gt;

&lt;P&gt;Z_f1_a1: first_group_name&lt;BR /&gt;
Z_f1_a2: 5&lt;BR /&gt;
Z_f1_count: 32&lt;BR /&gt;
Z_f2_a1: second_group_name&lt;BR /&gt;
Z_f2_a2: 5&lt;BR /&gt;
Z_f2_count: 49&lt;BR /&gt;
Z_f3_a1: third_group_name&lt;BR /&gt;
Z_f3_a2: 1&lt;BR /&gt;
Z_f3_count: 100&lt;BR /&gt;
Z_f4_a1: fourth_group_name&lt;BR /&gt;
Z_f4_a2: 01&lt;BR /&gt;
Z_f4_count: 49&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 13:02:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-chart-values-that-belong-a-group-which-is-determined-by/m-p/326999#M175338</guid>
      <dc:creator>jpass</dc:creator>
      <dc:date>2020-09-29T13:02:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to chart values that belong a group which is determined by similar field names</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-chart-values-that-belong-a-group-which-is-determined-by/m-p/327000#M175339</link>
      <description>&lt;P&gt;1) is it always Z_f1, Z_f2 etc, or does that vary as well?&lt;BR /&gt;
2) what kind of chart are you wanting to produce?&lt;BR /&gt;
3) do you want to match charts across events by the group name?&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 13:02:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-chart-values-that-belong-a-group-which-is-determined-by/m-p/327000#M175339</guid>
      <dc:creator>DalJeanis</dc:creator>
      <dc:date>2020-09-29T13:02:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to chart values that belong a group which is determined by similar field names</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-chart-values-that-belong-a-group-which-is-determined-by/m-p/327001#M175340</link>
      <description>&lt;P&gt;Yes, Z_f always stays the same. Only the number changes. So the number is what ties the fields together.&lt;BR /&gt;
I would like to see this look like this in a table with the group name as the column headers and the count value under neath like this:&lt;/P&gt;

&lt;P&gt;first_group_name     second_group_name     third_group_name     fourth_group_name&lt;BR /&gt;
32                                49                                      100                                49&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 13:02:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-chart-values-that-belong-a-group-which-is-determined-by/m-p/327001#M175340</guid>
      <dc:creator>jpass</dc:creator>
      <dc:date>2020-09-29T13:02:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to chart values that belong a group which is determined by similar field names</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-chart-values-that-belong-a-group-which-is-determined-by/m-p/327002#M175341</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;|makeresults | eval _raw="Z_f1_a1: first_group_name,Z_f1_a2: 5,Z_f1_count: 32,Z_f2_a1: second_group_name,Z_f2_a2: 5,Z_f2_count: 49,Z_f3_a1: a_group_name,Z_f3_a2: 1,Z_f3_count: 100,Z_f4_a1: another_name,Z_f4_a2: 01,Z_f4_count: 49"
| append [|makeresults | eval _raw="Z_f1_a1: first_group_name,Z_f1_a2: 4,Z_f1_count: 36,Z_f2_a1: second_group_name,Z_f2_a2: 5,Z_f2_count: 53,Z_f3_a1: a_group_name,Z_f3_a2: 1,Z_f3_count: 100,Z_f4_a1: different_name,Z_f4_a2: 4,Z_f4_count: 32,Z_f5_a1: another_name,Z_f5_a2: 4,Z_f5_count: 32" | eval _time=_time+10]

| rex max_match=0 "\w+_a1\:\s(?&amp;lt;groupname&amp;gt;[^,]+),\w+_a2\:\s(?&amp;lt;groupnumber&amp;gt;[^,]+),\w+_count\:\s(?&amp;lt;groupcount&amp;gt;[^,]+),?"
| eval zipped=mvzip(groupname,groupcount,"!!!!")
| table _time zipped
| mvexpand zipped
| makemv delim="!!!!" zipped
| eval groupname=mvindex(zipped,0)
| eval count=mvindex(zipped,1)
| table _time groupname count
| chart sum(count) over _time by groupname
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;producing this &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;_time                 a_group_name  another_name  different_name  first_group_name   second_group_name   
2/28/2017  3:14:38 AM 100           49                            32                 49                  
2/28/2017  3:14:48 AM 100           32            32              36                 53     
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 28 Feb 2017 03:09:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-chart-values-that-belong-a-group-which-is-determined-by/m-p/327002#M175341</guid>
      <dc:creator>DalJeanis</dc:creator>
      <dc:date>2017-02-28T03:09:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to chart values that belong a group which is determined by similar field names</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-chart-values-that-belong-a-group-which-is-determined-by/m-p/327003#M175342</link>
      <description>&lt;P&gt;It puts the group names in alphabetical order.  If you need them in another order, then some kind of sorting prefix will need to be added.&lt;/P&gt;</description>
      <pubDate>Tue, 28 Feb 2017 03:26:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-chart-values-that-belong-a-group-which-is-determined-by/m-p/327003#M175342</guid>
      <dc:creator>DalJeanis</dc:creator>
      <dc:date>2017-02-28T03:26:30Z</dc:date>
    </item>
    <item>
      <title>Re: How to chart values that belong a group which is determined by similar field names</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-chart-values-that-belong-a-group-which-is-determined-by/m-p/327004#M175343</link>
      <description>&lt;P&gt;worked perfectly thank you so much.&lt;/P&gt;</description>
      <pubDate>Tue, 28 Feb 2017 04:47:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-chart-values-that-belong-a-group-which-is-determined-by/m-p/327004#M175343</guid>
      <dc:creator>jpass</dc:creator>
      <dc:date>2017-02-28T04:47:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to chart values that belong a group which is determined by similar field names</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-chart-values-that-belong-a-group-which-is-determined-by/m-p/327005#M175344</link>
      <description>&lt;P&gt;glad to help.&lt;/P&gt;</description>
      <pubDate>Tue, 28 Feb 2017 05:32:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-chart-values-that-belong-a-group-which-is-determined-by/m-p/327005#M175344</guid>
      <dc:creator>DalJeanis</dc:creator>
      <dc:date>2017-02-28T05:32:29Z</dc:date>
    </item>
  </channel>
</rss>

