<?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: Require help to create query for table in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Require-help-to-create-query-for-table/m-p/538461#M152226</link>
    <description>&lt;P&gt;It is working with the sample data you provided, check this query:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults 
| eval _raw="_raw
Tue Feb 2 19:07:26 EST 2021 Host Id :19804 Host Name : abcd Host Status : Running App Id :3403927 Label Name : com.abc.mx.xyz Synchronization : In Sync State : Running Number of template version : 48
Tue Feb 2 19:07:26 EST 2021 Host Id :19804 Host Name : wxyz Host Status : Running App Id :27736 Label Name : com.abcde.abcdefgh Synchronization : Out of Sync State : Running Number of template version : 1
2021-02-03 02:12:49.896, APP_NAME=\"com.abc.mx.xyz\", APP_TEMP_NAME=\"com.abc.mx.xyz-1\", APP_TEMP_VER=\"1.1.5\", LASTDEPLOYED=\"2019-09-24 13:38:05.047\", ENV_NAME=\"ABCEnvironment_MY\"
2021-02-03 02:12:49.896, APP_NAME=\"com.abcde.abcdefgh\", APP_TEMP_NAME=\"com.abcde.abcdefgh\", APP_TEMP_VER=\"3.1.0.20201126030342320\", LASTDEPLOYED=\"2020-11-27 13:01:49.959\", ENV_NAME=\"ABCEnvironment_AU\"" 
| multikv forceheader=1 
| rex field=_raw "(?ms)Host\s+Name\s:\s(?&amp;lt;Host_Name&amp;gt;\w+)"
| rex field=_raw "(?ms)Label\s+Name\s:\s(?&amp;lt;App_Name&amp;gt;\w+\S+)"
| rex field=_raw "(?ms)APP_NAME=\"(?P&amp;lt;App_Name&amp;gt;[^\"]+)"
| rex field=_raw "(?ms)Synchronization\s:\s(?&amp;lt;Sync_State&amp;gt;[\w\s]+Sync)\sState"
| rex field=_raw "(?ms)LASTDEPLOYED=\"(?P&amp;lt;Last_Deployed&amp;gt;[^\"]+)"
| rex field=_raw "(?ms)APP_TEMP_VER=\"(?P&amp;lt;Temp_Version&amp;gt;[^\"]+)"
| rex field=_raw "(?ms)ENV_NAME=\"(?P&amp;lt;ENV_NAME&amp;gt;[^\"]+)" 
| fields App_Name, Sync_State, Last_Deployed, Temp_Version, ENV_NAME
| stats latest(*) as * by App_Name 
| search ENV_NAME="ABCEnvironment_AU"
| table App_Name, Sync_State,Last_Deployed, Temp_Version, ENV_NAME&lt;/LI-CODE&gt;</description>
    <pubDate>Wed, 03 Feb 2021 13:38:13 GMT</pubDate>
    <dc:creator>manjunathmeti</dc:creator>
    <dc:date>2021-02-03T13:38:13Z</dc:date>
    <item>
      <title>Require help to create query for table</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Require-help-to-create-query-for-table/m-p/538436#M152212</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;I have the below types of logs in in two different hosts in my index:&lt;/P&gt;&lt;P&gt;HOST= abc&lt;/P&gt;&lt;P&gt;log1:&amp;nbsp;&lt;SPAN class="t"&gt;Tue&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="t"&gt;Feb&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="t"&gt;2&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="t"&gt;19:07:26&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="t"&gt;EST&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="t"&gt;2021&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="t"&gt;Host&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="t"&gt;Id&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="t"&gt;:19804&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="t"&gt;Host&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="t"&gt;Name&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="t"&gt;:&lt;/SPAN&gt;&amp;nbsp;abcd&amp;nbsp;&lt;SPAN class="t"&gt;Host&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="t"&gt;Status&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="t"&gt;:&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="t"&gt;Running&lt;/SPAN&gt;&amp;nbsp;&lt;SPAN class="t"&gt;App&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="t"&gt;Id&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="t"&gt;:3403927&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="t"&gt;Label&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="t"&gt;Name&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="t"&gt;:&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="t"&gt;&lt;SPAN&gt;com.abc.mx.xyz&lt;/SPAN&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;SPAN class="t"&gt;Synchronization&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="t"&gt;:&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="t"&gt;In&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="t"&gt;Sync&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="t"&gt;State&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="t"&gt;:&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="t"&gt;Running&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="t"&gt;Number&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="t"&gt;of&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="t"&gt;template&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="t"&gt;version&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="t"&gt;:&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="t"&gt;48&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="t"&gt;log2:&amp;nbsp;&lt;SPAN class="t h"&gt;Tue&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;Feb 2 19:07:26 EST 2021 Host Id :19804 Host Name :&amp;nbsp;wxyz&amp;nbsp;Host Status : Running App Id :27736 Label Name :&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;com.abcde.abcdefgh&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;Synchronization : Out of Sync State : Running Number of template version :&lt;SPAN&gt;&amp;nbsp;1&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="t"&gt;&lt;SPAN&gt;HOST= xyz&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="t"&gt;&lt;SPAN&gt;log1:&amp;nbsp;2021-02-03 02:12:49.896, APP_NAME="com.abc.mx.xyz", APP_TEMP_NAME="com.abc.mx.xyz-1", APP_TEMP_VER="1.1.5", LASTDEPLOYED="2019-09-24 13:38:05.047", ENV_NAME="ABCEnvironment_MY"&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="t"&gt;&lt;SPAN&gt;log2:&amp;nbsp;&lt;SPAN class="t h"&gt;2021&lt;/SPAN&gt;-02-03 02:12:49.896, APP_NAME="com.abcde.abcdefgh", APP_TEMP_NAME="com.abcde.abcdefgh", APP_TEMP_VER="3.1.0.20201126030342320", LASTDEPLOYED="2020-11-27 13:01:49.959", ENV_NAME="ABCEnvironment_AU"&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="t"&gt;&lt;SPAN&gt;Here want to create a table as below with fields from both the hosts:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;SPAN class="t"&gt;App_Name&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; Sync_State&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Last_Deployed&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;Temp_Version&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="t"&gt;&lt;SPAN&gt;com.abc.mx.xyz&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;In Sync&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;2019-09-24 13:38:05.047&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;1.1.5&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="t"&gt;&lt;SPAN&gt;com.abcde.abcdefgh&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Out of Sync&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 2020-11-27 13:01:49.959&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;3.1.0.20201126030342320&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;and so on..&lt;/P&gt;&lt;P&gt;Using the below query I am able to get the table:&lt;/P&gt;&lt;P&gt;index=main host IN(abc,xyz)&lt;BR /&gt;| rex field=_raw "(?ms)Host\s+Name\s:\s(?&amp;lt;Host_Name&amp;gt;\w+)"&lt;BR /&gt;| rex field=_raw "(?ms)Label\s+Name\s:\s(?&amp;lt;App_Name&amp;gt;\w+\S+)"&lt;BR /&gt;| rex field=_raw "(?ms)APP_NAME=\"(?P&amp;lt;App_Name&amp;gt;[^\"]+)"&lt;BR /&gt;| rex field=_raw "(?ms)Synchronization\s:\s(?&amp;lt;Sync_State&amp;gt;[\w\s]+Sync)\sState"&lt;BR /&gt;| rex field=_raw "(?ms)LASTDEPLOYED=\"(?P&amp;lt;Last_Deployed&amp;gt;[^\"]+)"&lt;BR /&gt;| rex field=_raw "(?ms)APP_TEMP_VER=\"(?P&amp;lt;Temp_Version&amp;gt;[^\"]+)"&lt;BR /&gt;| stats values(Sync_State) as Sync_State latest(Last_Deployed) as Last_Deployed latest(Temp_Version) as Temp_Version by App_Name&lt;BR /&gt;| mvexpand Sync_State&lt;BR /&gt;| table App_Name,Sync_State,Last_Deployed,Temp_Version&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However when I try to minimize the search to a particular environment using the below query the "Sync_State" field goes blank.&lt;/P&gt;&lt;P&gt;index=main host IN(abc,xyz)&lt;BR /&gt;| rex field=_raw "(?ms)Host\s+Name\s:\s(?&amp;lt;Host_Name&amp;gt;\w+)"&lt;BR /&gt;| rex field=_raw "(?ms)Label\s+Name\s:\s(?&amp;lt;App_Name&amp;gt;\w+\S+)"&lt;BR /&gt;| rex field=_raw "(?ms)APP_NAME=\"(?P&amp;lt;App_Name&amp;gt;[^\"]+)"&lt;BR /&gt;| rex field=_raw "(?ms)Synchronization\s:\s(?&amp;lt;Sync_State&amp;gt;[\w\s]+Sync)\sState"&lt;BR /&gt;| rex field=_raw "(?ms)LASTDEPLOYED=\"(?P&amp;lt;Last_Deployed&amp;gt;[^\"]+)"&lt;BR /&gt;| rex field=_raw "(?ms)APP_TEMP_VER=\"(?P&amp;lt;Temp_Version&amp;gt;[^\"]+)"&lt;BR /&gt;| rex field=_raw "(?ms)ENV_NAME=\"(?P&amp;lt;ENV_NAME&amp;gt;[^\"]+)"&lt;BR /&gt;| search ENV_NAME=BPMEnvironment_SG&lt;BR /&gt;| stats values(Sync_State) as Sync_State latest(Last_Deployed) as Last_Deployed latest(Temp_Version) as Temp_Version by App_Name&lt;BR /&gt;| mvexpand Sync_State&lt;BR /&gt;| table App_Name,Sync_State,Last_Deployed,Temp_Version&lt;/P&gt;&lt;P&gt;Can someone please help me&amp;nbsp;&lt;SPAN&gt;edit the query to fulfill my expectation..&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Feb 2021 11:47:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Require-help-to-create-query-for-table/m-p/538436#M152212</guid>
      <dc:creator>Mrig342</dc:creator>
      <dc:date>2021-02-03T11:47:34Z</dc:date>
    </item>
    <item>
      <title>Re: Require help to create query for table</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Require-help-to-create-query-for-table/m-p/538440#M152215</link>
      <description>&lt;P&gt;One correction:&lt;/P&gt;&lt;P&gt;In the query use ABCEnvironment_MY instead of BPMEnvironment_SG&lt;/P&gt;</description>
      <pubDate>Wed, 03 Feb 2021 11:52:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Require-help-to-create-query-for-table/m-p/538440#M152215</guid>
      <dc:creator>Mrig342</dc:creator>
      <dc:date>2021-02-03T11:52:32Z</dc:date>
    </item>
    <item>
      <title>Re: Require help to create query for table</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Require-help-to-create-query-for-table/m-p/538446#M152216</link>
      <description>&lt;P&gt;hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/230871"&gt;@Mrig342&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Fields&amp;nbsp;&lt;SPAN&gt;&lt;STRONG&gt;ENV_NAME&lt;/STRONG&gt; and&amp;nbsp;&lt;STRONG&gt;Sync_State&lt;/STRONG&gt; are not there in the same log (OR same row after extracting fields).&amp;nbsp; So when you filter results on the field &lt;STRONG&gt;ENV_NAME&lt;/STRONG&gt;, the field&amp;nbsp;&lt;STRONG&gt;Sync_State&lt;/STRONG&gt; is gone. Just run without stats command and check.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=main host IN(abc,xyz)
| rex field=_raw "(?ms)Host\s+Name\s:\s(?&amp;lt;Host_Name&amp;gt;\w+)"
| rex field=_raw "(?ms)Label\s+Name\s:\s(?&amp;lt;App_Name&amp;gt;\w+\S+)"
| rex field=_raw "(?ms)APP_NAME=\"(?P&amp;lt;App_Name&amp;gt;[^\"]+)"
| rex field=_raw "(?ms)Synchronization\s:\s(?&amp;lt;Sync_State&amp;gt;[\w\s]+Sync)\sState"
| rex field=_raw "(?ms)LASTDEPLOYED=\"(?P&amp;lt;Last_Deployed&amp;gt;[^\"]+)"
| rex field=_raw "(?ms)APP_TEMP_VER=\"(?P&amp;lt;Temp_Version&amp;gt;[^\"]+)"
| rex field=_raw "(?ms)ENV_NAME=\"(?P&amp;lt;ENV_NAME&amp;gt;[^\"]+)"
| search ENV_NAME=BPMEnvironment_SG&lt;/LI-CODE&gt;&lt;P&gt;&lt;SPAN&gt;So, you need to filter the field&amp;nbsp;&lt;STRONG&gt;ENV_NAME&lt;/STRONG&gt; after the&amp;nbsp;&lt;STRONG&gt;stats&lt;/STRONG&gt; command.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=main host IN(abc,xyz)
| rex field=_raw "(?ms)Host\s+Name\s:\s(?&amp;lt;Host_Name&amp;gt;\w+)"
| rex field=_raw "(?ms)Label\s+Name\s:\s(?&amp;lt;App_Name&amp;gt;\w+\S+)"
| rex field=_raw "(?ms)APP_NAME=\"(?P&amp;lt;App_Name&amp;gt;[^\"]+)"
| rex field=_raw "(?ms)Synchronization\s:\s(?&amp;lt;Sync_State&amp;gt;[\w\s]+Sync)\sState"
| rex field=_raw "(?ms)LASTDEPLOYED=\"(?P&amp;lt;Last_Deployed&amp;gt;[^\"]+)"
| rex field=_raw "(?ms)APP_TEMP_VER=\"(?P&amp;lt;Temp_Version&amp;gt;[^\"]+)"
| rex field=_raw "(?ms)ENV_NAME=\"(?P&amp;lt;ENV_NAME&amp;gt;[^\"]+)" 
| fields App_Name, Sync_State, Last_Deployed, Temp_Version, ENV_NAME
| stats latest(*) as * by App_Name 
| search ENV_NAME= ABCEnvironment_MY
| table App_Name, Sync_State,Last_Deployed, Temp_Version&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If this reply helps you, an upvote/like would be appreciated.&lt;/P&gt;</description>
      <pubDate>Wed, 03 Feb 2021 12:24:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Require-help-to-create-query-for-table/m-p/538446#M152216</guid>
      <dc:creator>manjunathmeti</dc:creator>
      <dc:date>2021-02-03T12:24:26Z</dc:date>
    </item>
    <item>
      <title>Re: Require help to create query for table</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Require-help-to-create-query-for-table/m-p/538452#M152219</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;SPAN&gt;manjunathmeti,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thank you for your response..!!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The query is working only for ENV_NAME=ABCEnvironment_MY. While for other environments such as&amp;nbsp;ABCEnvironment_SG,ABCEnvironment_CN,ABCEnvironment_AU etc it shows as no results found.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Please suggest on this..&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thank you.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Feb 2021 12:59:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Require-help-to-create-query-for-table/m-p/538452#M152219</guid>
      <dc:creator>Mrig342</dc:creator>
      <dc:date>2021-02-03T12:59:29Z</dc:date>
    </item>
    <item>
      <title>Re: Require help to create query for table</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Require-help-to-create-query-for-table/m-p/538454#M152221</link>
      <description>&lt;P&gt;Remove&lt;STRONG&gt;&amp;nbsp;| search ENV_NAME="ABCEnvironment_MY"&lt;/STRONG&gt; from search query see ifENV_NAME contains other values.&lt;/P&gt;</description>
      <pubDate>Wed, 03 Feb 2021 13:05:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Require-help-to-create-query-for-table/m-p/538454#M152221</guid>
      <dc:creator>manjunathmeti</dc:creator>
      <dc:date>2021-02-03T13:05:10Z</dc:date>
    </item>
    <item>
      <title>Re: Require help to create query for table</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Require-help-to-create-query-for-table/m-p/538455#M152222</link>
      <description>&lt;P&gt;Yes&amp;nbsp;&lt;SPAN&gt;manjunathmeti,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;After removing&amp;nbsp;&lt;STRONG&gt;| search ENV_NAME= ABCEnvironment_MY&lt;/STRONG&gt;, I can see the values in &lt;STRONG&gt;ENV_NAME&lt;/STRONG&gt; field.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Please suggest.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Feb 2021 13:10:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Require-help-to-create-query-for-table/m-p/538455#M152222</guid>
      <dc:creator>Mrig342</dc:creator>
      <dc:date>2021-02-03T13:10:37Z</dc:date>
    </item>
    <item>
      <title>Re: Require help to create query for table</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Require-help-to-create-query-for-table/m-p/538461#M152226</link>
      <description>&lt;P&gt;It is working with the sample data you provided, check this query:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| makeresults 
| eval _raw="_raw
Tue Feb 2 19:07:26 EST 2021 Host Id :19804 Host Name : abcd Host Status : Running App Id :3403927 Label Name : com.abc.mx.xyz Synchronization : In Sync State : Running Number of template version : 48
Tue Feb 2 19:07:26 EST 2021 Host Id :19804 Host Name : wxyz Host Status : Running App Id :27736 Label Name : com.abcde.abcdefgh Synchronization : Out of Sync State : Running Number of template version : 1
2021-02-03 02:12:49.896, APP_NAME=\"com.abc.mx.xyz\", APP_TEMP_NAME=\"com.abc.mx.xyz-1\", APP_TEMP_VER=\"1.1.5\", LASTDEPLOYED=\"2019-09-24 13:38:05.047\", ENV_NAME=\"ABCEnvironment_MY\"
2021-02-03 02:12:49.896, APP_NAME=\"com.abcde.abcdefgh\", APP_TEMP_NAME=\"com.abcde.abcdefgh\", APP_TEMP_VER=\"3.1.0.20201126030342320\", LASTDEPLOYED=\"2020-11-27 13:01:49.959\", ENV_NAME=\"ABCEnvironment_AU\"" 
| multikv forceheader=1 
| rex field=_raw "(?ms)Host\s+Name\s:\s(?&amp;lt;Host_Name&amp;gt;\w+)"
| rex field=_raw "(?ms)Label\s+Name\s:\s(?&amp;lt;App_Name&amp;gt;\w+\S+)"
| rex field=_raw "(?ms)APP_NAME=\"(?P&amp;lt;App_Name&amp;gt;[^\"]+)"
| rex field=_raw "(?ms)Synchronization\s:\s(?&amp;lt;Sync_State&amp;gt;[\w\s]+Sync)\sState"
| rex field=_raw "(?ms)LASTDEPLOYED=\"(?P&amp;lt;Last_Deployed&amp;gt;[^\"]+)"
| rex field=_raw "(?ms)APP_TEMP_VER=\"(?P&amp;lt;Temp_Version&amp;gt;[^\"]+)"
| rex field=_raw "(?ms)ENV_NAME=\"(?P&amp;lt;ENV_NAME&amp;gt;[^\"]+)" 
| fields App_Name, Sync_State, Last_Deployed, Temp_Version, ENV_NAME
| stats latest(*) as * by App_Name 
| search ENV_NAME="ABCEnvironment_AU"
| table App_Name, Sync_State,Last_Deployed, Temp_Version, ENV_NAME&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 03 Feb 2021 13:38:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Require-help-to-create-query-for-table/m-p/538461#M152226</guid>
      <dc:creator>manjunathmeti</dc:creator>
      <dc:date>2021-02-03T13:38:13Z</dc:date>
    </item>
    <item>
      <title>Re: Require help to create query for table</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Require-help-to-create-query-for-table/m-p/538467#M152230</link>
      <description>&lt;P&gt;Hi manjunathmeti,&lt;/P&gt;&lt;P&gt;The query works fine for the sample logs that I provided. However I will be having thousands of such logs and it's not possible to add all those logs in the search query with eval command.&lt;/P&gt;&lt;P&gt;Please help me in creating the query to meet my expectations.&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;P&gt;NOTE: We have about 7 to 10 application in each environment. We are trying to create a table of the logs from the two hosts which will contain the App_Name,Sync_State,Last_Deployed and Temp_Version for each environment.&lt;/P&gt;</description>
      <pubDate>Wed, 03 Feb 2021 13:59:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Require-help-to-create-query-for-table/m-p/538467#M152230</guid>
      <dc:creator>Mrig342</dc:creator>
      <dc:date>2021-02-03T13:59:11Z</dc:date>
    </item>
    <item>
      <title>Re: Require help to create query for table</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Require-help-to-create-query-for-table/m-p/538469#M152232</link>
      <description>&lt;P&gt;Then, the below query should work for you:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| rex field=_raw "(?ms)Host\s+Name\s:\s(?&amp;lt;Host_Name&amp;gt;\w+)"
| rex field=_raw "(?ms)Label\s+Name\s:\s(?&amp;lt;App_Name&amp;gt;\w+\S+)"
| rex field=_raw "(?ms)APP_NAME=\"(?P&amp;lt;App_Name&amp;gt;[^\"]+)"
| rex field=_raw "(?ms)Synchronization\s:\s(?&amp;lt;Sync_State&amp;gt;[\w\s]+Sync)\sState"
| rex field=_raw "(?ms)LASTDEPLOYED=\"(?P&amp;lt;Last_Deployed&amp;gt;[^\"]+)"
| rex field=_raw "(?ms)APP_TEMP_VER=\"(?P&amp;lt;Temp_Version&amp;gt;[^\"]+)"
| rex field=_raw "(?ms)ENV_NAME=\"(?P&amp;lt;ENV_NAME&amp;gt;[^\"]+)" 
| fields App_Name, Sync_State, Last_Deployed, Temp_Version, ENV_NAME
| stats values(*) as * by App_Name&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 03 Feb 2021 14:10:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Require-help-to-create-query-for-table/m-p/538469#M152232</guid>
      <dc:creator>manjunathmeti</dc:creator>
      <dc:date>2021-02-03T14:10:12Z</dc:date>
    </item>
    <item>
      <title>Re: Require help to create query for table</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Require-help-to-create-query-for-table/m-p/538476#M152234</link>
      <description>&lt;P&gt;Thanks manjunathmeti..!!&lt;/P&gt;&lt;P&gt;But this query didn't work either. I am not getting the output as desired.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any other modification would be appreciated..!!&lt;/P&gt;</description>
      <pubDate>Wed, 03 Feb 2021 14:58:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Require-help-to-create-query-for-table/m-p/538476#M152234</guid>
      <dc:creator>Mrig342</dc:creator>
      <dc:date>2021-02-03T14:58:12Z</dc:date>
    </item>
  </channel>
</rss>

