<?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 do I collect the results of who/last on unix machines ? in Deployment Architecture</title>
    <link>https://community.splunk.com/t5/Deployment-Architecture/How-do-I-collect-the-results-of-who-last-on-unix-machines/m-p/308039#M11679</link>
    <description>&lt;P&gt;you need to make sure that the user running splunk forwarder has permission to &lt;STRONG&gt;all&lt;/STRONG&gt; the files in the /opt/splunkforwarder folder.&lt;BR /&gt;
In addition - that user also needs permission (root) to invoke last (any user can normally run who) &lt;/P&gt;

&lt;P&gt;When testing the scripts at the command line, you will need to ensure the user has similar access, otherwise you will see the errors in your post.&lt;/P&gt;

&lt;P&gt;Suggest you talk to your unix admins to confirm what permissions the processes have/need&lt;/P&gt;</description>
    <pubDate>Wed, 17 Jan 2018 17:51:21 GMT</pubDate>
    <dc:creator>nickhills</dc:creator>
    <dc:date>2018-01-17T17:51:21Z</dc:date>
    <item>
      <title>How do I collect the results of who/last on unix machines ?</title>
      <link>https://community.splunk.com/t5/Deployment-Architecture/How-do-I-collect-the-results-of-who-last-on-unix-machines/m-p/308027#M11667</link>
      <description>&lt;P&gt;Hi Team,&lt;/P&gt;

&lt;P&gt;Currently we are requested to set up a monitoring stanza to fetch the wtmpx/utmpx are data file  from the remote Solaris machines, similarly wtmp and btmp"  are the data files that needs to be monitored from remote linux machine.  &lt;/P&gt;

&lt;P&gt;wtmpx and utmpx - These two files present under /var/adm/ directory.&lt;BR /&gt;
wtmp and btmp - These two files present under /var/log/ directory.&lt;/P&gt;

&lt;P&gt;Problem Detail: &lt;/P&gt;

&lt;P&gt;Since these are the binary files when trying to monitor the file from splunk, I am getting the below WARN message in splunk. &lt;/P&gt;

&lt;P&gt;01-16-2018 08:06:47.560 -0500 WARN FileClassifierManager - The file '/var/adm/utmpx' is invalid. Reason: binary&lt;BR /&gt;
01-16-2018 08:06:46.560 -0500 WARN FileClassifierManager - The file '/var/adm/wtmpx' is invalid. Reason: binary&lt;/P&gt;

&lt;P&gt;Requirement : &lt;/P&gt;

&lt;P&gt;Need to monitor /var/adm/wtmpx - Binary files that need to be monitored via splunk.&lt;/P&gt;

&lt;P&gt;thanks in advance. &lt;/P&gt;</description>
      <pubDate>Tue, 16 Jan 2018 17:05:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Deployment-Architecture/How-do-I-collect-the-results-of-who-last-on-unix-machines/m-p/308027#M11667</guid>
      <dc:creator>Hemnaath</dc:creator>
      <dc:date>2018-01-16T17:05:31Z</dc:date>
    </item>
    <item>
      <title>Re: How do I collect the results of who/last on unix machines ?</title>
      <link>https://community.splunk.com/t5/Deployment-Architecture/How-do-I-collect-the-results-of-who-last-on-unix-machines/m-p/308028#M11668</link>
      <description>&lt;P&gt;Hello. &lt;BR /&gt;
Your easiest path is to install the Splunk_TA_nix app as it comes with scripted inputs for ‘who’ and ‘last’&lt;/P&gt;

&lt;P&gt;The scripts are in the bin folder and are called ‘who.sh’ and ‘lastlogin.sh’ &lt;/P&gt;

&lt;P&gt;Both of these will read the contents of the binary files and output them in a readable format. &lt;/P&gt;

&lt;P&gt;If you use the mechanism from the TA the events will be extracted automatically for you, or you can use the scripts as a starting point for writing your own scripted input. &lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 17:43:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Deployment-Architecture/How-do-I-collect-the-results-of-who-last-on-unix-machines/m-p/308028#M11668</guid>
      <dc:creator>nickhills</dc:creator>
      <dc:date>2020-09-29T17:43:57Z</dc:date>
    </item>
    <item>
      <title>Re: How do I collect the results of who/last on unix machines ?</title>
      <link>https://community.splunk.com/t5/Deployment-Architecture/How-do-I-collect-the-results-of-who-last-on-unix-machines/m-p/308029#M11669</link>
      <description>&lt;P&gt;Hey I have downloaded the Splunk_TA_nix add on from the splunk base and I have copy/pasted the who.sh and lastlogin.sh in to bin folder of my own app called test-ta-nix and also copy pasted the scripted inputs details in the inputs.conf in the same app. &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;# Shows current user sessions
[script://./bin/who.sh]
sourcetype = who
source = who
interval = 150
index = nix
disabled = 0

# Shows last login time for users who have ever logged in
[script://./bin/lastlog.sh]
sourcetype = lastlog
source = lastlog
interval = 300
index = nix
disabled = 0 


 [monitor:///var/adm]
 whitelist=(\.log|log$|wtmpx|utmpx|message)
 index=nix
 disable=0

  [monitor:///var/log]
 whitelist=(\.log|log$|secure|message|auth|wtmp|btmp|cron$|\.out)
 blacklist=(lastlog)
 index=nix
 disable=0
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Kindly let me know whether I can use the above stanza to  fetch the required binary details in to splunk. &lt;/P&gt;

&lt;P&gt;thanks in advance. &lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 17:40:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Deployment-Architecture/How-do-I-collect-the-results-of-who-last-on-unix-machines/m-p/308029#M11669</guid>
      <dc:creator>Hemnaath</dc:creator>
      <dc:date>2020-09-29T17:40:37Z</dc:date>
    </item>
    <item>
      <title>Re: How do I collect the results of who/last on unix machines ?</title>
      <link>https://community.splunk.com/t5/Deployment-Architecture/How-do-I-collect-the-results-of-who-last-on-unix-machines/m-p/308030#M11670</link>
      <description>&lt;P&gt;Hi Nickhill, I tried the below inputs.conf stanza in a test machine to pull the binary data from the Solaris machine  but it did not fetching any data from that node.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; # Shows current user sessions
 [script://./bin/who.sh]
 sourcetype = who
 source = who
 interval = 150
 index = nix
 disabled = 0

 # Shows last login time for users who have ever logged in
 [script://./bin/lastlog.sh]
 sourcetype = lastlog
 source = lastlog
 interval = 300
 index = nix
 disabled = 0 


[monitor:///var/adm/wtmpx]
index = nix
disabled = 0 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Kindly guide me on this. &lt;/P&gt;</description>
      <pubDate>Wed, 17 Jan 2018 14:34:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Deployment-Architecture/How-do-I-collect-the-results-of-who-last-on-unix-machines/m-p/308030#M11670</guid>
      <dc:creator>Hemnaath</dc:creator>
      <dc:date>2018-01-17T14:34:46Z</dc:date>
    </item>
    <item>
      <title>Re: How do I collect the results of who/last on unix machines ?</title>
      <link>https://community.splunk.com/t5/Deployment-Architecture/How-do-I-collect-the-results-of-who-last-on-unix-machines/m-p/308031#M11671</link>
      <description>&lt;P&gt;Hi All, Can any one guide me on the scripted inputs to pull the who and last data in to splunk. &lt;BR /&gt;
thanks in advance.  &lt;/P&gt;</description>
      <pubDate>Wed, 17 Jan 2018 14:54:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Deployment-Architecture/How-do-I-collect-the-results-of-who-last-on-unix-machines/m-p/308031#M11671</guid>
      <dc:creator>Hemnaath</dc:creator>
      <dc:date>2018-01-17T14:54:02Z</dc:date>
    </item>
    <item>
      <title>Re: How do I collect the results of who/last on unix machines ?</title>
      <link>https://community.splunk.com/t5/Deployment-Architecture/How-do-I-collect-the-results-of-who-last-on-unix-machines/m-p/308032#M11672</link>
      <description>&lt;P&gt;have you tried running the scripts on the command line?&lt;BR /&gt;
They should provide formatted output if you just execute them with ./xxx.sh&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jan 2018 14:58:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Deployment-Architecture/How-do-I-collect-the-results-of-who-last-on-unix-machines/m-p/308032#M11672</guid>
      <dc:creator>nickhills</dc:creator>
      <dc:date>2018-01-17T14:58:42Z</dc:date>
    </item>
    <item>
      <title>Re: How do I collect the results of who/last on unix machines ?</title>
      <link>https://community.splunk.com/t5/Deployment-Architecture/How-do-I-collect-the-results-of-who-last-on-unix-machines/m-p/308033#M11673</link>
      <description>&lt;P&gt;No, I haven't tried executing the script in the remote Solaris node, so you mean to execute the &lt;/P&gt;

&lt;P&gt;./who.sh  but from which path or a directory we need to execute the  script.   &lt;/P&gt;</description>
      <pubDate>Wed, 17 Jan 2018 15:03:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Deployment-Architecture/How-do-I-collect-the-results-of-who-last-on-unix-machines/m-p/308033#M11673</guid>
      <dc:creator>Hemnaath</dc:creator>
      <dc:date>2018-01-17T15:03:03Z</dc:date>
    </item>
    <item>
      <title>Re: How do I collect the results of who/last on unix machines ?</title>
      <link>https://community.splunk.com/t5/Deployment-Architecture/How-do-I-collect-the-results-of-who-last-on-unix-machines/m-p/308034#M11674</link>
      <description>&lt;P&gt;from the path that the script is in&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jan 2018 15:05:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Deployment-Architecture/How-do-I-collect-the-results-of-who-last-on-unix-machines/m-p/308034#M11674</guid>
      <dc:creator>nickhills</dc:creator>
      <dc:date>2018-01-17T15:05:10Z</dc:date>
    </item>
    <item>
      <title>Re: How do I collect the results of who/last on unix machines ?</title>
      <link>https://community.splunk.com/t5/Deployment-Architecture/How-do-I-collect-the-results-of-who-last-on-unix-machines/m-p/308035#M11675</link>
      <description>&lt;P&gt;okay let me try to execute the ./who.sh on the remote machine under this path &lt;/P&gt;

&lt;P&gt;/opt/splunkforwarder/etc/test-ia-unix/bin&lt;BR /&gt;
./who.sh  &lt;/P&gt;

&lt;P&gt;it should fetch some out put is that correct!&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jan 2018 15:09:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Deployment-Architecture/How-do-I-collect-the-results-of-who-last-on-unix-machines/m-p/308035#M11675</guid>
      <dc:creator>Hemnaath</dc:creator>
      <dc:date>2018-01-17T15:09:45Z</dc:date>
    </item>
    <item>
      <title>Re: How do I collect the results of who/last on unix machines ?</title>
      <link>https://community.splunk.com/t5/Deployment-Architecture/How-do-I-collect-the-results-of-who-last-on-unix-machines/m-p/308036#M11676</link>
      <description>&lt;P&gt;that is correct&lt;BR /&gt;
(if the scripts work)&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jan 2018 15:27:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Deployment-Architecture/How-do-I-collect-the-results-of-who-last-on-unix-machines/m-p/308036#M11676</guid>
      <dc:creator>nickhills</dc:creator>
      <dc:date>2018-01-17T15:27:16Z</dc:date>
    </item>
    <item>
      <title>Re: How do I collect the results of who/last on unix machines ?</title>
      <link>https://community.splunk.com/t5/Deployment-Architecture/How-do-I-collect-the-results-of-who-last-on-unix-machines/m-p/308037#M11677</link>
      <description>&lt;P&gt;Hey I dn't have an access to the remote test node,  i had just copy pasted  who.sh and lastlog.sh  from the splunk add-on directly not changed their content.  So could please let me know whether the below inputs.conf stanza are right. &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;# Shows current user sessions
  [script://./bin/who.sh]
  sourcetype = who
  source = who
  interval = 150
  index = nix
  disabled = 0

  # Shows last login time for users who have ever logged in
  [script://./bin/lastlog.sh]
  sourcetype = lastlog
  source = lastlog
  interval = 300
  index = nix
  disabled = 0 


 [monitor:///var/adm/wtmpx]
 index = nix
 disabled = 0 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I am checking with unix admin to test the same. meanwhile could you please let me know whether the above inputs.conf is correct. &lt;/P&gt;</description>
      <pubDate>Wed, 17 Jan 2018 15:27:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Deployment-Architecture/How-do-I-collect-the-results-of-who-last-on-unix-machines/m-p/308037#M11677</guid>
      <dc:creator>Hemnaath</dc:creator>
      <dc:date>2018-01-17T15:27:39Z</dc:date>
    </item>
    <item>
      <title>Re: How do I collect the results of who/last on unix machines ?</title>
      <link>https://community.splunk.com/t5/Deployment-Architecture/How-do-I-collect-the-results-of-who-last-on-unix-machines/m-p/308038#M11678</link>
      <description>&lt;P&gt;hey we are getting permission denied issue while executing the ./who.sh  on the remote node. &lt;/P&gt;

&lt;P&gt;/opt/splunkforwarder&lt;BR /&gt;
bash-3.2$ cd etc/apps/test-ta-nix/bin&lt;BR /&gt;
bash: cd: etc/apps/test-ta-nix/bin: Permission denied &lt;/P&gt;

&lt;P&gt;I could see this error in splunkd.log &lt;/P&gt;

&lt;P&gt;01-17-2018&amp;nbsp;11:55:19.134&amp;nbsp;-0500&amp;nbsp;ERROR&amp;nbsp;ExecProcessor&amp;nbsp;-&amp;nbsp;message&amp;nbsp;from&amp;nbsp;"/opt/splunkforwarder/etc/apps/test-ta-nix/bin/who.sh"&amp;nbsp;/bin/sh:&amp;nbsp;/opt/splunkforwarder/etc/apps/test-ta-nix/bin/who.sh:&amp;nbsp;cannot&amp;nbsp;execute &lt;/P&gt;</description>
      <pubDate>Wed, 17 Jan 2018 17:08:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Deployment-Architecture/How-do-I-collect-the-results-of-who-last-on-unix-machines/m-p/308038#M11678</guid>
      <dc:creator>Hemnaath</dc:creator>
      <dc:date>2018-01-17T17:08:37Z</dc:date>
    </item>
    <item>
      <title>Re: How do I collect the results of who/last on unix machines ?</title>
      <link>https://community.splunk.com/t5/Deployment-Architecture/How-do-I-collect-the-results-of-who-last-on-unix-machines/m-p/308039#M11679</link>
      <description>&lt;P&gt;you need to make sure that the user running splunk forwarder has permission to &lt;STRONG&gt;all&lt;/STRONG&gt; the files in the /opt/splunkforwarder folder.&lt;BR /&gt;
In addition - that user also needs permission (root) to invoke last (any user can normally run who) &lt;/P&gt;

&lt;P&gt;When testing the scripts at the command line, you will need to ensure the user has similar access, otherwise you will see the errors in your post.&lt;/P&gt;

&lt;P&gt;Suggest you talk to your unix admins to confirm what permissions the processes have/need&lt;/P&gt;</description>
      <pubDate>Wed, 17 Jan 2018 17:51:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Deployment-Architecture/How-do-I-collect-the-results-of-who-last-on-unix-machines/m-p/308039#M11679</guid>
      <dc:creator>nickhills</dc:creator>
      <dc:date>2018-01-17T17:51:21Z</dc:date>
    </item>
    <item>
      <title>Re: How do I collect the results of who/last on unix machines ?</title>
      <link>https://community.splunk.com/t5/Deployment-Architecture/How-do-I-collect-the-results-of-who-last-on-unix-machines/m-p/308040#M11680</link>
      <description>&lt;P&gt;@hemnaath&lt;/P&gt;

&lt;P&gt;Did the answer and the comments help you figure out the answer? If it did, please click accept on the answer.&lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 06 Feb 2018 21:37:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Deployment-Architecture/How-do-I-collect-the-results-of-who-last-on-unix-machines/m-p/308040#M11680</guid>
      <dc:creator>Anam</dc:creator>
      <dc:date>2018-02-06T21:37:08Z</dc:date>
    </item>
    <item>
      <title>Re: How do I collect the results of who/last on unix machines ?</title>
      <link>https://community.splunk.com/t5/Deployment-Architecture/How-do-I-collect-the-results-of-who-last-on-unix-machines/m-p/308041#M11681</link>
      <description>&lt;P&gt;Hi asiddique, it did not fetch the data from the wtmpx file though I had given the complete permission to execute the commands.&lt;/P&gt;

&lt;P&gt;Permission Details:&lt;/P&gt;

&lt;P&gt;-rwxrwxr-x 1 splunk splunk  2789 Jan 25 06:52 who.sh&lt;/P&gt;

&lt;P&gt;-rwxrwxr-x 1 splunk splunk  2835 Jan 25 06:52 lastlog.sh&lt;/P&gt;

&lt;P&gt;-rwxrwxr-x 1 splunk splunk  3091 Jan 25 06:52 common.sh&lt;/P&gt;

&lt;P&gt;But still unable to read the binary file from /var/adm/wtmpx , so kindly guide me to enable log monitoring.&lt;/P&gt;

&lt;P&gt;thanks in  advance. &lt;/P&gt;</description>
      <pubDate>Wed, 07 Feb 2018 11:18:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Deployment-Architecture/How-do-I-collect-the-results-of-who-last-on-unix-machines/m-p/308041#M11681</guid>
      <dc:creator>Hemnaath</dc:creator>
      <dc:date>2018-02-07T11:18:36Z</dc:date>
    </item>
    <item>
      <title>Re: How do I collect the results of who/last on unix machines ?</title>
      <link>https://community.splunk.com/t5/Deployment-Architecture/How-do-I-collect-the-results-of-who-last-on-unix-machines/m-p/308042#M11682</link>
      <description>&lt;P&gt;I was able to achieve this by editing the lastlog.sh script that came with the splunk app.    Find the if statement that pertains to the OS you are using.   in the CMD variable add sudo to it.     now edit the sudoers rules list to add a rule to allow splunk user to run the command.  &lt;/P&gt;</description>
      <pubDate>Fri, 17 Aug 2018 19:02:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Deployment-Architecture/How-do-I-collect-the-results-of-who-last-on-unix-machines/m-p/308042#M11682</guid>
      <dc:creator>dchapin</dc:creator>
      <dc:date>2018-08-17T19:02:09Z</dc:date>
    </item>
    <item>
      <title>Re: How do I collect the results of who/last on unix machines ?</title>
      <link>https://community.splunk.com/t5/Deployment-Architecture/How-do-I-collect-the-results-of-who-last-on-unix-machines/m-p/308043#M11683</link>
      <description>&lt;P&gt;hey dchapin,  i had an different issue all together and had fixed it after validating that there were two apps with the same input configuration, executing the lastlog.sh script. &lt;/P&gt;

&lt;P&gt;Example : one app with ( Bin and script ) folder and another app was with out bin folder, was taking precedence and as the bin folder was not present there was no data in the indexer and the &lt;STRONG&gt;/splunk inputs status&lt;/STRONG&gt; resulted with the script exited with code 1&lt;/P&gt;

&lt;P&gt;thanks. &lt;/P&gt;</description>
      <pubDate>Fri, 24 Aug 2018 09:58:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Deployment-Architecture/How-do-I-collect-the-results-of-who-last-on-unix-machines/m-p/308043#M11683</guid>
      <dc:creator>Hemnaath</dc:creator>
      <dc:date>2018-08-24T09:58:05Z</dc:date>
    </item>
  </channel>
</rss>

