Splunk - Reload App
Log In or Register to download the BES file, and more.

0 Votes

Description

Task used to reload apps that are not fully deployed on Splunk Fowarders. This fixlet should be used if a deployment server is reporting a problem while deploying an app to forwarders in your environment. NOTE: This action implies to forwarder is running as "root" rather than another non-root account.

Property Details

ID25281
StatusProduction - Fully Tested and Ready for Production
TitleSplunk - Reload App
SourceInternal
Source Release Date5/5/2016 12:00:00 AM
Keywordssplunk app install reinstall
Is TaskTrue
Added by on 3/8/2018 6:10:03 AM
Last Modified by on 3/11/2018 8:54:13 AM
Counters 157 Views / 1 Download
User Rating 1 star 2 star 3 star 4 star 5 star * Average over 0 ratings. ** Log In or Register to add your rating.

Relevance

Used in 1 fixlet   * Results in a true/false
Show indented relevance
if windows of operating system then exists service "splunkforwarder" else exists folder "/opt/splunkforwarder/etc/apps"

Actions

Action 1 (default)

Action Link Click here to deploy this action.
Script Type BigFix Action Script
action parameter query "app" with description "Name of app to be reloaded."

if {windows of operating system AND exists file "C:\Program Files\SplunkUniversalForwarder\bin\splunk.exe"}
waithidden "C:\Program Files\SplunkUniversalForwarder\bin\splunk.exe" stop
waithidden cmd.exe /C del /S /Q "{"C:\Program Files\SplunkUniversalForwarder\etc\apps\" & (parameter "app" as string)}"
waithidden "C:\Program Files\SplunkUniversalForwarder\bin\splunk.exe" start
elseif {windows of operating system AND exists file "E:\Program Files\SplunkUniversalForwarder\bin\splunk.exe"}
waithidden "E:\Program Files\SplunkUniversalForwarder\bin\splunk.exe" stop
waithidden cmd.exe /C del /S /Q "{"E:\Program Files\SplunkUniversalForwarder\etc\apps\" & (parameter "app" as string)}"
waithidden "E:\Program Files\SplunkUniversalForwarder\bin\splunk.exe" start
else
wait /opt/splunkforwarder/bin/splunk stop
wait rm -rf {"/opt/splunkforwarder/etc/apps/" & (parameter "app" as string)}
wait /opt/splunkforwarder/bin/splunk start
endif
Success Criteria

This action will be considered successful when the applicability relevance evaluates to false.


Sharing

Social Media:
Share this page on Yammer

Comments

Log In or Register to leave comments!