fluent-plugin-splunkapi 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -90,9 +90,9 @@ Put the following lines to your fluent.conf:
90
90
  #
91
91
 
92
92
  # time_format: the time format of each event
93
- # value: none, unixtime, or any time format string
94
- # default: %Y-%M-%d %H:%M:%S
95
- #time_format %Y-%M-%d %H:%M:%S
93
+ # value: none, unixtime, localtime, or any time format string
94
+ # default: localtime
95
+ time_format localtime
96
96
 
97
97
  # format: the text format of each event
98
98
  # value: json, kvp, or text
@@ -128,9 +128,9 @@ Put the following lines to your fluent.conf:
128
128
 
129
129
  # flush_interval: The interval of API requests.
130
130
  #
131
- # Make sure that this value is large enough to make successive API calls.
132
- # Note that a different source produces a different API POST, each of which
133
- # costs two or more seconds. If you include "{TAG}" in the source parameter and
131
+ # Make sure that this value is sufficiently large to make successive API calls.
132
+ # Note that a different 'source' creates a different API POST, each of which may
133
+ # take two or more seconds. If you include "{TAG}" in the source parameter and
134
134
  # this 'match' section recieves many tags, a single flush may take long time.
135
135
  # (Run fluentd with -v to see verbose logs.)
136
136
  flush_interval 60s
@@ -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.0"
6
+ gem.version = "0.1.1"
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}
@@ -44,7 +44,7 @@ class SplunkAPIOutput < BufferedOutput
44
44
  config_param :sourcetype, :string, :default => 'fluent'
45
45
 
46
46
  # Formatting
47
- config_param :time_format, :string, :default => "%Y-%M-%d %H:%M:%S"
47
+ config_param :time_format, :string, :default => 'localtime'
48
48
  config_param :format, :string, :default => 'json'
49
49
 
50
50
  def initialize
@@ -68,6 +68,8 @@ class SplunkAPIOutput < BufferedOutput
68
68
  @time_formatter = nil
69
69
  when 'unixtime'
70
70
  @time_formatter = lambda { |time| time.to_s }
71
+ when 'localtime'
72
+ @time_formatter = lambda { |time| Time.at(time).localtime }
71
73
  else
72
74
  @timef = TimeFormatter.new(@time_format, @localtime)
73
75
  @time_formatter = lambda { |time| @timef.format(time) }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-splunkapi
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: