<?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: Splunk Search query to track the OS migration on the host in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-to-track-the-OS-migration-on-the-host/m-p/618586#M215006</link>
    <description>&lt;P&gt;Hi Gusello,&lt;/P&gt;&lt;P&gt;Thank you for the response,&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; I have tried a similar search query and got the same result. The challenge on the results are multivalue value fields with below format.&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;lastSeen -&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;OS&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;firstSeen&lt;/P&gt;&lt;DIV class=""&gt;26-10-2022 13:07:16&amp;nbsp; &amp;nbsp; &amp;nbsp; windows&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;26-10-2022 13:07:16&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;8/29/2022 1:52&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;linux&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;8/29/2022 1:52&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I am expecting the below results.&lt;BR /&gt;&lt;BR /&gt;hostname&amp;nbsp; &amp;nbsp; &amp;nbsp;os&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;firstSeen&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; lastSeen&lt;BR /&gt;&lt;BR /&gt;abcde&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; windows&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;25-08-2022&amp;nbsp; &amp;nbsp; &amp;nbsp;26-10-2022&lt;BR /&gt;&lt;BR /&gt;abcde&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Linux&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;26-10-2022&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;27-10-2022&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/DIV&gt;</description>
    <pubDate>Thu, 27 Oct 2022 14:30:55 GMT</pubDate>
    <dc:creator>srlakshm</dc:creator>
    <dc:date>2022-10-27T14:30:55Z</dc:date>
    <item>
      <title>How to search to track the OS migration on the host?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-to-track-the-OS-migration-on-the-host/m-p/618581#M215002</link>
      <description>&lt;P&gt;Hi folks,&lt;/P&gt;
&lt;P&gt;I need your support to build a search query to track the migration activity. We have a requirement to track the host which will be migrated from windows os to linux os. The search should visualize the movement of migration activity.&lt;/P&gt;
&lt;P&gt;I have two lookup files, one is windows os host details. Another one is linux os host . So I need to compare how many machines migrated from Windows to Linux over the time. (last 7 days).&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;| inputlookup windows.csv 
| fillnull value="windows" OS
| inputlookup linux.csv append=1
| fillnull value="linux" OS
| stats dc(OS) as count values(lastSeen) as LastSeen, values(FirstSeen) as Firstseen by hostname
| where count &amp;gt; 1
| mvexpand OS&lt;/LI-CODE&gt;
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;The above query doesn't show expect the result&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;I would really appreciate, if someone has any ideas or suggestions on this.&amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 28 Oct 2022 14:15:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-to-track-the-OS-migration-on-the-host/m-p/618581#M215002</guid>
      <dc:creator>srlakshm</dc:creator>
      <dc:date>2022-10-28T14:15:13Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk Search query to track the OS migration on the host</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-to-track-the-OS-migration-on-the-host/m-p/618584#M215004</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/248447"&gt;@srlakshm&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;inputlookup command cannot be in the middle of a search, only at the beginning of a search or a subsearch,&amp;nbsp;&lt;/P&gt;&lt;P&gt;so, please try something like this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| inputlookup windows.csv 
| fillnull value="windows" OS
| append [ | inputlookup linux.csv | fillnull value="linux" OS ]
| stats 
    dc(OS) as os_count 
    values(OS) AS OS
    values(lastSeen) as LastSeen, 
    values(FirstSeen) as Firstseen 
    BY hostname
| where os_count&amp;gt;1
| table hostname OS Firstseen LastSeen&lt;/LI-CODE&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Thu, 27 Oct 2022 14:17:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-to-track-the-OS-migration-on-the-host/m-p/618584#M215004</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2022-10-27T14:17:44Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk Search query to track the OS migration on the host</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-to-track-the-OS-migration-on-the-host/m-p/618585#M215005</link>
      <description>&lt;P&gt;What fields are in each lookup file?&amp;nbsp; What are the expected results?&amp;nbsp; What are the current results?&amp;nbsp; When a host is migrated to Linux are both lookup files updated?&lt;/P&gt;</description>
      <pubDate>Thu, 27 Oct 2022 14:19:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-to-track-the-OS-migration-on-the-host/m-p/618585#M215005</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2022-10-27T14:19:43Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk Search query to track the OS migration on the host</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-to-track-the-OS-migration-on-the-host/m-p/618586#M215006</link>
      <description>&lt;P&gt;Hi Gusello,&lt;/P&gt;&lt;P&gt;Thank you for the response,&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; I have tried a similar search query and got the same result. The challenge on the results are multivalue value fields with below format.&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;lastSeen -&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;OS&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;firstSeen&lt;/P&gt;&lt;DIV class=""&gt;26-10-2022 13:07:16&amp;nbsp; &amp;nbsp; &amp;nbsp; windows&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;26-10-2022 13:07:16&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;8/29/2022 1:52&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;linux&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;8/29/2022 1:52&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I am expecting the below results.&lt;BR /&gt;&lt;BR /&gt;hostname&amp;nbsp; &amp;nbsp; &amp;nbsp;os&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;firstSeen&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; lastSeen&lt;BR /&gt;&lt;BR /&gt;abcde&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; windows&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;25-08-2022&amp;nbsp; &amp;nbsp; &amp;nbsp;26-10-2022&lt;BR /&gt;&lt;BR /&gt;abcde&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Linux&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;26-10-2022&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;27-10-2022&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 27 Oct 2022 14:30:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-to-track-the-OS-migration-on-the-host/m-p/618586#M215006</guid>
      <dc:creator>srlakshm</dc:creator>
      <dc:date>2022-10-27T14:30:55Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk Search query to track the OS migration on the host</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-to-track-the-OS-migration-on-the-host/m-p/618587#M215007</link>
      <description>&lt;P&gt;Yes, The both lookup are updated every day at once, The lookup file contain these are the fields hostname, os, lastseen, firstseen&lt;/P&gt;</description>
      <pubDate>Thu, 27 Oct 2022 14:32:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-to-track-the-OS-migration-on-the-host/m-p/618587#M215007</guid>
      <dc:creator>srlakshm</dc:creator>
      <dc:date>2022-10-27T14:32:06Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk Search query to track the OS migration on the host</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-to-track-the-OS-migration-on-the-host/m-p/618606#M215014</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/248447"&gt;@srlakshm&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;in this case, you have to add OS to the BY clause:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| inputlookup windows.csv 
| fillnull value="windows" OS
| rename Firstseen AS win_Firstseen LastSeen AS win_LastSeen 
| append [ | inputlookup linux.csv | fillnull value="linux" OS | rename Firstseen AS x_Firstseen LastSeen AS x_LastSeen ]
| stats 
    dc(OS) as os_count 
    values(OS) AS OS
    values(win_lastSeen) as win_LastSeen, 
    values(win_FirstSeen) as win_Firstseen 
    values(x_lastSeen) as x_LastSeen, 
    values(x_FirstSeen) as x_Firstseen 
    BY hostname
| where os_count&amp;gt;1
| mvexpand OS
| eval LastSeen=coalesce(win_LastSeen,x_LastSeen), Firstseen=coalesce(win_Firstseen,x_Firstseen)
| table hostname OS Firstseen LastSeen&lt;/LI-CODE&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Thu, 27 Oct 2022 15:37:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-to-track-the-OS-migration-on-the-host/m-p/618606#M215014</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2022-10-27T15:37:08Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk Search query to track the OS migration on the host</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-to-track-the-OS-migration-on-the-host/m-p/618607#M215015</link>
      <description>&lt;P&gt;The &lt;FONT face="courier new,courier"&gt;inputlookup&lt;/FONT&gt; command can be used in the middle of a query if the append=true option is used (as the OP did).&lt;/P&gt;</description>
      <pubDate>Thu, 27 Oct 2022 15:41:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-to-track-the-OS-migration-on-the-host/m-p/618607#M215015</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2022-10-27T15:41:45Z</dc:date>
    </item>
    <item>
      <title>Re: Splunk Search query to track the OS migration on the host</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-search-to-track-the-OS-migration-on-the-host/m-p/618701#M215032</link>
      <description>&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; Thanks for the query, unfortunately the coalesce is not working as expected. The LastSeen and FirstSeen value is taking the first field value win_LastSeen for both OS.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Have observed the same issue previously as well. the coalesce command not working for lookup files as expected.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 28 Oct 2022 08:59:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-search-to-track-the-OS-migration-on-the-host/m-p/618701#M215032</guid>
      <dc:creator>srlakshm</dc:creator>
      <dc:date>2022-10-28T08:59:15Z</dc:date>
    </item>
  </channel>
</rss>

