<?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: [Cisco ironport mail logs] How can I do a transaction on a sometimes-multi-value field where a key field migrates values? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Cisco-ironport-mail-logs-How-can-I-do-a-transaction-on-a/m-p/164765#M46796</link>
    <description>&lt;P&gt;Sorry, i tried but now i'm on something new at work so... I'll be on this another time !&lt;/P&gt;</description>
    <pubDate>Wed, 08 Jul 2015 06:53:49 GMT</pubDate>
    <dc:creator>PierreE</dc:creator>
    <dc:date>2015-07-08T06:53:49Z</dc:date>
    <item>
      <title>[Cisco ironport mail logs] How can I do a transaction on a sometimes-multi-value field where a key field migrates values?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Cisco-ironport-mail-logs-How-can-I-do-a-transaction-on-a/m-p/164758#M46789</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;My problem is that I have ironports mail logs splitted like this :&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;Jun  8 13:51:21 my_server: Mon Jun  8 13:46:14 2015 Info: New SMTP ICID 123456789 interface Data 1 (1.2.3.4) address 10.10.10.10 reverse dns host blabla.mail.com verified yes
Jun  8 13:51:21my_server: Mon Jun  8 13:46:14 2015 Info: ICID 123456789 ACCEPT SG UNKNOWNLIST match sbrs[-1.5:7.0] SBRS 5.6
Jun  8 13:51:21 my_server: Mon Jun  8 13:46:14 2015 Info: Start MID 987654321 ICID 123456789
Jun  8 13:51:21 my_server: Mon Jun  8 13:46:14 2015 Info: MID 987654321 ICID 351684134 From: &amp;lt;test_name@mail.fr&amp;gt;
Jun  8 13:51:21 my_server: Mon Jun  8 13:46:14 2015 Info: MID 987654321 ICID 351684134 RID 0 To: &amp;lt;test_name2@mail.fr&amp;gt;
Jun  8 13:51:21my_server: Mon Jun  8 13:46:15 2015 Info: MID 987654321 Message-ID '&amp;lt;id@mail.fr&amp;gt;'
Jun  8 13:51:21 my_server: Mon Jun  8 13:46:15 2015 Info: MID 251913918 Subject 'test_subject'
Jun  8 13:51:21 my_server: Mon Jun  8 13:46:15 2015 Info: MID 987654321 ready 18615 bytes from &amp;lt;test_name@mail.fr&amp;gt;
Jun  8 13:51:21 my_server: Mon Jun  8 13:46:15 2015 Info: MID 987654321 rewritten to MID 987654322 by LDAP rewrite
Jun  8 13:51:21 my_server: Mon Jun  8 13:46:15 2015 Info: MID 987654322 ICID 0 From: &amp;lt;test_name@mail.fr&amp;gt;
Jun  8 13:51:21 my_server: Mon Jun  8 13:46:15 2015 Info: MID 987654322 ICID 0 RID 0 To: &amp;lt;test_name2@mail.fr&amp;gt;
Jun  8 13:51:21 my_server: Mon Jun  8 13:46:15 2015 Info: MID 987654322 attachment 'image001.jpg'
Jun  8 13:51:21 my_server: Mon Jun  8 13:46:15 2015 Info: MID 987654322 attachment 'image001.jpg'
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;And I want to create an aggregate events that is able to join a log that links IP address to preliminary &lt;CODE&gt;MID&lt;/CODE&gt; and then can handle field &lt;CODE&gt;MID&lt;/CODE&gt; going multi-value in a single event that shows the mapping of preliminary &lt;CODE&gt;MID&lt;/CODE&gt; to final &lt;CODE&gt;MID&lt;/CODE&gt; and includes all the later events that have only the final &lt;CODE&gt;MID&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;The goal is for example extract IP address which send an email with a picture in attachment.&lt;/P&gt;

&lt;P&gt;I tryed some transactions to join ICID, MID like : &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=test_ironport sourcetype=cisco:esa:textmail (ACCEPT OR address OR attachment_type=doc OR MID OR vendor_action=mid_rewritten) | eval courant_mid=if(isnotnull(prev_internal_message_id), prev_internal_message_id, internal_message_id)| transaction icid courant_mid
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;OR&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=test_ironport sourcetype=cisco:esa:textmail (ACCEPT OR address OR attachment_type=doc OR MID OR vendor_type=mid_rewritten) | transaction icid internal_message_id prev_internal_message_id
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The issue in my case is the changing MID that complicate the joint of linked events &lt;/P&gt;

&lt;P&gt;I wonder if I have to keep using &lt;CODE&gt;transaction&lt;/CODE&gt; or do I have to change the method and use &lt;CODE&gt;lookup&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;May be someone is aware of an App which can correlate Ironport email events at the indexing ?&lt;/P&gt;

&lt;P&gt;Thank you,&lt;BR /&gt;
Pierre&lt;/P&gt;</description>
      <pubDate>Tue, 16 Jun 2015 11:54:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Cisco-ironport-mail-logs-How-can-I-do-a-transaction-on-a/m-p/164758#M46789</guid>
      <dc:creator>PierreE</dc:creator>
      <dc:date>2015-06-16T11:54:50Z</dc:date>
    </item>
    <item>
      <title>Re: [Cisco ironport mail logs] How can I do a transaction on a sometimes-multi-value field where a key field migrates values?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Cisco-ironport-mail-logs-How-can-I-do-a-transaction-on-a/m-p/164759#M46790</link>
      <description>&lt;P&gt;Assuming that there is only a single LDAP rewrite per transaction, this should work.&lt;/P&gt;

&lt;P&gt;Create a &lt;CODE&gt;lookup definition&lt;/CODE&gt; for the &lt;CODE&gt;MID&lt;/CODE&gt; ONCE like this in &lt;CODE&gt;transforms.conf&lt;/CODE&gt;:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[MID_lookup]
filename = MID_lookup.csv
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Run this search FIRST (every time) to create a lookup file:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=test_ironport sourcetype=cisco:esa:textmail vendor_action=mid_rewritten| rex "\s+Info:\s+MID\s+(?&amp;lt;TempMID&amp;gt;\d+)\s+rewritten to\s+(?&amp;lt;FinalMID&amp;gt;\d+)\s+by LDAP rewrite" | eval InitialMID = TempMID . "," . FinalMID | fields - TempMID | makemv delim="," InitialMID | mvexpand InitialMID | outputlookup MID_lookup.csv
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Then run this search to use the lookup:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=test_ironport sourcetype=cisco:esa:textmail (ACCEPT OR address OR attachment_type=doc OR MID) | rex "^.*?MID\s+(?&amp;lt;InitialMID&amp;gt;\d+)" | lookup MID_lookup InitialMID OUTPUT FinalMID | transaction icid FinalMID
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/6.2.3/SearchReference/Outputlookup"&gt;http://docs.splunk.com/Documentation/Splunk/6.2.3/SearchReference/Outputlookup&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Jun 2015 14:49:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Cisco-ironport-mail-logs-How-can-I-do-a-transaction-on-a/m-p/164759#M46790</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2015-06-16T14:49:25Z</dc:date>
    </item>
    <item>
      <title>Re: [Cisco ironport mail logs] How can I do a transaction on a sometimes-multi-value field where a key field migrates values?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Cisco-ironport-mail-logs-How-can-I-do-a-transaction-on-a/m-p/164760#M46791</link>
      <description>&lt;P&gt;Have you considered capturing the second mid, e.g.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| rex "MID \d+ rewritten to MID (?&amp;lt;second_mid&amp;gt;\d+)
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;then using it in your transaction&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=test_ironport sourcetype=cisco:esa:textmail 
(ACCEPT OR address OR attachment_type=doc OR MID OR vendor_action=mid_rewritten) 
| eval courant_mid=if(isnotnull(prev_internal_message_id), prev_internal_message_id, internal_message_id)
| rex "MID \d+ rewritten to MID (?&amp;lt;second_mid&amp;gt;\d+)
| transaction mid second_mid icid
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;or something else along those lines?&lt;/P&gt;</description>
      <pubDate>Tue, 16 Jun 2015 17:06:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Cisco-ironport-mail-logs-How-can-I-do-a-transaction-on-a/m-p/164760#M46791</guid>
      <dc:creator>aljohnson_splun</dc:creator>
      <dc:date>2015-06-16T17:06:16Z</dc:date>
    </item>
    <item>
      <title>Re: [Cisco ironport mail logs] How can I do a transaction on a sometimes-multi-value field where a key field migrates values?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Cisco-ironport-mail-logs-How-can-I-do-a-transaction-on-a/m-p/164761#M46792</link>
      <description>&lt;P&gt;No it doesn't work... I have quite the same results&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jun 2015 12:30:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Cisco-ironport-mail-logs-How-can-I-do-a-transaction-on-a/m-p/164761#M46792</guid>
      <dc:creator>PierreE</dc:creator>
      <dc:date>2015-06-17T12:30:27Z</dc:date>
    </item>
    <item>
      <title>Re: [Cisco ironport mail logs] How can I do a transaction on a sometimes-multi-value field where a key field migrates values?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Cisco-ironport-mail-logs-How-can-I-do-a-transaction-on-a/m-p/164762#M46793</link>
      <description>&lt;P&gt;Didn't change of my results...&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jun 2015 12:30:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Cisco-ironport-mail-logs-How-can-I-do-a-transaction-on-a/m-p/164762#M46793</guid>
      <dc:creator>PierreE</dc:creator>
      <dc:date>2015-06-17T12:30:55Z</dc:date>
    </item>
    <item>
      <title>Re: [Cisco ironport mail logs] How can I do a transaction on a sometimes-multi-value field where a key field migrates values?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Cisco-ironport-mail-logs-How-can-I-do-a-transaction-on-a/m-p/164763#M46794</link>
      <description>&lt;P&gt;Will you post the results of each of the 2 searches (remove the &lt;CODE&gt;| outputlookup&lt;/CODE&gt;) for a very tiny sample of data?  I have double-checked and it definitely should work...???&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jun 2015 14:42:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Cisco-ironport-mail-logs-How-can-I-do-a-transaction-on-a/m-p/164763#M46794</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2015-06-17T14:42:04Z</dc:date>
    </item>
    <item>
      <title>Re: [Cisco ironport mail logs] How can I do a transaction on a sometimes-multi-value field where a key field migrates values?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Cisco-ironport-mail-logs-How-can-I-do-a-transaction-on-a/m-p/164764#M46795</link>
      <description>&lt;P&gt;Did you ever get this to work?&lt;/P&gt;</description>
      <pubDate>Tue, 07 Jul 2015 21:34:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Cisco-ironport-mail-logs-How-can-I-do-a-transaction-on-a/m-p/164764#M46795</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2015-07-07T21:34:09Z</dc:date>
    </item>
    <item>
      <title>Re: [Cisco ironport mail logs] How can I do a transaction on a sometimes-multi-value field where a key field migrates values?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Cisco-ironport-mail-logs-How-can-I-do-a-transaction-on-a/m-p/164765#M46796</link>
      <description>&lt;P&gt;Sorry, i tried but now i'm on something new at work so... I'll be on this another time !&lt;/P&gt;</description>
      <pubDate>Wed, 08 Jul 2015 06:53:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Cisco-ironport-mail-logs-How-can-I-do-a-transaction-on-a/m-p/164765#M46796</guid>
      <dc:creator>PierreE</dc:creator>
      <dc:date>2015-07-08T06:53:49Z</dc:date>
    </item>
    <item>
      <title>Re: [Cisco ironport mail logs] How can I do a transaction on a sometimes-multi-value field where a key field migrates values?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Cisco-ironport-mail-logs-How-can-I-do-a-transaction-on-a/m-p/164766#M46797</link>
      <description>&lt;P&gt;The following works for me, but I would like to automate this process somehow for a dashboard.  I don't think an automatic lookup would work if the MID is reused for later messages, but if there is a way to insert a pause (or delay) between the generation of the csv and running the search that would maybe be an option for running the two parts as one query. &lt;/P&gt;

&lt;P&gt;Run this before every search to create the updated csv:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=cisco sourcetype=cisco:esa:textmail source=/log/sources/ironport/ironport.log  vendor_action=mid_rewritten | rex field=_raw " Info: MID (?\d+) rewritten to MID (?\d+) by " | eval InitialMID = TempMID . "," . FinalMID | fields - TempMID | makemv delim="," InitialMID | mvexpand InitialMID | fields + InitialMID,FinalMID | fields - _raw,_time | outputlookup MID_lookup.csv  
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This is the search:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=cisco sourcetype=cisco:esa:textmail source=/log/sources/ironport/ironport.log | rex "^.*?MID\s+(?\d+)" | lookup MID_lookup.csv InitialMID OUTPUT FinalMID | transaction FinalMID
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Running the two searches together as I would like to do creates broken files with blank spaces and incomplete data since the csv isn't fully generated before the search runs.&lt;/P&gt;

&lt;P&gt;Thoughts?&lt;/P&gt;

&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Wed, 02 Sep 2015 16:43:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Cisco-ironport-mail-logs-How-can-I-do-a-transaction-on-a/m-p/164766#M46797</guid>
      <dc:creator>kcambron</dc:creator>
      <dc:date>2015-09-02T16:43:48Z</dc:date>
    </item>
  </channel>
</rss>

