<?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 return result for users whose name contain and do not contain underscore in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-return-result-for-users-whose-name-contain-and-do-not/m-p/129414#M35193</link>
    <description>&lt;P&gt;Remove the &lt;CODE&gt;timechart&lt;/CODE&gt; to be sure your issue is with the filtering.&lt;/P&gt;</description>
    <pubDate>Thu, 03 Jul 2014 07:52:13 GMT</pubDate>
    <dc:creator>martin_mueller</dc:creator>
    <dc:date>2014-07-03T07:52:13Z</dc:date>
    <item>
      <title>How to return result for users whose name contain and do not contain underscore</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-return-result-for-users-whose-name-contain-and-do-not/m-p/129409#M35188</link>
      <description>&lt;P&gt;My Splunk is 5.0.5.  I constructed a rex to extract user from free-hand logs.  In some logs, user is null.  This skews my results.  So I perform a search to filter out those null users.  After this, I combine user with another field, service to form a unique identifier UserService, then I timechart by UserService.  I know a particular user in a particular service has a specific pattern, so I am looking for a standout condition with this timechart.  However, I can never get a chart with all user-service combinations.  For all services, I can either get users whose name does not contain an underscore (&lt;CODE&gt;_&lt;/CODE&gt;) or users whose name does.  For a single service, I can get users both with and without &lt;CODE&gt;_&lt;/CODE&gt;.&lt;/P&gt;

&lt;P&gt;Here are tested combinations and outcomes:&lt;BR /&gt;
To make this even more mysterious, those results described as not containing users with &lt;CODE&gt;_&lt;/CODE&gt; actually contain users whose name are capital letters and &lt;CODE&gt;_&lt;/CODE&gt;.  So the actual outcome matrix is like:&lt;BR /&gt;
 1. Returns only users with no &lt;CODE&gt;_&lt;/CODE&gt; and all-caps + &lt;CODE&gt;_&lt;/CODE&gt; users: &lt;CODE&gt;&amp;lt;preliminary search=""&amp;gt; | rex "something (?&amp;lt;user&amp;gt;w+)" |search user="*" |eval UserService=user + "." + service |timechart count by UserService&lt;/CODE&gt;&lt;BR /&gt;
 2. Returns only users with no &lt;CODE&gt;_&lt;/CODE&gt; and all-caps + &lt;CODE&gt;_&lt;/CODE&gt; users: &lt;CODE&gt;&amp;lt;preliminary search&amp;gt; | rex "something (?&amp;lt;user&amp;gt;\w+)" |search user="*" OR user="*_*" |eval UserService=user + "." + service |timechart count by UserService&lt;/CODE&gt;&lt;BR /&gt;
 3. Returns only users with &lt;CODE&gt;_&lt;/CODE&gt;, including all-caps + &lt;CODE&gt;_&lt;/CODE&gt; users: &lt;CODE&gt;&amp;lt;preliminary search=""&amp;gt; | rex "something (?&amp;lt;user&amp;gt;w+)" |search user="_" |eval UserService=user + "." + service |timechart count by UserService&lt;/CODE&gt;&lt;BR /&gt;
 4. Returns users with and without &lt;CODE&gt;_&lt;/CODE&gt;, but only for a single service: &lt;CODE&gt;&amp;lt;preliminary search&amp;gt; | rex "something (?&amp;lt;user&amp;gt;\w+)" |search service="OneService" |eval UserService=user + "." + service |timechart count by UserService&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;How to get all combinations?&lt;/P&gt;</description>
      <pubDate>Wed, 02 Jul 2014 21:41:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-return-result-for-users-whose-name-contain-and-do-not/m-p/129409#M35188</guid>
      <dc:creator>yuanliu</dc:creator>
      <dc:date>2014-07-02T21:41:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to return result for users whose name contain and do not contain underscore</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-return-result-for-users-whose-name-contain-and-do-not/m-p/129410#M35189</link>
      <description>&lt;P&gt;To get rid of null value'd events you could use this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | where isnotnull(user) | ...
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 02 Jul 2014 21:55:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-return-result-for-users-whose-name-contain-and-do-not/m-p/129410#M35189</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2014-07-02T21:55:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to return result for users whose name contain and do not contain underscore</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-return-result-for-users-whose-name-contain-and-do-not/m-p/129411#M35190</link>
      <description>&lt;P&gt;Using &lt;CODE&gt;|where isnotnull(user) |&lt;/CODE&gt; gives the same result as &lt;CODE&gt;user=*&lt;/CODE&gt;, i.e., only users without &lt;CODE&gt;_&lt;/CODE&gt; and all-caps + &lt;CODE&gt;_&lt;/CODE&gt; users.&lt;/P&gt;</description>
      <pubDate>Wed, 02 Jul 2014 22:13:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-return-result-for-users-whose-name-contain-and-do-not/m-p/129411#M35190</guid>
      <dc:creator>yuanliu</dc:creator>
      <dc:date>2014-07-02T22:13:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to return result for users whose name contain and do not contain underscore</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-return-result-for-users-whose-name-contain-and-do-not/m-p/129412#M35191</link>
      <description>&lt;P&gt;Are you looking at the &lt;CODE&gt;timechart&lt;/CODE&gt; output or at the data after this filter?&lt;/P&gt;</description>
      <pubDate>Wed, 02 Jul 2014 22:16:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-return-result-for-users-whose-name-contain-and-do-not/m-p/129412#M35191</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2014-07-02T22:16:57Z</dc:date>
    </item>
    <item>
      <title>Re: How to return result for users whose name contain and do not contain underscore</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-return-result-for-users-whose-name-contain-and-do-not/m-p/129413#M35192</link>
      <description>&lt;P&gt;I'm looking at timechart output.   There could be some weirdness with timechart, so I set limit=1000 even though the result has fewer than 100 UserService values.  The distinct pattern that I'm looking at is that one_user.OneService gives hundreds of times bigger count than others combined.  So it is very easy to tell whether one_user results are included from timechart.&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 16:59:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-return-result-for-users-whose-name-contain-and-do-not/m-p/129413#M35192</guid>
      <dc:creator>yuanliu</dc:creator>
      <dc:date>2020-09-28T16:59:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to return result for users whose name contain and do not contain underscore</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-return-result-for-users-whose-name-contain-and-do-not/m-p/129414#M35193</link>
      <description>&lt;P&gt;Remove the &lt;CODE&gt;timechart&lt;/CODE&gt; to be sure your issue is with the filtering.&lt;/P&gt;</description>
      <pubDate>Thu, 03 Jul 2014 07:52:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-return-result-for-users-whose-name-contain-and-do-not/m-p/129414#M35193</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2014-07-03T07:52:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to return result for users whose name contain and do not contain underscore</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-return-result-for-users-whose-name-contain-and-do-not/m-p/129415#M35194</link>
      <description>&lt;P&gt;I'm not sure if part of your problem is the extraction of  the user field (which you have as one or more words... but you don't account for the missing underscore which I presume looks like Joan Jett, rather than Joan_Jett.  If you want all users regardless of case, space, underscore or number of words... it would be good if you could anchor on something that comes after... like "something\s+(?P&lt;USER&gt;\w*\s*)\s+NextThing" the * is greedy... so you need to make it stop by continuing to show the pattern that happens after... but once you do that you have all users including the null&lt;/USER&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 16:59:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-return-result-for-users-whose-name-contain-and-do-not/m-p/129415#M35194</guid>
      <dc:creator>rsennett_splunk</dc:creator>
      <dc:date>2020-09-28T16:59:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to return result for users whose name contain and do not contain underscore</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-return-result-for-users-whose-name-contain-and-do-not/m-p/129416#M35195</link>
      <description>&lt;P&gt;I'm with martin... I don't see exactly why you are extracting the users so that you don't get the whole thing, which my previous comment offers a suggestion to solve. However it's best to just check to see that you get your data, before you mess with whether it's timechart not able to display too many points.  replace timechart with stats to test.&lt;/P&gt;</description>
      <pubDate>Thu, 03 Jul 2014 08:23:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-return-result-for-users-whose-name-contain-and-do-not/m-p/129416#M35195</guid>
      <dc:creator>rsennett_splunk</dc:creator>
      <dc:date>2014-07-03T08:23:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to return result for users whose name contain and do not contain underscore</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-return-result-for-users-whose-name-contain-and-do-not/m-p/129417#M35196</link>
      <description>&lt;P&gt;Should've done this earlier.  So this is a limitation on timechart's graphic real estate.  That null user is just a red herring. (It may be due to some other issues in user extraction - unrelated to greediness.  Same problem ensues even with no null users.)  After comparing with stats, now I notice this notice at the bottom of timechart: "Search generated too much data for the current display configuration, results have been truncated."  Silly me - fewer than 1000 data points can be plotted, so even lower case, underscore, are all red herrings.  It just reflects the way timechart sort things.&lt;/P&gt;</description>
      <pubDate>Thu, 03 Jul 2014 17:16:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-return-result-for-users-whose-name-contain-and-do-not/m-p/129417#M35196</guid>
      <dc:creator>yuanliu</dc:creator>
      <dc:date>2014-07-03T17:16:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to return result for users whose name contain and do not contain underscore</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-return-result-for-users-whose-name-contain-and-do-not/m-p/129418#M35197</link>
      <description>&lt;P&gt;The problem is that timechart cut results off when too many data points are entered; the sorting procedure therein produced the artifact that lower case values, values with underscore, etc., be cut off first.  Thanks &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/172708"&gt;@martin_mueller&lt;/a&gt; and &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/155080"&gt;@rsennett_splunk&lt;/a&gt;!&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 16:59:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-return-result-for-users-whose-name-contain-and-do-not/m-p/129418#M35197</guid>
      <dc:creator>yuanliu</dc:creator>
      <dc:date>2020-09-28T16:59:32Z</dc:date>
    </item>
  </channel>
</rss>

