Splunk - Deploy/Upgrade Splunk Light Forwarder 7.1.3 (nix Servers) - superseded
| 0 Votes |
Versioning - This is an older version.
| 1 | Splunk - Deploy/Upgrade Splunk Light Forwarder 7.1.3 (nix Servers) | 9/24/2018 5:50:48 PM |
| 2 | Splunk - Deploy/Upgrade Splunk Universal Forwarder 7.1.3 (Linux) | 9/24/2018 6:14:29 PM |
Description
Property Details
| 25548 | |
| Beta - Preliminary testing ready for more | |
| Splunk - Deploy/Upgrade Splunk Light Forwarder 7.1.3 (nix Servers) | |
| Internal | |
| 9/24/2015 12:00:00 AM | |
| splunk, forwarder, install | |
| jimwald on 9/24/2018 5:50:48 PM | |
| jimwald on 9/24/2018 5:55:05 PM | |
| 3446 Views / 1 Download | |
* Average over 0 ratings.
** Log In or Register to add your rating.
|
Relevance
| Used in 6 fixlets | * Results in a true/false |
name of operating system as lowercase contains "linux"
| Used in 2 fixlets | * Results in a true/false |
(not exists folder "/opt/splunkforwarder") OR (if exists folder "/opt/splunkforwarder" then (substring after "=" of line containing "VERSION" of file "splunk.version" of folder "/opt/splunkforwarder/etc") as trimmed string as version < "7.1.3" else true)
Actions
Action 1 (default)
Action Link Click
here to deploy this action.
Script Type
BigFix Action Script
action parameter query "user" with description "Name of user Splunk will run as." and with default value "splunk"
action parameter query "path" with description "Path of where Splunk will be installed." and with default value "/opt"
action parameter query "ds" with description "Hostname of deployment server and management port. Leave blank for upgrade."
//OS Check
continue if {name of operating system does not contain "Win"}
//Grab installer and configuration files
prefetch splunkforwarder.tgz sha1:66030ce85e2fa1bb4752257d0ee01503d37c0b4c size:22640418 http://download.splunk.com/products/universalforwarder/releases/7.1.3/linux/splunkforwarder-7.1.3-51d9cac7b837-Linux-x86_64.tgz
//Parameter defining the version being upgraded to
parameter "version"="7.1.3"
if {not exists line whose (it starts with (parameter "user" as string)) of file "/etc/shadow"}
wait useradd {parameter "user" as string}
endif
//Stop existing installation of Splunk
if {(exists file "splunkforwarder/bin/splunk" of folder (parameter "path" as string)) OR exists process "splunkd"}
wait service splunk stop
endif
//Install Forwarder
wait tar -zxf {(client folder of current site as string) & "/__Download/splunkforwarder.tgz"} -C {parameter "path" as string}
//Create splunk-launch.conf if needed
//if {if exists folder "splunkforwarder" of folder (parameter "path" as string) then not exists file "splunk-launch.conf" of folder "splunkforwarder/etc" of folder (parameter "path" as string) else true}
//wait cp {parameter "path" as string}/splunkforwarder/etc/splunk-launch.conf.default {parameter "path" as string}/splunkforwarder/etc/splunk-launch.conf
//endif
//Make new user owner of all of the new installation
wait chown -R {parameter "user" as string}:{parameter "user" as string} {parameter "path" as string}/splunkforwarder
//Configure deployment server and start
if {parameter "ds" of action as string is not ""}
wait su {parameter "user" as string} -c "{parameter "path" as string}/splunkforwarder/bin/splunk set deploy-poll {parameter "ds" as string} --accept-license --answer-yes --gen-and-print-passwd"
wait su {parameter "user" as string} -c "{parameter "path" as string}/splunkforwarder/bin/splunk start"
else
wait su {parameter "user" as string} -c "{parameter "path" as string}/splunkforwarder/bin/splunk start --accept-license --answer-yes"
endif
//Set boot start
wait {parameter "path" as string}/splunkforwarder/bin/splunk enable boot-start -user {parameter "user" as string}
Success Criteria
This action will be considered successful when the applicability relevance evaluates to false.
Sharing
| Social Media: |

