fluent-plugin-splunkapi 0.1.2 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/README.md CHANGED
@@ -75,6 +75,14 @@ Put the following lines to your fluent.conf:
75
75
  # host: 'host' parameter passed to Splunk
76
76
  host YOUR-HOSTNAME
77
77
 
78
+ # index: 'index' parameter passed to Splunk (REST only)
79
+ # default: <none>
80
+ #index main
81
+
82
+ # check_index: 'check-index' parameter passed to Splunk (REST only)
83
+ # default: <none>
84
+ #check_index false
85
+
78
86
  # host: 'source' parameter passed to Splunk
79
87
  # default: {TAG}
80
88
  #
@@ -3,7 +3,7 @@ $:.push File.expand_path("../lib", __FILE__)
3
3
 
4
4
  Gem::Specification.new do |gem|
5
5
  gem.name = "fluent-plugin-splunkapi"
6
- gem.version = "0.1.2"
6
+ gem.version = "0.1.3"
7
7
  gem.authors = ["Keisuke Nishida"]
8
8
  gem.email = ["knishida@bizmobile.co.jp"]
9
9
  gem.description = %q{Splunk output plugin for Fluent event collector}
@@ -40,6 +40,8 @@ class SplunkAPIOutput < BufferedOutput
40
40
 
41
41
  # Event parameters
42
42
  config_param :host, :string, :default => nil # TODO: auto-detect
43
+ config_param :index, :string, :default => nil
44
+ config_param :check_index, :bool, :default => true
43
45
  config_param :source, :string, :default => '{TAG}'
44
46
  config_param :sourcetype, :string, :default => 'fluent'
45
47
 
@@ -103,6 +105,8 @@ class SplunkAPIOutput < BufferedOutput
103
105
  @username, @password = @auth.split(':')
104
106
  @base_url = "https://#{@server}/services/receivers/simple?sourcetype=#{@sourcetype}"
105
107
  @base_url += "&host=#{@host}" if @host
108
+ @base_url += "&index=#{@index}" if @index
109
+ @base_url += "&check-index=false" unless @check_index
106
110
  elsif @protocol == 'storm'
107
111
  @username, @password = 'x', @access_token
108
112
  @base_url = "https://#{@api_hostname}/1/inputs/http?index=#{@project_id}&sourcetype=#{@sourcetype}"
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 1
8
- - 2
9
- version: 0.1.2
8
+ - 3
9
+ version: 0.1.3
10
10
  platform: ruby
11
11
  authors:
12
12
  - Keisuke Nishida
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2013-02-02 00:00:00 +09:00
17
+ date: 2013-07-26 00:00:00 +09:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency