<?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 Install splunk forwarder in Linux servers in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Install-splunk-forwarder-in-Linux-servers/m-p/496862#M84733</link>
    <description>&lt;P&gt;Hi All;&lt;/P&gt;

&lt;P&gt;Is there way to push and install splunk forwarder to multiple Linux servers at same time? &lt;BR /&gt;
If you have script please provide me.&lt;/P&gt;

&lt;P&gt;Thanks &lt;/P&gt;</description>
    <pubDate>Wed, 04 Dec 2019 19:32:34 GMT</pubDate>
    <dc:creator>aalhabbash1</dc:creator>
    <dc:date>2019-12-04T19:32:34Z</dc:date>
    <item>
      <title>Install splunk forwarder in Linux servers</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Install-splunk-forwarder-in-Linux-servers/m-p/496862#M84733</link>
      <description>&lt;P&gt;Hi All;&lt;/P&gt;

&lt;P&gt;Is there way to push and install splunk forwarder to multiple Linux servers at same time? &lt;BR /&gt;
If you have script please provide me.&lt;/P&gt;

&lt;P&gt;Thanks &lt;/P&gt;</description>
      <pubDate>Wed, 04 Dec 2019 19:32:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Install-splunk-forwarder-in-Linux-servers/m-p/496862#M84733</guid>
      <dc:creator>aalhabbash1</dc:creator>
      <dc:date>2019-12-04T19:32:34Z</dc:date>
    </item>
    <item>
      <title>Re: Install splunk forwarder in Linux servers</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Install-splunk-forwarder-in-Linux-servers/m-p/496863#M84734</link>
      <description>&lt;P&gt;There is no Splunk solution for that.  Use a third-party management tool like Ansible, Puppet, etc.&lt;/P&gt;</description>
      <pubDate>Wed, 04 Dec 2019 19:37:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Install-splunk-forwarder-in-Linux-servers/m-p/496863#M84734</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2019-12-04T19:37:07Z</dc:date>
    </item>
    <item>
      <title>Re: Install splunk forwarder in Linux servers</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Install-splunk-forwarder-in-Linux-servers/m-p/496864#M84735</link>
      <description>&lt;P&gt;Hi @aalhabbash1,&lt;BR /&gt;
the esiest way is to use a tool (as suggested by @richgalloway) otherwise you can use a script that installs one Universal Forwarder at a time, if you want to parallelize UFs installation you can run it more times:&lt;BR /&gt;
&lt;STRONG&gt;Script&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;#!/bin/sh
# Script to remotely install Splunk forwarder

# to avoid to store readable password
read -s -p "Enter Splunk Admin Password: " PASSWORD
echo 

# Configuration file
source /home/your_user/config.ini

# Command lists to execute in remote forwarder server
REMOTESCRIPT="
cd $DIRDEST
$WGETCMD
sudo tar -xzf $FWDTGZ
sudo chown -R splunk:splunk $DIRDEST/splunkforwarder
sudo -H -u splunk $DIRDEST/splunkforwarder/bin/splunk start --accept-license --answer-yes --auto-ports --no-prompt
sudo $DIRDEST/splunkforwarder/bin/splunk edit user admin -password $PASSWORD -auth admin:changeme
sudo $DIRDEST/splunkforwarder/bin/splunk set deploy-poll \"$DEPLOYSERVER\" -auth admin:$PASSWORD
sudo $DIRDEST/splunkforwarder/bin/splunk enable boot-start -user splunk
sudo chown -R splunk:splunk $DIRDEST/splunkforwarder
sudo -H -u splunk $DIRDEST/splunkforwarder/bin/splunk restart
"

# Installation execution
echo "============================= FORWARDER REMOTE INSTALLER ============================="
echo
sleep 5
echo "Reading host logins from $TARGETSFILE"
echo 
echo "Start Forwarder remote installation to:"

# hosts cycle
for DEST in `cat "$TARGETSFILE"`; do

    if [ -z "$DEST" ]; then
        continue;
    fi
    echo 
    echo "- $DEST"
    ssh "$DEST" "$REMOTESCRIPT"

done
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;Config.ini&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;TARGETSFILE="/home/my_user/targets.ini"
DIRDEST="/opt"
WGETCMD="sudo wget -O splunkforwarder-your_version.tgz 'your_link"
FWDTGZ="/opt/splunkforwarder-your_version.tgz"
DEPLOYSERVER="your_Deployment_Server:8089"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Adapt the script to your needs.&lt;BR /&gt;
In addition you could insert your host list in another file and read them from it.&lt;BR /&gt;
Another hint is to copy in $SPLUNK_HOME/etc/apps a Technical Add-on in which there are two files: outputs.conf and deploymentclient.conf, in this way your Forwarders will connect directly to you Deployment Server and you can manage them&lt;/P&gt;

&lt;P&gt;Ciao.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Fri, 06 Dec 2019 08:39:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Install-splunk-forwarder-in-Linux-servers/m-p/496864#M84735</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2019-12-06T08:39:41Z</dc:date>
    </item>
    <item>
      <title>Re: Install splunk forwarder in Linux servers</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Install-splunk-forwarder-in-Linux-servers/m-p/496865#M84736</link>
      <description>&lt;P&gt;Hi @aalhabbash1,&lt;BR /&gt;
did the answer solve your need?&lt;BR /&gt;
if yes, please accept it for other people of Community, if not tell me what's the problem.&lt;/P&gt;

&lt;P&gt;Ciao.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Wed, 12 Feb 2020 18:03:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Install-splunk-forwarder-in-Linux-servers/m-p/496865#M84736</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2020-02-12T18:03:23Z</dc:date>
    </item>
  </channel>
</rss>

