<?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 How to replace join command with any other alternative command for the below query? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-replace-join-command-with-any-other-alternative-command/m-p/531807#M150218</link>
    <description>&lt;P&gt;index=105261-cli sourcetype=show_processes_cpu pid=0&lt;BR /&gt;| dedup deviceId&lt;BR /&gt;| fields deviceId, idle, fiveMinutes&lt;BR /&gt;| eval cpuLoad = round(if(isnull(fiveMinutes), 100-idle, fiveMinutes))&lt;BR /&gt;| join deviceId&lt;BR /&gt;[ search index=105261-np sourcetype=device_details&lt;BR /&gt;| fields deviceId, deviceName, productFamily, swVersion ]&lt;BR /&gt;| eval Status=if((cpuLoad &amp;lt;85 ), "OK" , "Not OK" )&lt;BR /&gt;| table deviceName, productFamily, cpuLoad, swVersion, Status&lt;BR /&gt;| sort - cpuLoad&lt;/P&gt;</description>
    <pubDate>Thu, 03 Dec 2020 04:52:47 GMT</pubDate>
    <dc:creator>pstalin_</dc:creator>
    <dc:date>2020-12-03T04:52:47Z</dc:date>
    <item>
      <title>How to replace join command with any other alternative command for the below query?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-replace-join-command-with-any-other-alternative-command/m-p/531807#M150218</link>
      <description>&lt;P&gt;index=105261-cli sourcetype=show_processes_cpu pid=0&lt;BR /&gt;| dedup deviceId&lt;BR /&gt;| fields deviceId, idle, fiveMinutes&lt;BR /&gt;| eval cpuLoad = round(if(isnull(fiveMinutes), 100-idle, fiveMinutes))&lt;BR /&gt;| join deviceId&lt;BR /&gt;[ search index=105261-np sourcetype=device_details&lt;BR /&gt;| fields deviceId, deviceName, productFamily, swVersion ]&lt;BR /&gt;| eval Status=if((cpuLoad &amp;lt;85 ), "OK" , "Not OK" )&lt;BR /&gt;| table deviceName, productFamily, cpuLoad, swVersion, Status&lt;BR /&gt;| sort - cpuLoad&lt;/P&gt;</description>
      <pubDate>Thu, 03 Dec 2020 04:52:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-replace-join-command-with-any-other-alternative-command/m-p/531807#M150218</guid>
      <dc:creator>pstalin_</dc:creator>
      <dc:date>2020-12-03T04:52:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to replace join command with any other alternative command for the below query?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-replace-join-command-with-any-other-alternative-command/m-p/531810#M150220</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/229380"&gt;@pstalin_&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This query might do the trick. I believe your dedup will in practice get the most recent event from the cli index for that device, hence the use of latest(*)&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;(index=105261-cli sourcetype=show_processes_cpu pid=0) OR (index=105261-np sourcetype=device_details)
| fields deviceId, idle, fiveMinutes deviceId, deviceName, productFamily, swVersion
| stats latest(*) as * by deviceId
| eval cpuLoad = round(if(isnull(fiveMinutes), 100-idle, fiveMinutes))
| eval Status=if((cpuLoad &amp;lt;85 ), "OK" , "Not OK" )
| table deviceName, productFamily, cpuLoad, swVersion, Status
| sort - cpuLoad&lt;/LI-CODE&gt;&lt;P&gt;but this&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;making the two combined searches&lt;/LI&gt;&lt;LI&gt;limiting fields to those needed from either search&lt;/LI&gt;&lt;LI&gt;using stats to 'join' the two data sets with latest(*) as * to handle all fields&lt;/LI&gt;&lt;LI&gt;then doing your post search calcs&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 03 Dec 2020 05:06:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-replace-join-command-with-any-other-alternative-command/m-p/531810#M150220</guid>
      <dc:creator>bowesmana</dc:creator>
      <dc:date>2020-12-03T05:06:50Z</dc:date>
    </item>
  </channel>
</rss>

