<?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 edit my search for process flow analysis to sort and group values as expected? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-for-process-flow-analysis-to-sort-and/m-p/267725#M80548</link>
    <description>&lt;P&gt;I made a table of aliases as a multivalue field named myid&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;* | stats values(oldId) as myid by id | eval myid=mvdedup(mvappend(myid,id)) | table myid&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;Somehow I need to combine the stats in the top comment to group by any value found in myid. Still having no idea how to do it.&lt;/P&gt;</description>
    <pubDate>Wed, 07 Sep 2016 20:55:08 GMT</pubDate>
    <dc:creator>rvencu</dc:creator>
    <dc:date>2016-09-07T20:55:08Z</dc:date>
    <item>
      <title>How to edit my search for process flow analysis to sort and group values as expected?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-for-process-flow-analysis-to-sort-and/m-p/267722#M80545</link>
      <description>&lt;P&gt;Hi, &lt;/P&gt;

&lt;P&gt;I followed instructions here:&lt;BR /&gt;
&lt;A href="https://answers.splunk.com/answers/132016/process-flow-tracing-point-to-point-latency-calculation-visualisation-swim-lanes-is-it-possible.html"&gt;https://answers.splunk.com/answers/132016/process-flow-tracing-point-to-point-latency-calculation-visualisation-swim-lanes-is-it-possible.html&lt;/A&gt; &lt;BR /&gt;
to analyse users stuck on steps of my business process.&lt;/P&gt;

&lt;P&gt;My current search is:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;host="sp.dentfix.ro" | stats values(event) as step values(eval(strftime(_time, "%Y-%d-%m %H:%M"))) as times by id | mvcombine step | stats count by step
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I have a number of issues here:&lt;BR /&gt;
 1. the values(event) is listing values in alphabetical order, but I would like to see values in event time order (that is first event of every type).&lt;BR /&gt;
 2. Even more important, I have some events sp_alias where users get identified. The event contains fields id (as the new id) and oldId as former id of the user. How can I consolidate all oldId s with new id s and group by real users?&lt;/P&gt;</description>
      <pubDate>Wed, 07 Sep 2016 17:41:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-for-process-flow-analysis-to-sort-and/m-p/267722#M80545</guid>
      <dc:creator>rvencu</dc:creator>
      <dc:date>2016-09-07T17:41:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit my search for process flow analysis to sort and group values as expected?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-for-process-flow-analysis-to-sort-and/m-p/267723#M80546</link>
      <description>&lt;P&gt;I'm not following question 2, but question 1 should use list() instead of values(), which will show in received order and non-dedup'd.&lt;/P&gt;</description>
      <pubDate>Wed, 07 Sep 2016 17:50:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-for-process-flow-analysis-to-sort-and/m-p/267723#M80546</guid>
      <dc:creator>twinspop</dc:creator>
      <dc:date>2016-09-07T17:50:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit my search for process flow analysis to sort and group values as expected?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-for-process-flow-analysis-to-sort-and/m-p/267724#M80547</link>
      <description>&lt;P&gt;yes, thanks for the tip, changing both values with list helped to display the steps more clearly, even if the stats table increased.&lt;/P&gt;

&lt;P&gt;New search have a sort too to see better the mass behavior:&lt;BR /&gt;
&lt;CODE&gt;host="sp.dentfix.ro" | stats list(event) as step list(eval(strftime(_time, "%Y-%d-%m %H:%M"))) as times by id | mvcombine step | stats count as num by step | sort num desc&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Sep 2016 18:01:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-for-process-flow-analysis-to-sort-and/m-p/267724#M80547</guid>
      <dc:creator>rvencu</dc:creator>
      <dc:date>2016-09-07T18:01:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit my search for process flow analysis to sort and group values as expected?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-for-process-flow-analysis-to-sort-and/m-p/267725#M80548</link>
      <description>&lt;P&gt;I made a table of aliases as a multivalue field named myid&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;* | stats values(oldId) as myid by id | eval myid=mvdedup(mvappend(myid,id)) | table myid&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;Somehow I need to combine the stats in the top comment to group by any value found in myid. Still having no idea how to do it.&lt;/P&gt;</description>
      <pubDate>Wed, 07 Sep 2016 20:55:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-for-process-flow-analysis-to-sort-and/m-p/267725#M80548</guid>
      <dc:creator>rvencu</dc:creator>
      <dc:date>2016-09-07T20:55:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit my search for process flow analysis to sort and group values as expected?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-for-process-flow-analysis-to-sort-and/m-p/267726#M80549</link>
      <description>&lt;P&gt;So using the above search I get a table like a lookup table. I would calculate a new field theId in main search based on id, if id is inside myid field in the lookup table I would return the identified id.&lt;/P&gt;

&lt;P&gt;then I could group events by the new theId field.&lt;/P&gt;

&lt;P&gt;However implementing such a lookup apparently required exporting the table to a csv file? Then I need to define a job to do this from time to time to update the lookup file.&lt;/P&gt;</description>
      <pubDate>Thu, 08 Sep 2016 08:46:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-for-process-flow-analysis-to-sort-and/m-p/267726#M80549</guid>
      <dc:creator>rvencu</dc:creator>
      <dc:date>2016-09-08T08:46:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit my search for process flow analysis to sort and group values as expected?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-for-process-flow-analysis-to-sort-and/m-p/267727#M80550</link>
      <description>&lt;P&gt;So I got this step, by creating a lookup file from the search&lt;BR /&gt;
&lt;CODE&gt;event=sp_alias | where oldId != id | stats values(oldId) as myid by id | outputlookup sp_aliases.csv&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;Now I have to tune the lookup file to include everything I need and find a way to use it in the main search. Also I need to automate the above search through a job I suppose.&lt;/P&gt;</description>
      <pubDate>Thu, 08 Sep 2016 09:17:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-for-process-flow-analysis-to-sort-and/m-p/267727#M80550</guid>
      <dc:creator>rvencu</dc:creator>
      <dc:date>2016-09-08T09:17:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit my search for process flow analysis to sort and group values as expected?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-for-process-flow-analysis-to-sort-and/m-p/267728#M80551</link>
      <description>&lt;P&gt;OK, so I managed to solve the question 2.&lt;/P&gt;

&lt;P&gt;Steps:&lt;BR /&gt;
 1. I created this search &lt;CODE&gt;event=sp_alias | where oldId != id | stats values(id) as myid by oldId | rename oldId as id | outputlookup sp_aliases.csv&lt;/CODE&gt; that makes a table of distinct oldId that should be replaced with identified id into a new field via lookup&lt;BR /&gt;
 2. I created the main search &lt;CODE&gt;host="sp.dentfix.ro" | where id!="" | lookup sp_aliases id OUTPUT myid | eval theId=if(myid!="",myid,id) | stats list(event) as steps list(eval(strftime(_time, "%Y-%d-%m %H:%M"))) as times by theId | mvcombine steps | where like(steps,"%Payment%") | stats count as num by steps | sort num desc&lt;/CODE&gt; where I created a new field, theId that unifies all events that happened via various ids in the past to the identified user id. I added a filter to display only steps that contain a Payment event.&lt;/P&gt;</description>
      <pubDate>Thu, 08 Sep 2016 10:08:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-for-process-flow-analysis-to-sort-and/m-p/267728#M80551</guid>
      <dc:creator>rvencu</dc:creator>
      <dc:date>2016-09-08T10:08:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit my search for process flow analysis to sort and group values as expected?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-for-process-flow-analysis-to-sort-and/m-p/267729#M80552</link>
      <description>&lt;P&gt;There is a catch, sometimes the user can identify itself multiple times between several id. The lookup table is not ideal made to take care of this situation, perhaps a better approach is to collect all ids ever related into a single field then select one id to represent the whole group. Needs improvement but the impact is not big&lt;/P&gt;</description>
      <pubDate>Thu, 08 Sep 2016 10:11:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-for-process-flow-analysis-to-sort-and/m-p/267729#M80552</guid>
      <dc:creator>rvencu</dc:creator>
      <dc:date>2016-09-08T10:11:36Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit my search for process flow analysis to sort and group values as expected?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-for-process-flow-analysis-to-sort-and/m-p/267730#M80553</link>
      <description>&lt;P&gt;Since the free license does not seem to include report scheduler, I had to setup a crontab entry such as&lt;BR /&gt;
&lt;CODE&gt;0 0 * * * root /opt/splunk/bin/splunk search '|savedsearch "Job to update sp_aliases lookup"' &amp;gt;/dev/null 2&amp;gt;&amp;amp;1&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Sep 2016 10:29:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-my-search-for-process-flow-analysis-to-sort-and/m-p/267730#M80553</guid>
      <dc:creator>rvencu</dc:creator>
      <dc:date>2016-09-08T10:29:41Z</dc:date>
    </item>
  </channel>
</rss>

