<?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 Document Flow tracking over multiple sources. Linking unique field in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Document-Flow-tracking-over-multiple-sources-Linking-unique/m-p/606591#M210966</link>
    <description>&lt;P&gt;Beginner user here.&lt;/P&gt;&lt;P&gt;PART 1&lt;BR /&gt;Wanting to track documents over multiple sources to ensure they reach their destination&lt;BR /&gt;&lt;BR /&gt;Source 1 - Source 2 or 3 - Source 4&lt;BR /&gt;Start Point (Sent) - Middle Points (Accepted or Rejected) - End Point (Received)&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Each document has the following&lt;BR /&gt;ID = Unique to each document&lt;BR /&gt;DATE \ TIME STAMP = Says what time the document arrived to that point&lt;BR /&gt;DESCRIPTION = like a subject what the document contains&lt;BR /&gt;&lt;BR /&gt;All documents have a unique ID that is tracked on each source.&amp;nbsp;&lt;BR /&gt;I want to track this ID and ensure that it has gone from source 1 ,2 or 3 and arrived at 4. If for some reason its in 2 and not in 4 display that Doc ID in a table.&lt;BR /&gt;&lt;BR /&gt;PART 2 - I can probably work this one out myself after I know how to link everything.&lt;BR /&gt;After they are linked I would like to compare the time between when it was at source 1 to when it arrived at source 3.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 22 Jul 2022 04:44:20 GMT</pubDate>
    <dc:creator>MorphiusX</dc:creator>
    <dc:date>2022-07-22T04:44:20Z</dc:date>
    <item>
      <title>Document Flow tracking over multiple sources. Linking unique field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Document-Flow-tracking-over-multiple-sources-Linking-unique/m-p/606591#M210966</link>
      <description>&lt;P&gt;Beginner user here.&lt;/P&gt;&lt;P&gt;PART 1&lt;BR /&gt;Wanting to track documents over multiple sources to ensure they reach their destination&lt;BR /&gt;&lt;BR /&gt;Source 1 - Source 2 or 3 - Source 4&lt;BR /&gt;Start Point (Sent) - Middle Points (Accepted or Rejected) - End Point (Received)&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Each document has the following&lt;BR /&gt;ID = Unique to each document&lt;BR /&gt;DATE \ TIME STAMP = Says what time the document arrived to that point&lt;BR /&gt;DESCRIPTION = like a subject what the document contains&lt;BR /&gt;&lt;BR /&gt;All documents have a unique ID that is tracked on each source.&amp;nbsp;&lt;BR /&gt;I want to track this ID and ensure that it has gone from source 1 ,2 or 3 and arrived at 4. If for some reason its in 2 and not in 4 display that Doc ID in a table.&lt;BR /&gt;&lt;BR /&gt;PART 2 - I can probably work this one out myself after I know how to link everything.&lt;BR /&gt;After they are linked I would like to compare the time between when it was at source 1 to when it arrived at source 3.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 22 Jul 2022 04:44:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Document-Flow-tracking-over-multiple-sources-Linking-unique/m-p/606591#M210966</guid>
      <dc:creator>MorphiusX</dc:creator>
      <dc:date>2022-07-22T04:44:20Z</dc:date>
    </item>
    <item>
      <title>Re: Document Flow tracking over multiple sources. Linking unique field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Document-Flow-tracking-over-multiple-sources-Linking-unique/m-p/606596#M210967</link>
      <description>&lt;P&gt;Something like this: obviously you will have to put in the details of your indexes, sourcetypes, etc.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;&amp;lt;your index(es) and sourcetype(s)&amp;gt;
| eval time1=if(source is 1, _time, null())
| eval time2=if(source is 2, _time, null())
| eval time3=if(source is 3, _time, null())
| eval time4=if(source is 4, _time, null())
| stats values(time1) as time1 values(time2) as time2 values(time3) as time3 values(time4) as time4 values(description) as description by docID&lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 22 Jul 2022 06:27:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Document-Flow-tracking-over-multiple-sources-Linking-unique/m-p/606596#M210967</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2022-07-22T06:27:50Z</dc:date>
    </item>
    <item>
      <title>Re: Document Flow tracking over multiple sources. Linking unique field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Document-Flow-tracking-over-multiple-sources-Linking-unique/m-p/606604#M210968</link>
      <description>&lt;P&gt;You need something like this (a general idea - you have to tweak it to your situation)&lt;/P&gt;&lt;PRE&gt;ID=* ((index=src1 sourcetype=src1) OR (index=src2 sourcetype=src2) OR (index=src3 sourcetype=src3) OR (index=src4 sourcetype=src4))&lt;BR /&gt;| eval starttime=if(index=src1,_time,null())&lt;BR /&gt;| eval middletime=if(index=src2 OR index=src3,_time,null())&lt;BR /&gt;| eval endtime=if(index=src3,_time,null())&lt;BR /&gt;| stats values(starttime) AS starttime values(middletime) AS middletime values(endtime) AS endtime by ID&lt;/PRE&gt;&lt;P&gt;Now you should have a table listing timestamps when the doc with given ID was registered at each of waypoints - start, middle and end. You can easily filter out some of the results and get, for example, only those which have middle time but don't have endtime&lt;/P&gt;&lt;PRE&gt;| search middletime=* NOT endtime=*&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;And of course when you have those timestamps you can calculate the delay between various steps. For example&lt;/P&gt;&lt;PRE&gt;| eval start_to_end=endtime - starttime&lt;/PRE&gt;</description>
      <pubDate>Fri, 22 Jul 2022 07:34:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Document-Flow-tracking-over-multiple-sources-Linking-unique/m-p/606604#M210968</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2022-07-22T07:34:21Z</dc:date>
    </item>
    <item>
      <title>Re: Document Flow tracking over multiple sources. Linking unique field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Document-Flow-tracking-over-multiple-sources-Linking-unique/m-p/606784#M211007</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;Thanks for the help.&lt;BR /&gt;&lt;BR /&gt;With some troubleshooting, I was able to get it working. The one thing that messed me up was putting quotes around the source in the if statements.&lt;BR /&gt;&lt;BR /&gt;My final code is&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;ID=* index=ind ((source=start) OR (source=accept) OR (source=reject) OR (source=received))
| eval time1=if(source="start", _time, null())
| eval time2=if(source="accept", _time, null())
| eval time3=if(source="reject", _time, null())
| eval time4=if(source="received", _time, null())
| stats values(time1) AS time1 values(time2) AS time2 values(time3) AS time3 values(time4) AS time4 by ID&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 25 Jul 2022 04:26:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Document-Flow-tracking-over-multiple-sources-Linking-unique/m-p/606784#M211007</guid>
      <dc:creator>MorphiusX</dc:creator>
      <dc:date>2022-07-25T04:26:30Z</dc:date>
    </item>
  </channel>
</rss>

