<?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 Regex sought  for consecutive-multi-line-search-joined-on-common-id display in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Regex-sought-for-consecutive-multi-line-search-joined-on-common/m-p/198616#M57462</link>
    <description>&lt;P&gt;This question is related to &lt;A href="http://answers.splunk.com/answers/127725/consecutive-multi-line-search-joined-on-common-id"&gt;http://answers.splunk.com/answers/127725/consecutive-multi-line-search-joined-on-common-id&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;From my logs, I need to extract this pattern (by unique ID, these 3 lines need to be consecutive):&lt;/P&gt;

&lt;P&gt;AAA-PROD-IVR1 DL 01:46:34.405|FYI|69/12345678 VoiceCallFlow c:MyPrompts\C1\IvrPromptswelcome.vox&lt;/P&gt;

&lt;P&gt;AAA-PROD-IVR1 DL 01:46:34.407|FYI|69/12345678 USR_PLAYPROMPT in Connected &lt;/P&gt;

&lt;P&gt;AAA-PROD-IVR1 DL 01:46:38.167|FYI|69/12345678 GCEV_DISCONNECTED in Connected&lt;/P&gt;

&lt;P&gt;The first line can look like this:&lt;/P&gt;

&lt;P&gt;AAA-PROD-IVR1 DL 01:46:34.405|FYI|69/12345678 VoiceCallFlow c:MyPrompts\C1\IvrPromptswelcome.vox&lt;/P&gt;

&lt;P&gt;AAA-PROD-IVR1 DL 01:46:34.405|FYI|69/12345678 SomeCallFlow c:MyPrompts\C1\e123.vox&lt;/P&gt;

&lt;P&gt;AAA-PROD-IVR1 DL 01:46:34.405|FYI|69/12345678 SpecialCallFlow \\somereallyspecialprompts\why_here\C1\e123.vox&lt;/P&gt;

&lt;P&gt;It was easy(er) to come up with a regex to extract and qualify prompts (i.e. IvrPromptswelcome.vox vs e123.vox etc)&lt;/P&gt;

&lt;P&gt;This is my Splunk Filter for Prompts:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;host=*prod-ivr* | rex "FYI|(?&amp;lt;call_id_ivr&amp;gt;\S+)" | transaction call_id_ivr maxevents=3 startswith=vox endswith=GCEV_DISCONNECTED | rex field=_raw "(?&amp;lt;Prompt&amp;gt;(?i)[\w\s\(\)]*\.vox)" | top 40 Prompt
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I can't figure out how to extract and qualify the "CallFlow" and see which one is more prevalent within this pattern.&lt;/P&gt;

&lt;P&gt;What should be my Splunk Filter for CallFlows ?&lt;/P&gt;

&lt;P&gt;Thank you!&lt;/P&gt;

&lt;P&gt;A.C.&lt;/P&gt;</description>
    <pubDate>Mon, 24 Mar 2014 21:41:16 GMT</pubDate>
    <dc:creator>achetreanu</dc:creator>
    <dc:date>2014-03-24T21:41:16Z</dc:date>
    <item>
      <title>Regex sought  for consecutive-multi-line-search-joined-on-common-id display</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-sought-for-consecutive-multi-line-search-joined-on-common/m-p/198616#M57462</link>
      <description>&lt;P&gt;This question is related to &lt;A href="http://answers.splunk.com/answers/127725/consecutive-multi-line-search-joined-on-common-id"&gt;http://answers.splunk.com/answers/127725/consecutive-multi-line-search-joined-on-common-id&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;From my logs, I need to extract this pattern (by unique ID, these 3 lines need to be consecutive):&lt;/P&gt;

&lt;P&gt;AAA-PROD-IVR1 DL 01:46:34.405|FYI|69/12345678 VoiceCallFlow c:MyPrompts\C1\IvrPromptswelcome.vox&lt;/P&gt;

&lt;P&gt;AAA-PROD-IVR1 DL 01:46:34.407|FYI|69/12345678 USR_PLAYPROMPT in Connected &lt;/P&gt;

&lt;P&gt;AAA-PROD-IVR1 DL 01:46:38.167|FYI|69/12345678 GCEV_DISCONNECTED in Connected&lt;/P&gt;

&lt;P&gt;The first line can look like this:&lt;/P&gt;

&lt;P&gt;AAA-PROD-IVR1 DL 01:46:34.405|FYI|69/12345678 VoiceCallFlow c:MyPrompts\C1\IvrPromptswelcome.vox&lt;/P&gt;

&lt;P&gt;AAA-PROD-IVR1 DL 01:46:34.405|FYI|69/12345678 SomeCallFlow c:MyPrompts\C1\e123.vox&lt;/P&gt;

&lt;P&gt;AAA-PROD-IVR1 DL 01:46:34.405|FYI|69/12345678 SpecialCallFlow \\somereallyspecialprompts\why_here\C1\e123.vox&lt;/P&gt;

&lt;P&gt;It was easy(er) to come up with a regex to extract and qualify prompts (i.e. IvrPromptswelcome.vox vs e123.vox etc)&lt;/P&gt;

&lt;P&gt;This is my Splunk Filter for Prompts:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;host=*prod-ivr* | rex "FYI|(?&amp;lt;call_id_ivr&amp;gt;\S+)" | transaction call_id_ivr maxevents=3 startswith=vox endswith=GCEV_DISCONNECTED | rex field=_raw "(?&amp;lt;Prompt&amp;gt;(?i)[\w\s\(\)]*\.vox)" | top 40 Prompt
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I can't figure out how to extract and qualify the "CallFlow" and see which one is more prevalent within this pattern.&lt;/P&gt;

&lt;P&gt;What should be my Splunk Filter for CallFlows ?&lt;/P&gt;

&lt;P&gt;Thank you!&lt;/P&gt;

&lt;P&gt;A.C.&lt;/P&gt;</description>
      <pubDate>Mon, 24 Mar 2014 21:41:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-sought-for-consecutive-multi-line-search-joined-on-common/m-p/198616#M57462</guid>
      <dc:creator>achetreanu</dc:creator>
      <dc:date>2014-03-24T21:41:16Z</dc:date>
    </item>
    <item>
      <title>Re: Regex sought  for consecutive-multi-line-search-joined-on-common-id display</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-sought-for-consecutive-multi-line-search-joined-on-common/m-p/198617#M57463</link>
      <description>&lt;P&gt;What do you mean by 'CallFlow'? The string that includes the substring CallFlow, i.e. VoiceCallFlow, SpecialCallFlow etc? Or is it whatever comes between the &lt;CODE&gt;call_id_ivr&lt;/CODE&gt; and the path to some .vox file, i.e. it does not necessarily contain the string 'CallFlow' at all? Is it only interesting to extract this piece of information for the first line of the three that make up the transaction?&lt;/P&gt;

&lt;P&gt;Here is an example (second &lt;CODE&gt;rex&lt;/CODE&gt;) that will extract what comes between the &lt;CODE&gt;call_id_ivr&lt;/CODE&gt; and something that ends in .vox, so it will only be extracted for the first event in the transaction, as it's the only one containing ".vox";&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;host=*prod-ivr* | rex "FYI|(?&amp;lt;call_id_ivr&amp;gt;\S+)\" | rex "\s(?&amp;lt;CallFlow&amp;gt;\S+)\s\S+\.vox"| transaction call_id_ivr maxevents=3 startswith=vox endswith=GCEV_DISCONNECTED | rex field=_raw "(?&amp;lt;Prompt&amp;gt;(?i)[\w\s\(\)]*\.vox)" | top 40 Prompt
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Adjust your search as needed.&lt;/P&gt;

&lt;P&gt;/K&lt;/P&gt;</description>
      <pubDate>Tue, 25 Mar 2014 00:32:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-sought-for-consecutive-multi-line-search-joined-on-common/m-p/198617#M57463</guid>
      <dc:creator>kristian_kolb</dc:creator>
      <dc:date>2014-03-25T00:32:58Z</dc:date>
    </item>
    <item>
      <title>Re: Regex sought  for consecutive-multi-line-search-joined-on-common-id display</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-sought-for-consecutive-multi-line-search-joined-on-common/m-p/198618#M57464</link>
      <description>&lt;P&gt;Thank you Kristian! Completely missed out that I can use "CallFlow".&lt;BR /&gt;
This was what worked:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;host=*prod-ivr* | rex "FYI|(?&amp;lt;call_id_ivr&amp;gt;\S+)" | transaction call_id_ivr maxevents=3 startswith=vox endswith=GCEV_DISCONNECTED   | rex field=_raw "\s(?&amp;lt;State&amp;gt;\w+CallFlow)" | top 10 State
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I wasn't clear in my question, I was looking to extract top Call Flows during which the user hangs up. So I was looking to extract "CallFlow", completely missing the convenient naming (i.e. each state has the pattern "CallFlow").&lt;/P&gt;

&lt;P&gt;I will abuse your kindness and throw another problem at you &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;Next, I'd like to have some sort of average 'size' of my prompts. Each prompt is built by chaining together 2 or more .vox files (could be one as well).&lt;/P&gt;

&lt;P&gt;Basically my logs will look like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;AAA-PROD-IVR1 DL 01:46:34.405|FYI|69/12345678 VoiceCallFlow c:MyPrompts\C1\IvrPromptswelcome.vox

AAA-PROD-IVR1 DL 01:46:34.405|FYI|69/12345678 VoiceCallFlow c:MyPrompts\C1\IvrPrompt11.vox

AAA-PROD-IVR1 DL 01:46:34.405|FYI|69/12345678 VoiceCallFlow c:MyPrompts\C1\IvrPrompt12.vox

AAA-PROD-IVR1 DL 01:46:34.405|FYI|69/12345678 Lots of other stuff I don't care about

AAA-PROD-IVR1 DL 01:46:34.405|FYI|69/12345678 More stuff I don't care about

AAA-PROD-IVR1 DL 01:46:34.405|FYI|69/12345678 More of the same - I don't care about

AAA-PROD-IVR1 DL 01:46:34.405|FYI|69/12345678 VoiceCallFlow c:MyPrompts\C1\IvrPrompt21.vox

AAA-PROD-IVR1 DL 01:46:34.405|FYI|69/12345678 VoiceCallFlow c:MyPrompts\C1\IvrPrompt22.vox

AAA-PROD-IVR1 DL 01:46:34.405|FYI|69/1234567 Blablabla - today and tomorrow
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;How can I count just the Prompts (i.e. contiguous chain of &lt;CODE&gt;*.vox&lt;/CODE&gt; files)?&lt;/P&gt;

&lt;P&gt;How can I determine the average "size" of my prompts? - i.e. the average prompt size = 6 &lt;CODE&gt;*.vox&lt;/CODE&gt; files&lt;/P&gt;

&lt;P&gt;Thank you!!&lt;BR /&gt;
A.C.&lt;/P&gt;</description>
      <pubDate>Tue, 25 Mar 2014 22:17:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-sought-for-consecutive-multi-line-search-joined-on-common/m-p/198618#M57464</guid>
      <dc:creator>achetreanu</dc:creator>
      <dc:date>2014-03-25T22:17:11Z</dc:date>
    </item>
    <item>
      <title>Re: Regex sought  for consecutive-multi-line-search-joined-on-common-id display</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Regex-sought-for-consecutive-multi-line-search-joined-on-common/m-p/198619#M57465</link>
      <description>&lt;P&gt;I can see two things that might work for you;&lt;/P&gt;

&lt;P&gt;a) use &lt;CODE&gt;transaction&lt;/CODE&gt; like you already do, and subtract X from the automatically created field &lt;CODE&gt;eventcount&lt;/CODE&gt;. This will work fine if you have a fixed number of events per transaction that you don't want to count, i.e. &lt;CODE&gt;GCEV_DISCONNECT&lt;/CODE&gt; and &lt;CODE&gt;USR_PLAYPROMPT&lt;/CODE&gt;. &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | eval prompt_size = eventcount - 2 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;b) if there is an unknown number of events in the transaction you do not want to count, you can do it like so;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;host=*prod-ivr* *.vox | rex "FYI|(?&amp;lt;call_id_ivr&amp;gt;\S+)" |     stats c by call_id_ivr | stats avg(c) as avg_prompt
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;/k&lt;/P&gt;</description>
      <pubDate>Wed, 26 Mar 2014 09:02:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Regex-sought-for-consecutive-multi-line-search-joined-on-common/m-p/198619#M57465</guid>
      <dc:creator>kristian_kolb</dc:creator>
      <dc:date>2014-03-26T09:02:38Z</dc:date>
    </item>
  </channel>
</rss>

