Skip to content

Instantly share code, notes, and snippets.

@ampledata
Created October 28, 2011 18:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ampledata/1322979 to your computer and use it in GitHub Desktop.
Save ampledata/1322979 to your computer and use it in GitHub Desktop.
Reload Splunk Apps
#!/usr/bin/env ruby
#
# Reload Splunk Apps
#
# Author:: Greg Albrecht <gba@splunk.com>
require 'net/http'
require 'net/https'
@http = Net::HTTP.new('splunk.example.com', 8089)
@http.use_ssl = true
@http.start do |http|
request = Net::HTTP::Get.new('/services/apps/local/_reload')
request.basic_auth('admin', 'xxx')
response = http.request(request)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment