module Splunk::Pickaxe

Constants

ALERT_KEYS
EVENT_TYPES_KEYS
FIELD_EXTRACTIONS_KEYS
MACRO_KEYS
REPORT_KEYS
VERSION

Public Class Methods

configure(environment, username, password, args) click to toggle source
# File lib/splunk/pickaxe.rb, line 11
def self.configure(environment, username, password, args)
  config = Config.load(environment, args.fetch(:repo_path, Dir.getwd))

  uri = URI(config.url)

  puts "Connecting to splunk [#{uri}]"
  service = Splunk.connect(
    proxy: CookieProxy,
    scheme: uri.scheme.to_sym,
    host: uri.host,
    port: uri.port,
    username: username,
    password: password,
    namespace: config.namespace
  )

  Client.new service, environment.downcase, config, args
end