<?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: Ingesting User Names in Splunk Enterprise</title>
    <link>https://community.splunk.com/t5/Splunk-Enterprise/Ingesting-User-Names/m-p/324207#M864</link>
    <description>&lt;P&gt;Brilliant! Thank you, was missing&lt;BR /&gt;
eval username="$env:user_realname$"     within the search macro. &lt;/P&gt;</description>
    <pubDate>Thu, 07 Dec 2017 18:46:14 GMT</pubDate>
    <dc:creator>biers04</dc:creator>
    <dc:date>2017-12-07T18:46:14Z</dc:date>
    <item>
      <title>Ingesting User Names</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/Ingesting-User-Names/m-p/324203#M860</link>
      <description>&lt;P&gt;I am currently creating a dashboard for users. &lt;/P&gt;

&lt;P&gt;index=mcafee AND Customer=Yes AND signature!="[New*" AND ("Executable_,Fingerprint"!="submit_hash_clean.csv" AND "file_name"!="submit_hash_clean.csv")&lt;BR /&gt;
| dedup "Workstation_,Name" &lt;BR /&gt;
| eval TIME=strftime(&lt;EM&gt;time,"%Y-%m-%d %H:%M")&lt;BR /&gt;
| stats earliest(TIME) count by "file_name", Executable&lt;/EM&gt;,Fingerprint&lt;BR /&gt;
| eventstats sum(count) AS total_host&lt;BR /&gt;
| where count&amp;lt;11&lt;BR /&gt;
| rename file_name AS "File Name", earliest(TIME) AS "First Seen", count AS Count&lt;BR /&gt;
| table "File Name", "Executable_,Fingerprint", Count, "Set As Clean"&lt;BR /&gt;
| eval "Set As Clean"="Clean"&lt;BR /&gt;
| sort - Count&lt;/P&gt;

&lt;P&gt;When a user Clicks "Clean" it auto runs a query that pushes the file hash and filename to a CSV so we no longer see the file name associated with that file hash. &lt;/P&gt;

&lt;P&gt;My problem comes in as I need non-repudiation. I am looking to push the current users name into the CSV, but I cannot figure out how to do so push the current user to a table. If I can get it to a table, I'll know how to push their name into the CSV.  Current command I am attempting to use is "$env:user_realname$" as it grabs the users name instead of login name. I'm not sure if making it a token or there is something I am missing here. &lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 17:06:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/Ingesting-User-Names/m-p/324203#M860</guid>
      <dc:creator>biers04</dc:creator>
      <dc:date>2020-09-29T17:06:33Z</dc:date>
    </item>
    <item>
      <title>Re: Ingesting User Names</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/Ingesting-User-Names/m-p/324204#M861</link>
      <description>&lt;P&gt;FYI to display usernames themselves it is &lt;/P&gt;&lt;H1&gt;$env:user_realname$&lt;/H1&gt; (don't need the h1 tag).  I just need a possible way to grab the h1 and push that to the csv as well.&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Dec 2017 17:40:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/Ingesting-User-Names/m-p/324204#M861</guid>
      <dc:creator>biers04</dc:creator>
      <dc:date>2017-12-07T17:40:44Z</dc:date>
    </item>
    <item>
      <title>Re: Ingesting User Names</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/Ingesting-User-Names/m-p/324205#M862</link>
      <description>&lt;P&gt;row panel html h1 id="User"&amp;gt;$env:user_realname$&lt;BR /&gt;&lt;BR /&gt;
Did not realize it would not display toe row panel html h1 tag - reinserted here without the &amp;lt;&amp;gt;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Dec 2017 17:41:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/Ingesting-User-Names/m-p/324205#M862</guid>
      <dc:creator>biers04</dc:creator>
      <dc:date>2017-12-07T17:41:54Z</dc:date>
    </item>
    <item>
      <title>Re: Ingesting User Names</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/Ingesting-User-Names/m-p/324206#M863</link>
      <description>&lt;P&gt;@biers04, int the drilldown &lt;CODE&gt;outputlookup&lt;/CODE&gt; command that pushes required file hash and filename to lookup CSV please add the following eval as well prior to the outputlookup command. This will add Real User Name as a new column in the lookup file&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;YourDrilldownQuery&amp;gt;
| eval username="$env:user_realname$"
| outputlookup &amp;lt;YourCSVFileName&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;PS: If for some reason this does not work, please post the current query being used in your drilldown. Also add some sample data to be pushed in the lookup file.&lt;/P&gt;

&lt;P&gt;Following is the run anywhere Simple XML dashboard with &lt;CODE&gt;username&lt;/CODE&gt; column displaying the full name of the logged in user using Splunk environment variable i.e. $env:user_realname$&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;dashboard&amp;gt;
  &amp;lt;label&amp;gt;Add User Name to Outputlookup&amp;lt;/label&amp;gt;
  &amp;lt;row&amp;gt;
    &amp;lt;panel&amp;gt;
      &amp;lt;table&amp;gt;
        &amp;lt;search&amp;gt;
          &amp;lt;query&amp;gt;| makeresults
| eval data="method=post, log_level=warn,action=purchase;method=get, log_level=info,action=inquiry;"
| makemv data delim=";"
| mvexpand data
| rename data as _raw
| KV
| eval username="$env:user_realname$"&amp;lt;/query&amp;gt;
          &amp;lt;earliest&amp;gt;-24h@h&amp;lt;/earliest&amp;gt;
          &amp;lt;latest&amp;gt;now&amp;lt;/latest&amp;gt;
          &amp;lt;sampleRatio&amp;gt;1&amp;lt;/sampleRatio&amp;gt;
        &amp;lt;/search&amp;gt;
        &amp;lt;option name="count"&amp;gt;20&amp;lt;/option&amp;gt;
        &amp;lt;option name="dataOverlayMode"&amp;gt;none&amp;lt;/option&amp;gt;
        &amp;lt;option name="drilldown"&amp;gt;none&amp;lt;/option&amp;gt;
        &amp;lt;option name="percentagesRow"&amp;gt;false&amp;lt;/option&amp;gt;
        &amp;lt;option name="rowNumbers"&amp;gt;false&amp;lt;/option&amp;gt;
        &amp;lt;option name="totalsRow"&amp;gt;false&amp;lt;/option&amp;gt;
        &amp;lt;option name="wrap"&amp;gt;true&amp;lt;/option&amp;gt;
      &amp;lt;/table&amp;gt;
    &amp;lt;/panel&amp;gt;
  &amp;lt;/row&amp;gt;
&amp;lt;/dashboard&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 07 Dec 2017 18:06:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/Ingesting-User-Names/m-p/324206#M863</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2017-12-07T18:06:54Z</dc:date>
    </item>
    <item>
      <title>Re: Ingesting User Names</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/Ingesting-User-Names/m-p/324207#M864</link>
      <description>&lt;P&gt;Brilliant! Thank you, was missing&lt;BR /&gt;
eval username="$env:user_realname$"     within the search macro. &lt;/P&gt;</description>
      <pubDate>Thu, 07 Dec 2017 18:46:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/Ingesting-User-Names/m-p/324207#M864</guid>
      <dc:creator>biers04</dc:creator>
      <dc:date>2017-12-07T18:46:14Z</dc:date>
    </item>
    <item>
      <title>Re: Ingesting User Names</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/Ingesting-User-Names/m-p/324208#M865</link>
      <description>&lt;P&gt;Actually, it appears that within the CSV, it returns just the literal string "$env:user_realname$"&lt;/P&gt;

&lt;P&gt;My drilldown query is as follows:&lt;/P&gt;

&lt;P&gt;| dedup "Executable_,Fingerprint"&lt;BR /&gt;
| head 1&lt;BR /&gt;
| fillnull value="NULL"&lt;BR /&gt;
| search NOT NULL&lt;BR /&gt;
| table "file_name", "Executable_,Fingerprint", "Username"&lt;BR /&gt;
| eval "Username"="$env:user_realname$"&lt;BR /&gt;
| outputlookup append="true" submit_hash_clean.csv&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 17:06:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/Ingesting-User-Names/m-p/324208#M865</guid>
      <dc:creator>biers04</dc:creator>
      <dc:date>2020-09-29T17:06:44Z</dc:date>
    </item>
  </channel>
</rss>

