<?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 Correlation Events and Discard Events in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Correlation-Events-and-Discard-Events/m-p/353159#M104534</link>
    <description>&lt;P&gt;Hello, &lt;BR /&gt;
I need your help to correlation some transactions by a number of reference and responses  Input and Output but the reponse Output can have many results. &lt;BR /&gt;
I have the following query with splunk but I need only in the dashboard the transactions that you have response I or O in a cell. &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="x" source="MCB-S015-FILE-MONITOREO2-170919-000-ACYPGAMA.CBL" sourcetype="x" field_header=STD2 
| eval num_trans=code_serv_std2.subcodigo_serv_std2
| transaction num_trans  with mvlist=t startswith=(resp=*I) 
| search duration&amp;gt;=0
| eval first_mix=mvindex(mix, 0) 
| eval last_mix=mvindex(mix, -1) 
| eval hour1=mvindex(hora, 0)
| eval hour2=mvindex(hora, -1)
| eval version1=mvindex(pref_header_std2, 0)
| eval mod_serv_std2=mvindex(modalidad_serv, 0)
| eval first_duration = tostring(duration, "duration")
| eval mytime=strftime(_time, "%Y-%m-%d") 
| eval fecha=strftime(strptime(mytime,"%Y-%m-%d"),"%d/%m/%Y")
| eval first_hour=strftime(strptime(hour1,"%H%M%S%2N"),"%H:%M:%S.%2N")
| eval last_hour=strftime(strptime(hour2,"%H%M%S%2N"),"%H:%M:%S.%2N")
| eval num_tran=mvindex(num_trans, -1)
| table mix resp version1 first_mix last_mix fecha first_hour last_hour first_duration num_tran mod_serv_std2 app_dest_std2 app_origen_std2
| rename  mix as "MIX" fecha as "Fecha" first_hour as "Hora Inicio Respuesta" last_hour as "Hora Fin Respuesta" first_duration as "Duración de Respuesta (s)"
  num_tran as "ID de Transacción" mod_serv_std2 as "Modalidad De Servicio"  first_mix as "Mix Inicio" last_mix as "Mix Fin" app_dest_std2 as "Aplicación Destino" resp as "Respuesta" app_origen_std2 as "Aplicacion Origen" version1 as Version
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Result of the Query&lt;/P&gt;

&lt;P&gt;&lt;IMG src="https://community.splunk.com/storage/temp/229708-1.png" alt="alt text" /&gt;&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;*But I only need in the dashboard the transactions that have an response **I&lt;/STRONG&gt; and one or more &lt;STRONG&gt;O&lt;/STRONG&gt;. I need to discard those that only have one Input&lt;BR /&gt;
it's possible ?*** &lt;BR /&gt;
&lt;IMG src="https://community.splunk.com/storage/temp/229711-2.png" alt="alt text" /&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 29 Sep 2020 18:29:41 GMT</pubDate>
    <dc:creator>Carolina</dc:creator>
    <dc:date>2020-09-29T18:29:41Z</dc:date>
    <item>
      <title>Correlation Events and Discard Events</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Correlation-Events-and-Discard-Events/m-p/353159#M104534</link>
      <description>&lt;P&gt;Hello, &lt;BR /&gt;
I need your help to correlation some transactions by a number of reference and responses  Input and Output but the reponse Output can have many results. &lt;BR /&gt;
I have the following query with splunk but I need only in the dashboard the transactions that you have response I or O in a cell. &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index="x" source="MCB-S015-FILE-MONITOREO2-170919-000-ACYPGAMA.CBL" sourcetype="x" field_header=STD2 
| eval num_trans=code_serv_std2.subcodigo_serv_std2
| transaction num_trans  with mvlist=t startswith=(resp=*I) 
| search duration&amp;gt;=0
| eval first_mix=mvindex(mix, 0) 
| eval last_mix=mvindex(mix, -1) 
| eval hour1=mvindex(hora, 0)
| eval hour2=mvindex(hora, -1)
| eval version1=mvindex(pref_header_std2, 0)
| eval mod_serv_std2=mvindex(modalidad_serv, 0)
| eval first_duration = tostring(duration, "duration")
| eval mytime=strftime(_time, "%Y-%m-%d") 
| eval fecha=strftime(strptime(mytime,"%Y-%m-%d"),"%d/%m/%Y")
| eval first_hour=strftime(strptime(hour1,"%H%M%S%2N"),"%H:%M:%S.%2N")
| eval last_hour=strftime(strptime(hour2,"%H%M%S%2N"),"%H:%M:%S.%2N")
| eval num_tran=mvindex(num_trans, -1)
| table mix resp version1 first_mix last_mix fecha first_hour last_hour first_duration num_tran mod_serv_std2 app_dest_std2 app_origen_std2
| rename  mix as "MIX" fecha as "Fecha" first_hour as "Hora Inicio Respuesta" last_hour as "Hora Fin Respuesta" first_duration as "Duración de Respuesta (s)"
  num_tran as "ID de Transacción" mod_serv_std2 as "Modalidad De Servicio"  first_mix as "Mix Inicio" last_mix as "Mix Fin" app_dest_std2 as "Aplicación Destino" resp as "Respuesta" app_origen_std2 as "Aplicacion Origen" version1 as Version
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Result of the Query&lt;/P&gt;

&lt;P&gt;&lt;IMG src="https://community.splunk.com/storage/temp/229708-1.png" alt="alt text" /&gt;&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;*But I only need in the dashboard the transactions that have an response **I&lt;/STRONG&gt; and one or more &lt;STRONG&gt;O&lt;/STRONG&gt;. I need to discard those that only have one Input&lt;BR /&gt;
it's possible ?*** &lt;BR /&gt;
&lt;IMG src="https://community.splunk.com/storage/temp/229711-2.png" alt="alt text" /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 18:29:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Correlation-Events-and-Discard-Events/m-p/353159#M104534</guid>
      <dc:creator>Carolina</dc:creator>
      <dc:date>2020-09-29T18:29:41Z</dc:date>
    </item>
    <item>
      <title>Re: Correlation Events and Discard Events</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Correlation-Events-and-Discard-Events/m-p/353160#M104535</link>
      <description>&lt;P&gt;Yes it is&lt;/P&gt;

&lt;P&gt;Use eval field_count=mvcount(Respuesta) to count the number of events in a multivalued field, and then filter them out with where field_count==1&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 18:27:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Correlation-Events-and-Discard-Events/m-p/353160#M104535</guid>
      <dc:creator>tiagofbmm</dc:creator>
      <dc:date>2020-09-29T18:27:25Z</dc:date>
    </item>
  </channel>
</rss>

