<?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: Can you help me create a separate field called &amp;quot;customer&amp;quot; that contains the following values? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-create-a-separate-field-called-quot-customer/m-p/454942#M167574</link>
    <description>&lt;P&gt;i used like this , but its not working&lt;/P&gt;

&lt;P&gt;| stats values(eval(if(like(url,"%oauth%")))) AS OAUTH&lt;/P&gt;</description>
    <pubDate>Wed, 12 Sep 2018 11:28:45 GMT</pubDate>
    <dc:creator>Mohsin123</dc:creator>
    <dc:date>2018-09-12T11:28:45Z</dc:date>
    <item>
      <title>Can you help me create a separate field called "customer" that contains the following values?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-create-a-separate-field-called-quot-customer/m-p/454939#M167571</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;

&lt;P&gt;I was trying to group by together the field values .&lt;/P&gt;

&lt;P&gt;Example: i have a field called "url" that has such sort of data :&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;/customer/a1
/customer/b1
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Can you please help me figure out whether I can create a separate field called "customer" that contains the values :&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;/customer/a1   and   /customer/a2
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;purpose is: i am getting &amp;gt;100k results for the timechart for a 24 hours frame .&lt;/P&gt;

&lt;P&gt;And hence, data loading doesn't happen &lt;/P&gt;

&lt;P&gt;Can you please help ?&lt;/P&gt;</description>
      <pubDate>Wed, 12 Sep 2018 10:51:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-create-a-separate-field-called-quot-customer/m-p/454939#M167571</guid>
      <dc:creator>Mohsin123</dc:creator>
      <dc:date>2018-09-12T10:51:53Z</dc:date>
    </item>
    <item>
      <title>Re: Can you help me create a separate field called "customer" that contains the following values?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-create-a-separate-field-called-quot-customer/m-p/454940#M167572</link>
      <description>&lt;P&gt;Hi @Mohsin123,&lt;/P&gt;

&lt;P&gt;Can you please try this query?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt; your base search&amp;gt; | stats values(eval(if(url="/customer/a1" AND url="/customer/b1",user,null()))) AS customer
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 12 Sep 2018 11:11:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-create-a-separate-field-called-quot-customer/m-p/454940#M167572</guid>
      <dc:creator>harsmarvania57</dc:creator>
      <dc:date>2018-09-12T11:11:23Z</dc:date>
    </item>
    <item>
      <title>Re: Can you help me create a separate field called "customer" that contains the following values?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-create-a-separate-field-called-quot-customer/m-p/454941#M167573</link>
      <description>&lt;P&gt;Thank you so much ,&lt;BR /&gt;
but could you please tell me if i want to add like for the url values , then????&lt;BR /&gt;
because i have &amp;gt;10000 url values  in the url field &lt;/P&gt;</description>
      <pubDate>Wed, 12 Sep 2018 11:22:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-create-a-separate-field-called-quot-customer/m-p/454941#M167573</guid>
      <dc:creator>Mohsin123</dc:creator>
      <dc:date>2018-09-12T11:22:42Z</dc:date>
    </item>
    <item>
      <title>Re: Can you help me create a separate field called "customer" that contains the following values?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-create-a-separate-field-called-quot-customer/m-p/454942#M167574</link>
      <description>&lt;P&gt;i used like this , but its not working&lt;/P&gt;

&lt;P&gt;| stats values(eval(if(like(url,"%oauth%")))) AS OAUTH&lt;/P&gt;</description>
      <pubDate>Wed, 12 Sep 2018 11:28:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-create-a-separate-field-called-quot-customer/m-p/454942#M167574</guid>
      <dc:creator>Mohsin123</dc:creator>
      <dc:date>2018-09-12T11:28:45Z</dc:date>
    </item>
    <item>
      <title>Re: Can you help me create a separate field called "customer" that contains the following values?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-create-a-separate-field-called-quot-customer/m-p/454943#M167575</link>
      <description>&lt;P&gt;It should be like this &lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;| stats values(eval(if(like(url,"%oauth%"),user,null()))) AS OAUTH&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 12 Sep 2018 11:34:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-create-a-separate-field-called-quot-customer/m-p/454943#M167575</guid>
      <dc:creator>harsmarvania57</dc:creator>
      <dc:date>2018-09-12T11:34:01Z</dc:date>
    </item>
    <item>
      <title>Re: Can you help me create a separate field called "customer" that contains the following values?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-create-a-separate-field-called-quot-customer/m-p/454944#M167576</link>
      <description>&lt;P&gt;@harsmarvania57&lt;BR /&gt;&lt;BR /&gt;
This still doenst work&lt;BR /&gt;
| stats values(eval(if(like(url,"%oauth%"),user,null()))) AS OAUTH values(eval(if(like(url,"%well-known%"),user,null()))) AS WELL-KNOWN , values(eval(if(like(url,"%customer%"),user,null()))) AS CUSTOMER , values(eval(if(like(url,"%admin%"),user,null()))) AS ADMIN&lt;/P&gt;</description>
      <pubDate>Wed, 12 Sep 2018 12:29:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-create-a-separate-field-called-quot-customer/m-p/454944#M167576</guid>
      <dc:creator>Mohsin123</dc:creator>
      <dc:date>2018-09-12T12:29:17Z</dc:date>
    </item>
    <item>
      <title>Re: Can you help me create a separate field called "customer" that contains the following values?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-create-a-separate-field-called-quot-customer/m-p/454945#M167577</link>
      <description>&lt;P&gt;Can you please provide some sample data (Mask sensitive data) ? In your environment &lt;CODE&gt;url&lt;/CODE&gt; &amp;amp; &lt;CODE&gt;user&lt;/CODE&gt; fields are extracting automatically ? Also please provide your full splunk query.&lt;/P&gt;

&lt;P&gt;I have tested similar query on Windows event logs and it is working fine.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=wineventlog | stats values(eval(if(like(EventCode, "462%"),host,null()))) as macth_host by EventCode
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 12 Sep 2018 13:20:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-create-a-separate-field-called-quot-customer/m-p/454945#M167577</guid>
      <dc:creator>harsmarvania57</dc:creator>
      <dc:date>2018-09-12T13:20:39Z</dc:date>
    </item>
    <item>
      <title>Re: Can you help me create a separate field called "customer" that contains the following values?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-create-a-separate-field-called-quot-customer/m-p/454946#M167578</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/163905"&gt;@harsmarvania57&lt;/a&gt;&lt;BR /&gt;&lt;BR /&gt;
Hi Harsh ,&lt;BR /&gt;
Could you please tell me if i could timechart after a stats group by .&lt;BR /&gt;
below is my query :&lt;/P&gt;

&lt;P&gt;index=idxd sourcetype IN ("prhe_access", "prod")    | rex field=_raw "\"GET\ (?[^\"\?]+).*\ HTTP"  &lt;/P&gt;

&lt;P&gt;|  stats  values(eval(if(like(url,"%oauth%"),url,null()))) AS OAUTH values(eval(if(like(url,"%well-known%"),url,null()))) AS WELL-KNOWN , values(eval(if(like(url,"%customer%"),url,null()))) AS CUSTOMER , values(eval(if(like(url,"%admin%"),url,null()))) AS ADMIN&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 21:15:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-create-a-separate-field-called-quot-customer/m-p/454946#M167578</guid>
      <dc:creator>Mohsin123</dc:creator>
      <dc:date>2020-09-29T21:15:12Z</dc:date>
    </item>
    <item>
      <title>Re: Can you help me create a separate field called "customer" that contains the following values?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-create-a-separate-field-called-quot-customer/m-p/454947#M167579</link>
      <description>&lt;P&gt;For timechart you should have count or average (Or some digit values) to create chart over time range, in your query you are just fetching URL values and you can't create timechart on those values.&lt;/P&gt;</description>
      <pubDate>Fri, 14 Sep 2018 10:27:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-you-help-me-create-a-separate-field-called-quot-customer/m-p/454947#M167579</guid>
      <dc:creator>harsmarvania57</dc:creator>
      <dc:date>2018-09-14T10:27:51Z</dc:date>
    </item>
  </channel>
</rss>

