<?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 cross reference 2 fields (or back reference)... in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-cross-reference-2-fields-or-back-reference/m-p/266579#M176387</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;Thanks for your try but that still isnt quite there.&lt;/P&gt;

&lt;P&gt;Simply put I think I need to add the vamAssetId field and value to each event that matches the specific jobId.&lt;/P&gt;

&lt;P&gt;I.e if there is one event with:&lt;/P&gt;

&lt;P&gt;jobId=527A63&lt;BR /&gt;
vamAssetId=815164&lt;/P&gt;

&lt;P&gt;I need every event with jobId=527A63 to have vamAssetId=815164 added to it. This seems like the simplest solution but I've run out of brain power to do it.&lt;/P&gt;</description>
    <pubDate>Mon, 24 Oct 2016 10:38:27 GMT</pubDate>
    <dc:creator>999chris</dc:creator>
    <dc:date>2016-10-24T10:38:27Z</dc:date>
    <item>
      <title>How to cross reference 2 fields (or back reference)...</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-cross-reference-2-fields-or-back-reference/m-p/266574#M176382</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;Here are a few log examples (I've just shown the fields extracted for simplicity):&lt;/P&gt;

&lt;P&gt;00:19:07 -&lt;BR /&gt;
jobId=527A63&lt;BR /&gt;
vamAssetId=815164&lt;/P&gt;

&lt;P&gt;00:37:15 -&lt;BR /&gt;
jobId=527A63&lt;BR /&gt;
status=encoding&lt;BR /&gt;
progress=20&lt;/P&gt;

&lt;P&gt;10:08:28 -&lt;BR /&gt;
jobId=EE7086&lt;BR /&gt;
vamAssetId=2359740&lt;/P&gt;

&lt;P&gt;10:08:37 -&lt;BR /&gt;
jobId=EE7086&lt;BR /&gt;
status=starting&lt;/P&gt;

&lt;P&gt;...&lt;/P&gt;

&lt;P&gt;So I'd like to present the statuses of each vamAssetId in a table - thus:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;|vamAssetId|status      |progress
|815164        |encoding|20
|2359740      |starting   |0
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Trouble is the "vamAssetId" fields are not referenced in the same events as a "status" or "progress". The vamAssetId is assigned a jobId early on and the jobId is the only common reference between the two.&lt;/P&gt;

&lt;P&gt;I have the current search query, but I cant finish off and display this information logically. Could you help please?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=ateme [search index=ateme vamAssetId=815164 | fields jobId]
| eval progress=if(status="complete",100,if(status="starting",0,progress))
| table jobId status progress
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 20 Oct 2016 09:44:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-cross-reference-2-fields-or-back-reference/m-p/266574#M176382</guid>
      <dc:creator>999chris</dc:creator>
      <dc:date>2016-10-20T09:44:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to cross reference 2 fields (or back reference)...</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-cross-reference-2-fields-or-back-reference/m-p/266575#M176383</link>
      <description>&lt;P&gt;Try this. &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=ateme | transaction jobId | eval progress=case(status="complete",100, status="starting",0, 1=1, progress) | table vamAssetId jobId status progress
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 20 Oct 2016 12:06:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-cross-reference-2-fields-or-back-reference/m-p/266575#M176383</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2016-10-20T12:06:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to cross reference 2 fields (or back reference)...</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-cross-reference-2-fields-or-back-reference/m-p/266576#M176384</link>
      <description>&lt;P&gt;Hi Rich,&lt;/P&gt;

&lt;P&gt;Thanks for your reply. But this is not matching any events.&lt;/P&gt;</description>
      <pubDate>Thu, 20 Oct 2016 12:19:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-cross-reference-2-fields-or-back-reference/m-p/266576#M176384</guid>
      <dc:creator>999chris</dc:creator>
      <dc:date>2016-10-20T12:19:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to cross reference 2 fields (or back reference)...</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-cross-reference-2-fields-or-back-reference/m-p/266577#M176385</link>
      <description>&lt;P&gt;Try this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=ateme | eventstats values(vamAssetId) as vamAssetId by jobid | eval progress=if(status="complete",100,if(status="starting",0,progress)) | stats latest(status) as status latest(progress) as progress by vamAssetId | fillnull
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;*&lt;STRONG&gt;&lt;EM&gt;OR&lt;/EM&gt;&lt;/STRONG&gt;*&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=ateme | eventstats values(vamAssetId) as vamAssetId by jobid | eval progress=if(status="complete",100,if(status="starting",0,progress)) | where isnotnull(status) OR isnotnull(progress) | table vamAssetId status progres
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 20 Oct 2016 12:52:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-cross-reference-2-fields-or-back-reference/m-p/266577#M176385</guid>
      <dc:creator>sundareshr</dc:creator>
      <dc:date>2016-10-20T12:52:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to cross reference 2 fields (or back reference)...</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-cross-reference-2-fields-or-back-reference/m-p/266578#M176386</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;Thanks for your try but that still isnt quite there.&lt;/P&gt;

&lt;P&gt;Simply put I think I need to add the vamAssetId field and value to each event that matches the specific jobId.&lt;/P&gt;

&lt;P&gt;I.e if there is one event with:&lt;/P&gt;

&lt;P&gt;jobId=527A63&lt;BR /&gt;
vamAssetId=815164&lt;/P&gt;

&lt;P&gt;I need every event with jobId=527A63 to have vamAssetId=815164 added to it. This seems like the simplest solution but I've run out of brain power to do it.&lt;/P&gt;</description>
      <pubDate>Thu, 20 Oct 2016 13:30:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-cross-reference-2-fields-or-back-reference/m-p/266578#M176386</guid>
      <dc:creator>999chris</dc:creator>
      <dc:date>2016-10-20T13:30:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to cross reference 2 fields (or back reference)...</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-cross-reference-2-fields-or-back-reference/m-p/266579#M176387</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;Thanks for your try but that still isnt quite there.&lt;/P&gt;

&lt;P&gt;Simply put I think I need to add the vamAssetId field and value to each event that matches the specific jobId.&lt;/P&gt;

&lt;P&gt;I.e if there is one event with:&lt;/P&gt;

&lt;P&gt;jobId=527A63&lt;BR /&gt;
vamAssetId=815164&lt;/P&gt;

&lt;P&gt;I need every event with jobId=527A63 to have vamAssetId=815164 added to it. This seems like the simplest solution but I've run out of brain power to do it.&lt;/P&gt;</description>
      <pubDate>Mon, 24 Oct 2016 10:38:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-cross-reference-2-fields-or-back-reference/m-p/266579#M176387</guid>
      <dc:creator>999chris</dc:creator>
      <dc:date>2016-10-24T10:38:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to cross reference 2 fields (or back reference)...</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-cross-reference-2-fields-or-back-reference/m-p/266580#M176388</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;index=ateme [search index=ateme vamAssetId=$asset_id$ | fields jobId] | transaction jobId maxspan=3d | stats first(status) as Status max(progress) as Progress by filename | eval Progress=case(Status="complete",100, status="starting",0, 1=1, Progress) | rename filename as Filename
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Was the modified version. This worked perfectly. Cheers&lt;/P&gt;</description>
      <pubDate>Mon, 24 Oct 2016 17:05:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-cross-reference-2-fields-or-back-reference/m-p/266580#M176388</guid>
      <dc:creator>999chris</dc:creator>
      <dc:date>2016-10-24T17:05:09Z</dc:date>
    </item>
  </channel>
</rss>

