Adding splunk to chef
This commit is contained in:
parent
8580ea2be6
commit
6794c913ef
2 changed files with 24 additions and 0 deletions
|
|
@ -1,3 +1,4 @@
|
|||
include_recipe "common::iptables"
|
||||
include_recipe "common::daemontools"
|
||||
include_recipe "common::secret_token"
|
||||
include_recipe "common::splunk"
|
||||
|
|
|
|||
23
chef/cookbooks/common/recipes/splunk.rb
Normal file
23
chef/cookbooks/common/recipes/splunk.rb
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
execute "Download splunk" do
|
||||
command "cd /tmp/install && wget 'http://www.splunk.com/index.php/download_track?file=4.1.5/linux/splunk-4.1.5-85165-Linux-x86_64.tgz&ac=&wget=true&name=wget&typed=releases'"
|
||||
end
|
||||
|
||||
execute "Untar splunk" do
|
||||
command "cd /tmp/install && tar -xvf splunk-4.1.5-85165-Linux-x86_64.tgz"
|
||||
end
|
||||
|
||||
execute "Install splunk" do
|
||||
command "mv /tmp/install/splunk /opt/splunk"
|
||||
end
|
||||
|
||||
execute "Put splunk into forwarding mode" do
|
||||
command "cd /opt/splunk/bin && ./splunk enable app SplunkLightForwarder -auth admin:changeme"
|
||||
end
|
||||
|
||||
execute "Add forwarding server" do
|
||||
command "cd /opt/splunk/bin && ./splunk add forward-server splunk.joindiaspora.com:9997 -auth admin:changeme"
|
||||
end
|
||||
|
||||
execute "Start splunk" do
|
||||
command "cd /opt/splunk/bin && ./splunk start"
|
||||
end
|
||||
Loading…
Reference in a new issue