<?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 How can I generate a report of users and machine usage by machine name? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-generate-a-report-of-users-and-machine-usage-by/m-p/293840#M88716</link>
    <description>&lt;P&gt;I am looking at a log of users logging into machines. The two fields I am interested in are: Username and Machine name.&lt;/P&gt;

&lt;P&gt;What I am trying to get my report to look like is a list of usernames, with machine names and a count of the records per machine.&lt;BR /&gt;
Hoping for something like this...&lt;/P&gt;

&lt;P&gt;Bob Smith:&lt;BR /&gt;
     Machine 1 - 16 times&lt;BR /&gt;
     Machine 2 - 2 times&lt;BR /&gt;
     Machine 3 - 6 times&lt;BR /&gt;
Sam Jones:&lt;BR /&gt;
   Machine1 - 3 times&lt;BR /&gt;
   Machine2 - 1 time&lt;/P&gt;

&lt;P&gt;etc....&lt;/P&gt;

&lt;P&gt;Right now I have  stats count by Username, MachineName | sort - count&lt;BR /&gt;
And I am lost at this point as to how to change the query to format the way I need it..&lt;BR /&gt;
Thanks for your help!&lt;/P&gt;</description>
    <pubDate>Thu, 17 Aug 2017 21:20:43 GMT</pubDate>
    <dc:creator>jcftx7</dc:creator>
    <dc:date>2017-08-17T21:20:43Z</dc:date>
    <item>
      <title>How can I generate a report of users and machine usage by machine name?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-generate-a-report-of-users-and-machine-usage-by/m-p/293840#M88716</link>
      <description>&lt;P&gt;I am looking at a log of users logging into machines. The two fields I am interested in are: Username and Machine name.&lt;/P&gt;

&lt;P&gt;What I am trying to get my report to look like is a list of usernames, with machine names and a count of the records per machine.&lt;BR /&gt;
Hoping for something like this...&lt;/P&gt;

&lt;P&gt;Bob Smith:&lt;BR /&gt;
     Machine 1 - 16 times&lt;BR /&gt;
     Machine 2 - 2 times&lt;BR /&gt;
     Machine 3 - 6 times&lt;BR /&gt;
Sam Jones:&lt;BR /&gt;
   Machine1 - 3 times&lt;BR /&gt;
   Machine2 - 1 time&lt;/P&gt;

&lt;P&gt;etc....&lt;/P&gt;

&lt;P&gt;Right now I have  stats count by Username, MachineName | sort - count&lt;BR /&gt;
And I am lost at this point as to how to change the query to format the way I need it..&lt;BR /&gt;
Thanks for your help!&lt;/P&gt;</description>
      <pubDate>Thu, 17 Aug 2017 21:20:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-generate-a-report-of-users-and-machine-usage-by/m-p/293840#M88716</guid>
      <dc:creator>jcftx7</dc:creator>
      <dc:date>2017-08-17T21:20:43Z</dc:date>
    </item>
    <item>
      <title>Re: How can I generate a report of users and machine usage by machine name?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-generate-a-report-of-users-and-machine-usage-by/m-p/293841#M88717</link>
      <description>&lt;P&gt;So people will probably need a bit more information in order to answer this question. &lt;/P&gt;

&lt;P&gt;This means adding details like:&lt;BR /&gt;
1. windows or Linux or manufacture / appliance name&lt;BR /&gt;
2. a pasted login event from your logs&lt;BR /&gt;
3. your full search query syntax from start to finish&lt;/P&gt;

&lt;P&gt;I'm not sure which OS or Log Type your looking at to know if your seeing login events, or connection events, or file copy events or what. There's a whole slew of login types that we're just gonna overlook here to see if I can help get you something that can work.  &lt;/P&gt;

&lt;P&gt;Assuming you have a perfect log that clarly says 'host=blah user=blah action=Login' and all of those fields are extracted properly, or something of the sort, you could try this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;my_root_search_here&amp;gt; action=Login | stats count by UserName MachineName | sort - count
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;That should give you a table output.&lt;/P&gt;</description>
      <pubDate>Thu, 17 Aug 2017 21:45:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-generate-a-report-of-users-and-machine-usage-by/m-p/293841#M88717</guid>
      <dc:creator>tmarlette</dc:creator>
      <dc:date>2017-08-17T21:45:48Z</dc:date>
    </item>
  </channel>
</rss>

