<?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: not getting expected results from using multiple sourcetypes in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/not-getting-expected-results-from-using-multiple-sourcetypes/m-p/372317#M67569</link>
    <description>&lt;P&gt;Thank you so much for your immediate response, but its not giving the output as I expected.&lt;/P&gt;

&lt;P&gt;I don't want fill down the startime endtime projectname pid etc there as i have different time periods and status for same project and pid.&lt;/P&gt;

&lt;P&gt;Thank you&lt;/P&gt;</description>
    <pubDate>Thu, 30 Mar 2017 12:21:01 GMT</pubDate>
    <dc:creator>Laya123</dc:creator>
    <dc:date>2017-03-30T12:21:01Z</dc:date>
    <item>
      <title>not getting expected results from using multiple sourcetypes</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/not-getting-expected-results-from-using-multiple-sourcetypes/m-p/372314#M67566</link>
      <description>&lt;P&gt;Hi, &lt;BR /&gt;
I have a query which is giving the output from multiple sources. I am using stats values() but the output is not coming how I expected.&lt;/P&gt;

&lt;P&gt;I am getting output like below, Projectname and pid are same but there were different K_Satuts but all values of K_Status is showing in one cell, but I want each K_Status in separate row.&lt;/P&gt;

&lt;P&gt;starttime------------------------------------ endtime------------------------- ProjectName------------  Pid----------- sample ------------ K_Status &lt;BR /&gt;
Mar 23, 2017 10:41:13--------------Mar 23, 2017 10:41:16------------------ A---------------------- 1---------------- X ---------------- a2345fvwwe3&lt;BR /&gt;
--------------------------------------------------------------------------------------------------------------------------------------------------------------- xy2234vfs3344&lt;BR /&gt;
--------------------------------------------------------------------------------------------------------------------------------------------------------------- kjsdhe23434jhj&lt;/P&gt;

&lt;P&gt;I am expecting my output like below&lt;/P&gt;

&lt;P&gt;starttime                                    endtime                                     ProjectName                 pid            sample                    K_Status&lt;BR /&gt;
Mar 23, 2017 10:41:13          Mar 23, 2017 10:41:16                        A                               1                  X                         a2345fvwwe3&lt;BR /&gt;
Mar 23, 2017 10:41:15          Mar 23, 2017 10:41:21                        A                               1                  X                         xy2234vfs3344&lt;BR /&gt;
Mar 23, 2017 10:45:15          Mar 23, 2017 10:47:21                        A                               1                  X                         kjsdhe23434jhj&lt;/P&gt;

&lt;P&gt;Can anyone help me how to do this&lt;/P&gt;

&lt;P&gt;my Query:&lt;/P&gt;

&lt;P&gt;(index=iis sourcetype=iis host=A  cs_method="GET") OR&lt;BR /&gt;
    (index=th sourcetype=throt host=A) OR&lt;BR /&gt;
    (index=iis sourcetype=iis host=xyz cs_method=GET cs_uri_stem="&lt;EM&gt;mriweb.dll&lt;/EM&gt;" OR cs_uri_stem="&lt;EM&gt;auth_fail&lt;/EM&gt;") OR&lt;BR /&gt;
    (index=ibm sourcetype=ivw host=abc respondentID!=1 ) &lt;BR /&gt;
| rex field=respID ".&lt;EM&gt;.&lt;/EM&gt;_(?.&lt;EM&gt;)" &lt;BR /&gt;
| eval ProjectName=coalesce(ProjectName, project_name) &lt;BR /&gt;
| eval ProjectName= upper(ProjectName) &lt;BR /&gt;
| eval pid=coalesce(pid, pid1) &lt;BR /&gt;
| search ProjectName=&lt;/EM&gt; AND pid=*&lt;BR /&gt;&lt;BR /&gt;
| eval "ThIIS Status"=if((searchmatch("index=iis sourcetype=iis host=A cs_method=\"GET\"")), Description, null()) &lt;BR /&gt;
| eval "Thr Status"=if(searchmatch("index=th sourcetype=throt host=A"), T_status, null()) &lt;BR /&gt;
| eval "K_Status"=if(searchmatch("index=th sourcetype=throt host=A"), kid, null()) &lt;BR /&gt;
| eval "Reason Status"=if(searchmatch("index=iis sourcetype=iis host=xyz cs_method=GET"), Reason, null())&lt;BR /&gt;
| eval BT=if(isnull(kid), "B_Throt", Description)&lt;BR /&gt;
 |eval IIS_S=if(BT="B_Throt",sc_status+"-"+"B_Throt",Description)&lt;BR /&gt;
 | eval "IIS Status"=if(searchmatch("index=iis sourcetype=iis host=A cs_method=GET"), IIS_S, null()) &lt;BR /&gt;
| eval "S Status"=if(searchmatch("index=iis sourcetype=iis host=A cs_method=GET"), s, null())&lt;BR /&gt;
| eval "IVW Status"=if(searchmatch("index=ibm sourcetype=ivw host=ABC"), Queue, null())&lt;BR /&gt;
| stats min(_time) AS startTime max(_time) AS endTime values(&lt;EM&gt;Status&lt;/EM&gt;) AS &lt;EM&gt;Status&lt;/EM&gt; by ProjectName pid&lt;BR /&gt;
| eval startTime=strftime(startTime,"%b %d, %Y %T") &lt;BR /&gt;
| eval endTime=strftime(endTime,"%b %d, %Y %T") &lt;BR /&gt;
| sort _time &lt;BR /&gt;
| table startTime endTime ProjectName pid "S Status" K_Status "ThIIS Status" "Thr Status" "IIS Status" "IVW Status" "Reason Status"  &lt;/P&gt;

&lt;P&gt;Thanks in advance&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 13:20:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/not-getting-expected-results-from-using-multiple-sourcetypes/m-p/372314#M67566</guid>
      <dc:creator>Laya123</dc:creator>
      <dc:date>2020-09-29T13:20:33Z</dc:date>
    </item>
    <item>
      <title>Re: not getting expected results from using multiple sourcetypes</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/not-getting-expected-results-from-using-multiple-sourcetypes/m-p/372315#M67567</link>
      <description>&lt;P&gt;Try using &lt;CODE&gt;mvexpand&lt;/CODE&gt; to break the multi-value field into separate events.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | eval "K_Status"=if(searchmatch("index=th sourcetype=throt host=A"), kid, null()) 
| mvexpand K_Status
| filldown startTime, endTime, ProjectName, pid, "S Status"
| eval "Reason Status"=if(searchmatch("index=iis sourcetype=iis host=xyz cs_method=GET"), Reason, null())
...
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 24 Mar 2017 12:50:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/not-getting-expected-results-from-using-multiple-sourcetypes/m-p/372315#M67567</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2017-03-24T12:50:10Z</dc:date>
    </item>
    <item>
      <title>Re: not getting expected results from using multiple sourcetypes</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/not-getting-expected-results-from-using-multiple-sourcetypes/m-p/372316#M67568</link>
      <description>&lt;P&gt;Please repost your code, using the code button (101 010) to mark it, so that html-like items and asterisks are not read by the interface as formatting commands.&lt;/P&gt;</description>
      <pubDate>Fri, 24 Mar 2017 13:45:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/not-getting-expected-results-from-using-multiple-sourcetypes/m-p/372316#M67568</guid>
      <dc:creator>DalJeanis</dc:creator>
      <dc:date>2017-03-24T13:45:35Z</dc:date>
    </item>
    <item>
      <title>Re: not getting expected results from using multiple sourcetypes</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/not-getting-expected-results-from-using-multiple-sourcetypes/m-p/372317#M67569</link>
      <description>&lt;P&gt;Thank you so much for your immediate response, but its not giving the output as I expected.&lt;/P&gt;

&lt;P&gt;I don't want fill down the startime endtime projectname pid etc there as i have different time periods and status for same project and pid.&lt;/P&gt;

&lt;P&gt;Thank you&lt;/P&gt;</description>
      <pubDate>Thu, 30 Mar 2017 12:21:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/not-getting-expected-results-from-using-multiple-sourcetypes/m-p/372317#M67569</guid>
      <dc:creator>Laya123</dc:creator>
      <dc:date>2017-03-30T12:21:01Z</dc:date>
    </item>
    <item>
      <title>Re: not getting expected results from using multiple sourcetypes</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/not-getting-expected-results-from-using-multiple-sourcetypes/m-p/372318#M67570</link>
      <description>&lt;P&gt;Thank you, I reposted my question.&lt;/P&gt;</description>
      <pubDate>Thu, 30 Mar 2017 12:21:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/not-getting-expected-results-from-using-multiple-sourcetypes/m-p/372318#M67570</guid>
      <dc:creator>Laya123</dc:creator>
      <dc:date>2017-03-30T12:21:12Z</dc:date>
    </item>
  </channel>
</rss>

