<?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: How to use custom key field in tstats? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-custom-key-field-in-tstats/m-p/657014#M226934</link>
    <description>&lt;P&gt;That's because at index time (when Splunk ingests data), fields like&amp;nbsp;&lt;SPAN&gt;UserKey_ABC.job1 doesn't exist. &amp;nbsp;They are extracted at search time by some mechanism, but do not exist in indexer.&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 07 Sep 2023 23:58:08 GMT</pubDate>
    <dc:creator>yuanliu</dc:creator>
    <dc:date>2023-09-07T23:58:08Z</dc:date>
    <item>
      <title>How to use custom key field in tstats?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-custom-key-field-in-tstats/m-p/657007#M226929</link>
      <description>&lt;DIV&gt;I'm having trouble capturing the custom key - "UserKey_ABC" in the following script. &amp;nbsp; With the following code, I'm not able to see any results. &amp;nbsp;However, if I remove "UserKey_ABC", I am able to get the results. &amp;nbsp;I'm certain I do have this key in my events. &amp;nbsp;How do I approach this issue?&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;| tstats count where index=abc &amp;nbsp;Arguments.email=“myemail@abc.com" by&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;device_build, Arguments.test_url, UserKey_ABC&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;| rename&amp;nbsp;&lt;SPAN&gt;UserKey_ABC&lt;/SPAN&gt;.Day as day,&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;SPAN&gt;UserKey_ABC&lt;/SPAN&gt;.job1 as job1,&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;SPAN&gt;UserKey_ABC&lt;/SPAN&gt;.Version as version,&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Arguments.test_url as test_url,&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;device_build as build&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;| table build, lib, day, job1, version, test_url&lt;/DIV&gt;</description>
      <pubDate>Thu, 07 Sep 2023 21:58:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-custom-key-field-in-tstats/m-p/657007#M226929</guid>
      <dc:creator>GaryZ</dc:creator>
      <dc:date>2023-09-07T21:58:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to use custom key field in tstats?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-custom-key-field-in-tstats/m-p/657011#M226931</link>
      <description>&lt;P&gt;&lt;A href="https://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Tstats" target="_blank" rel="noopener"&gt;tstats&lt;/A&gt;&amp;nbsp;only operates on indexed fields. &amp;nbsp;You can still use the fields in statistical functions. &amp;nbsp;So, you need to define how you want to see these values, and you cannot use them in groupby.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Sep 2023 23:36:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-custom-key-field-in-tstats/m-p/657011#M226931</guid>
      <dc:creator>yuanliu</dc:creator>
      <dc:date>2023-09-07T23:36:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to use custom key field in tstats?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-custom-key-field-in-tstats/m-p/657012#M226932</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/33901"&gt;@yuanliu&lt;/a&gt;&amp;nbsp;I'm fairly new to Splunk this year. &amp;nbsp; Can you explain what you mean? &amp;nbsp;- "&lt;SPAN&gt;You can still use the fields in statistical functions&lt;/SPAN&gt;"&lt;/P&gt;&lt;P&gt;I've tried&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;| tstats count where index=abc &amp;nbsp;Arguments.email=“myemail@abc.com" by&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;device_build, Arguments.test_url, UserKey_ABC.job1&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;DIV&gt;| rename&amp;nbsp;&lt;SPAN&gt;UserKey_ABC&lt;/SPAN&gt;.Day as day,&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;SPAN&gt;UserKey_ABC&lt;/SPAN&gt;.job1 as job1&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;But that didn't work for me either.&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Thu, 07 Sep 2023 23:52:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-custom-key-field-in-tstats/m-p/657012#M226932</guid>
      <dc:creator>GaryZ</dc:creator>
      <dc:date>2023-09-07T23:52:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to use custom key field in tstats?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-use-custom-key-field-in-tstats/m-p/657014#M226934</link>
      <description>&lt;P&gt;That's because at index time (when Splunk ingests data), fields like&amp;nbsp;&lt;SPAN&gt;UserKey_ABC.job1 doesn't exist. &amp;nbsp;They are extracted at search time by some mechanism, but do not exist in indexer.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Sep 2023 23:58:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-use-custom-key-field-in-tstats/m-p/657014#M226934</guid>
      <dc:creator>yuanliu</dc:creator>
      <dc:date>2023-09-07T23:58:08Z</dc:date>
    </item>
  </channel>
</rss>

