Module: Rsplunk

Defined in:
lib/rsplunk.rb,
lib/rsplunk/search.rb,
lib/rsplunk/client.rb,
lib/rsplunk/api_error.rb

Defined Under Namespace

Modules: Search Classes: APIError, Client

Constant Summary

VERSION =
'0.4.0'

Instance Attribute Summary (collapse)

Class Method Summary (collapse)

Instance Attribute Details

- (Object) host

Returns the value of attribute host



14
15
16
# File 'lib/rsplunk.rb', line 14

def host
  @host
end

- (Object) port

Returns the value of attribute port



14
15
16
# File 'lib/rsplunk.rb', line 14

def port
  @port
end

Class Method Details

+ (Object) set(host = 'localhost', port = 8089)

Set the Splunk server instance. Defaults to 'localhost:8089'



17
18
19
20
21
# File 'lib/rsplunk.rb', line 17

def self.set(host='localhost', port = 8089)
  $host = host
  $port = port
  "https://#{$host}:#{$port}"
end