<?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: Monitoring/Forwarding data on the Splunk server itself in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Monitoring-Forwarding-data-on-the-Splunk-server-itself/m-p/573230#M101401</link>
    <description>&lt;P&gt;You would think, but our sudo maps are centrally stored in LDAP and heavily locked down for all manner of shell escapes and subshelling.&amp;nbsp; I'd blame the admin but I am one of them!&lt;/P&gt;</description>
    <pubDate>Mon, 01 Nov 2021 19:18:15 GMT</pubDate>
    <dc:creator>mercierj</dc:creator>
    <dc:date>2021-11-01T19:18:15Z</dc:date>
    <item>
      <title>Monitoring/Forwarding data on the Splunk server itself</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Monitoring-Forwarding-data-on-the-Splunk-server-itself/m-p/573149#M101378</link>
      <description>&lt;P&gt;My apologies if this question seems mundane or was answered elsewhere but I have searched to no avail.&amp;nbsp; I am completely new to Splunk and am pathfinding the installation and configuration for use as a syslog and audit log store similar to how ELK is often used.&amp;nbsp; While we will add additional data sources at some point my primary focus is on collecting and forwarding &lt;EM&gt;/var/log/audit/audit.log&lt;/EM&gt; and &lt;EM&gt;/var/log/auth.log&lt;/EM&gt; from various Ubuntu hosts into Splunk 8.2(.2.1) Enterprise.&lt;/P&gt;&lt;P&gt;My initial attempt involved installing the UF alongside the Splunk server installation which did not turn out well.&amp;nbsp; Realizing that they are essentially the same daemon and use the same default ports they obviously conflict.&amp;nbsp; So instead I attempted to use the Splunk installation itself as so:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="ruby"&gt;user@splunkhost:~$ sudo /opt/splunk/bin/splunk add forward-server splunkserver:9997
user@splunkhost:~$ sudo /opt/splunk/bin/splunk list forward-server
user@splunkhost:~$ sudo /opt/splunk/bin/splunk add monitor /var/log/audit/audit.log -index main -sourcetype %audit-log%
user@splunkhost:~$ sudo /opt/splunk/bin/splunk add monitor /var/log/auth.log -index main -sourcetype %auth-log%&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;However this also did not work and caused the pipeline to essentially become stuck and back up.&amp;nbsp; I believe the error message was something about the TCP output processor pausing the data flow.&amp;nbsp; I am just unsure why.&lt;/P&gt;&lt;P&gt;Essentially I need to collect the security logs from the Splunk server host and index them in Splunk along with everything else but am at a loss as to how this can be accomplished.&lt;/P&gt;&lt;P&gt;Any help or pointers would be most appreciated.&amp;nbsp; Thank you!&lt;/P&gt;</description>
      <pubDate>Mon, 01 Nov 2021 12:30:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Monitoring-Forwarding-data-on-the-Splunk-server-itself/m-p/573149#M101378</guid>
      <dc:creator>mercierj</dc:creator>
      <dc:date>2021-11-01T12:30:50Z</dc:date>
    </item>
    <item>
      <title>Re: Monitoring/Forwarding data on the Splunk server itself</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Monitoring-Forwarding-data-on-the-Splunk-server-itself/m-p/573204#M101392</link>
      <description>&lt;P&gt;Forwarders are used to convey data to a server running Splunk from those not running Splunk.&amp;nbsp; As you learned, you don't need a separate forwarder on a Splunk server.&amp;nbsp; You also don't need to configure forwarding from Splunk to itself.&lt;/P&gt;&lt;P&gt;Also, it's not recommended to run Splunk as root.&amp;nbsp; Splunk should run as a non-privileged user.&amp;nbsp; Use groups or ACLs to grant read access to the files you wish to monitor.&lt;/P&gt;&lt;P&gt;The &lt;FONT face="courier new,courier"&gt;splunk add monitor&lt;/FONT&gt; commands should be all that is needed to monitor those files.&amp;nbsp; I have doubts about the sourcetypes in the examples, however, as "%" a character I've never seen used there before.&lt;/P&gt;</description>
      <pubDate>Mon, 01 Nov 2021 17:06:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Monitoring-Forwarding-data-on-the-Splunk-server-itself/m-p/573204#M101392</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2021-11-01T17:06:47Z</dc:date>
    </item>
    <item>
      <title>Re: Monitoring/Forwarding data on the Splunk server itself</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Monitoring-Forwarding-data-on-the-Splunk-server-itself/m-p/573220#M101395</link>
      <description>&lt;P&gt;Thanks.&amp;nbsp; I am actually not running Splunk as root (it runs as Splunk) but I can't log in as that user.&amp;nbsp; I could probably get around it using sudo /usr/sbin/runuser -s /bin/bash splunk so I can run those commands as the proper user.&amp;nbsp; Perhaps running those as root created files Splunk couldn't read.&amp;nbsp; I'll give it a try, report back, and give you the upvote once I can verify.&amp;nbsp; Thanks again!&lt;/P&gt;</description>
      <pubDate>Mon, 01 Nov 2021 18:58:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Monitoring-Forwarding-data-on-the-Splunk-server-itself/m-p/573220#M101395</guid>
      <dc:creator>mercierj</dc:creator>
      <dc:date>2021-11-01T18:58:15Z</dc:date>
    </item>
    <item>
      <title>Re: Monitoring/Forwarding data on the Splunk server itself</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Monitoring-Forwarding-data-on-the-Splunk-server-itself/m-p/573228#M101399</link>
      <description>Does sudo -u splunk bash or sudo-u splunk /opt/splunk/bin/splunk xxxx work? Those are usually the way how you should run commands when user splunk hasn’t login shell/rights.</description>
      <pubDate>Mon, 01 Nov 2021 19:11:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Monitoring-Forwarding-data-on-the-Splunk-server-itself/m-p/573228#M101399</guid>
      <dc:creator>isoutamo</dc:creator>
      <dc:date>2021-11-01T19:11:01Z</dc:date>
    </item>
    <item>
      <title>Re: Monitoring/Forwarding data on the Splunk server itself</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Monitoring-Forwarding-data-on-the-Splunk-server-itself/m-p/573230#M101401</link>
      <description>&lt;P&gt;You would think, but our sudo maps are centrally stored in LDAP and heavily locked down for all manner of shell escapes and subshelling.&amp;nbsp; I'd blame the admin but I am one of them!&lt;/P&gt;</description>
      <pubDate>Mon, 01 Nov 2021 19:18:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Monitoring-Forwarding-data-on-the-Splunk-server-itself/m-p/573230#M101401</guid>
      <dc:creator>mercierj</dc:creator>
      <dc:date>2021-11-01T19:18:15Z</dc:date>
    </item>
    <item>
      <title>Re: Monitoring/Forwarding data on the Splunk server itself</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Monitoring-Forwarding-data-on-the-Splunk-server-itself/m-p/573236#M101403</link>
      <description>&lt;P&gt;Yes, running Splunk CLI commands as root when Splunk itself is not running as root runs the risk of files being written that cannot be read by user splunk.&amp;nbsp; Or maybe the file can be read by splunk but can't be updated.&amp;nbsp; Best to avoid that and run CLI commands as the proper user.&amp;nbsp; Most places I've been doing that by using sudo to switch users.&amp;nbsp; Something like &lt;FONT face="courier new,courier"&gt;sudo -iu splunk&lt;/FONT&gt; or &lt;FONT face="courier new,courier"&gt;sudo su splunk&lt;/FONT&gt;.&amp;nbsp; Talk to the powers that be and strongly encourage them to allow one of these commands for the health and safety of Splunk.&lt;/P&gt;</description>
      <pubDate>Tue, 02 Nov 2021 19:11:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Monitoring-Forwarding-data-on-the-Splunk-server-itself/m-p/573236#M101403</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2021-11-02T19:11:17Z</dc:date>
    </item>
    <item>
      <title>Re: Monitoring/Forwarding data on the Splunk server itself</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Monitoring-Forwarding-data-on-the-Splunk-server-itself/m-p/573237#M101404</link>
      <description>Another option until you could fix sudoers is sudo chown -R splunk:splunk /opt/splunk/ after you have added those and probably restart splunk?</description>
      <pubDate>Mon, 01 Nov 2021 19:43:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Monitoring-Forwarding-data-on-the-Splunk-server-itself/m-p/573237#M101404</guid>
      <dc:creator>isoutamo</dc:creator>
      <dc:date>2021-11-01T19:43:38Z</dc:date>
    </item>
    <item>
      <title>Re: Monitoring/Forwarding data on the Splunk server itself</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Monitoring-Forwarding-data-on-the-Splunk-server-itself/m-p/573328#M101418</link>
      <description>&lt;P&gt;Thanks, I tried this and it worked.&amp;nbsp; For those who are curious as to what I ended up doing on the server to get it running as 'splunk' with systemd and monitoring own files:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="ruby"&gt;user@splunkserver:~$ sudo apt install splunk
user@splunkserver:~$ sudo /opt/splunk/bin/splunk start --accept-license
This appears to be your first time running this version of Splunk.
...
user@splunkhost:~$ sudo gpasswd -a splunk adm # let splunk read the logs
user@splunkhost:~$ sudo /opt/splunk/bin/splunk stop
user@splunkhost:~$ sudo chown -R splunk:splunk /opt/splunk
user@splunkhost:~$ sudo /opt/splunk/bin/splunk enable boot-start -user splunk -systemd-managed 1
user@splunkhost:~$ sudo systemctl enable --now Splunkd
user@splunkhost:~$ sudo -u splunk /opt/splunk/bin/splunk enable listen 9997
user@splunkhost:~$ sudo -u splunk /opt/splunk/bin/splunk add monitor /var/log/audit/audit.log -index main -sourcetype audit-log
user@splunkhost:~$ sudo -u splunk /opt/splunk/bin/splunk add monitor /var/log/auth.log -index main -sourcetype auth-log&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;On the other nodes I installed the universal forwarder as normal (which runs as 'splunk' by default):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="ruby"&gt;user@client:~$ sudo apt install splunkforwarder
user@client:~$ sudo /opt/splunkforwarder/bin/splunk enable boot-start -systemd-managed 1 --accept-license
This appears to be your first time running this version of Splunk.
user@client:~$ sudo gpasswd -a splunk adm # allow splunk to read the logs
user@client:~$ sudo systemctl enable --now SplunkForwarder
user@client:~$ sudo -u splunk /opt/splunkforwarder/bin/splunk add forward-server splunkserver:9997
user@client:~$ sudo -u splunk /opt/splunkforwarder/bin/splunk list forward-server
user@client:~$ sudo -u splunk /opt/splunkforwarder/bin/splunk add monitor /var/log/audit/audit.log -index main -sourcetype audit-log
user@client:~$ sudo -u splunk /opt/splunkforwarder/bin/splunk add monitor /var/log/auth.log -index main -sourcetype auth-log&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;As for the % sigil in the source labels I got that from this link but I have since removed them:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;A href="https://community.splunk.com/t5/All-Apps-and-Add-ons/How-do-I-configure-a-Splunk-Forwarder-on-Linux/m-p/72078" target="_blank" rel="noopener"&gt;Solved: How do I configure a Splunk Forwarder on Linux? - Splunk Community&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I may look into using the Add-on For UNIX and Linux but honestly this was pretty simple and meets my immediate needs.&amp;nbsp; Thanks for the help!&lt;/P&gt;</description>
      <pubDate>Tue, 02 Nov 2021 18:24:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Monitoring-Forwarding-data-on-the-Splunk-server-itself/m-p/573328#M101418</guid>
      <dc:creator>mercierj</dc:creator>
      <dc:date>2021-11-02T18:24:32Z</dc:date>
    </item>
  </channel>
</rss>

