<?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: .bash_history on NFS-mounted home directory in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/bash-history-on-NFS-mounted-home-directory/m-p/163946#M33207</link>
    <description>&lt;P&gt;Splunk alone cannot do this.  This really isn't a question for Splunk, more of a question of "how do I managed shell history files on a shared unix filesystem?"&lt;/P&gt;

&lt;P&gt;You can make bash produce distinct history files per host and then index those.   Add something like this to .profile:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;export HISTSIZE=10000
export HISTTIMEFORMAT="%F %T "
export HISTFILE=/$HOME/.history/$HOSTNAME
export PROMPT_COMMAND='history -a'
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Bonus - you get usable timestamps in your bash history!&lt;/P&gt;</description>
    <pubDate>Mon, 24 Feb 2014 23:43:31 GMT</pubDate>
    <dc:creator>dwaddle</dc:creator>
    <dc:date>2014-02-24T23:43:31Z</dc:date>
    <item>
      <title>.bash_history on NFS-mounted home directory</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/bash-history-on-NFS-mounted-home-directory/m-p/163945#M33206</link>
      <description>&lt;P&gt;Hi.&lt;/P&gt;

&lt;P&gt;We would like to index users' shell history (.bash_ history) in Splunk. The issue is that we have shared home directories that are NFS mounted. That means whenever you log into a machine, you're accessing your same files and, consequently, the same .bash_history.&lt;/P&gt;

&lt;P&gt;We'd like Splunk to know what host the user was on when .bash_history was updated. This way we can run a search within Splunk and see how typed which commands from which host. &lt;/P&gt;

&lt;P&gt;Is this possible? It sound like it's a procedural issue that is outside of Splunk. I'm hoping someone else here has accomplished this.&lt;/P&gt;

&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Mon, 24 Feb 2014 19:14:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/bash-history-on-NFS-mounted-home-directory/m-p/163945#M33206</guid>
      <dc:creator>Branden</dc:creator>
      <dc:date>2014-02-24T19:14:41Z</dc:date>
    </item>
    <item>
      <title>Re: .bash_history on NFS-mounted home directory</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/bash-history-on-NFS-mounted-home-directory/m-p/163946#M33207</link>
      <description>&lt;P&gt;Splunk alone cannot do this.  This really isn't a question for Splunk, more of a question of "how do I managed shell history files on a shared unix filesystem?"&lt;/P&gt;

&lt;P&gt;You can make bash produce distinct history files per host and then index those.   Add something like this to .profile:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;export HISTSIZE=10000
export HISTTIMEFORMAT="%F %T "
export HISTFILE=/$HOME/.history/$HOSTNAME
export PROMPT_COMMAND='history -a'
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Bonus - you get usable timestamps in your bash history!&lt;/P&gt;</description>
      <pubDate>Mon, 24 Feb 2014 23:43:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/bash-history-on-NFS-mounted-home-directory/m-p/163946#M33207</guid>
      <dc:creator>dwaddle</dc:creator>
      <dc:date>2014-02-24T23:43:31Z</dc:date>
    </item>
  </channel>
</rss>

