fluent-plugin-grassland 0.0.1 → 0.0.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3355444d5dbd8e2b8959c60beb289eb0d94e960d
4
- data.tar.gz: f136db3ac51462deeb2417b1a01ed9128562aa38
3
+ metadata.gz: f26a38c153ab017750540e45f63e56eabeb45447
4
+ data.tar.gz: a48ad30f5ca604197cbdb2505fe91fd9f17fd7ac
5
5
  SHA512:
6
- metadata.gz: 7abb4001d45fd3a37ff0fa2fcd825c78b0cd1c04d5534632874715884f18e029deadd29a6045fec3fb0acb6d6f0cc0b8f886dab2c6956c253316d714580d0f74
7
- data.tar.gz: 96d60b8872a1f44f35544b93cc0deb9f3b923a7e367239179d95e0fbf3b12fb6103aaa5a08432bcd341fa99e69c33875f5f868f6f7f516e145cd293f6207a0fa
6
+ metadata.gz: cbfc3dfd70a91e21447c07e40a394daf68eb8afb674e7e0924396e268f6d85f706e930a8b29c19f882feba3045c41686408078d56c94a648345a78f7c265316d
7
+ data.tar.gz: 4d57f369211a5ee5170d23cde470aa12bc11e2043c09f22c3c3a8708f2815232f12c1ef6683f56176799b1e11cbcbfcba574b309a337b89b6ee244f45b63d142
data/README.md CHANGED
@@ -2,33 +2,46 @@
2
2
 
3
3
  Output filter plugin for Grassland
4
4
 
5
- [![Gem Version](https://badge.fury.io/rb/fluent-plugin-kinesis-alt.png)](http://badge.fury.io/rb/fluent-plugin-kinesis-alt)
5
+ [![Gem Version](https://badge.fury.io/rb/fluent-plugin-grassland.svg)](http://badge.fury.io/rb/fluent-plugin-grassland)
6
6
 
7
7
  ## Notice
8
+ * このアプリケーションはまだテスト中です。
8
9
 
9
- maybe write after.
10
+ 本アプリケーションはFluentdのGrassland用プラグインです。
11
+ [Fluentdをインストール](http://docs.fluentd.org/categories/installation)してからご利用下さい。
10
12
 
11
13
  ## Installation
12
- * It still not working
13
14
 
14
- Add this line to your application's Gemfile:
15
+ __Gemfileに記載する場合__
16
+
17
+ まずGemfileに以下を追記します。
15
18
 
16
19
  gem 'fluent-plugin-grassland'
17
20
 
18
- And then execute:
21
+ 次に以下のコマンドを実行します。
19
22
 
20
23
  $ bundle
21
24
 
22
- Or install it yourself as:
25
+ __直接インストールする場合__
26
+
27
+ 以下のコマンドにて、インストールして下さい。
23
28
 
24
29
  $ gem install fluent-plugin-grassland
25
30
 
31
+ __Red Hat系OSでtd-agentを利用している場合__
32
+
33
+ fluent-gemでインストールします。
34
+ 注意: fluent-gemのパスは環境によって異なります。
35
+
36
+ $ /usr/lib64/fluent/ruby/bin/fluent-gem install fluent-plugin-grassland
37
+
26
38
  ## Usage
27
39
 
28
40
  ### Configuration
29
41
 
42
+ __Fluentdの設定ファイルに以下を追記します。__
30
43
  ```
31
- <match kinesis.**>
44
+ <match grassland.**>
32
45
  type grassland
33
46
  key xxxxxxxxxxxxxxxx
34
47
  flush_interval 3
@@ -4,12 +4,12 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
 
5
5
  Gem::Specification.new do |spec|
6
6
  spec.name = 'fluent-plugin-grassland'
7
- spec.version = '0.0.1'
7
+ spec.version = '0.0.1.1'
8
8
  spec.authors = ['Ripplation Inc.']
9
9
  # spec.email = ['xxxxxx@ripplation.co.jp']
10
10
  spec.description = 'Output filter plugin for Grassland'
11
11
  spec.summary = 'Output filter plugin for Grassland'
12
- spec.homepage = 'https://bitbucket.org/winebarrel/fluent-plugin-kinesis-alt'
12
+ spec.homepage = 'https://www.ripplation.co.jp'
13
13
  spec.license = 'MIT'
14
14
 
15
15
  spec.files = `git ls-files`.split($/)
@@ -2,7 +2,7 @@ module Fluent
2
2
  class GrasslandOutput < Fluent::BufferedOutput
3
3
  Fluent::Plugin.register_output('grassland', self)
4
4
 
5
- attr_accessor :apiuri, :stream_name, :access_key_id, :secret_access_key, :region
5
+ attr_accessor :stream_name, :access_key_id, :secret_access_key, :region
6
6
 
7
7
  def initialize
8
8
  super
@@ -12,11 +12,11 @@ module Fluent
12
12
  require 'logger'
13
13
  require 'net/http'
14
14
  require 'uri'
15
- @apiuri = 'https://s3.amazonaws.com/apicre/credential.json'
16
15
  end
17
16
 
18
- config_param :key, :string, :default => nil
19
- config_param :debug, :bool, :default => false
17
+ config_param :apiuri, :string, :default => 'https://grassland-api.elasticbeanstalk.com/credential'
18
+ config_param :key, :string, :default => 'nil'
19
+ config_param :debug, :bool, :default => false
20
20
 
21
21
  def configure(conf)
22
22
  super
@@ -44,7 +44,7 @@ module Fluent
44
44
  end
45
45
 
46
46
  def setCredential()
47
- credential = get_json(@apiuri)
47
+ credential = get_json("#{@apiuri}?key=#{@key}")
48
48
  @stream_name = credential['streamName']
49
49
  @access_key_id = credential['accessKeyId']
50
50
  @secret_access_key = credential['secretAccessKey']
@@ -80,12 +80,15 @@ module Fluent
80
80
 
81
81
  def format(tag, time, record)
82
82
  # print(record)
83
- ['cid', 'dt', 'uid', 'pt', 'd'].each do |key|
83
+ ['cid', 'dt', 'uid', 'd'].each do |key|
84
84
  unless record.has_key?(key)
85
85
  puts "input data error: '#{key}' is required"
86
86
  return ""
87
87
  end
88
88
  end
89
+ unless record.has_key?('pt')
90
+ record['pt'] = time
91
+ end
89
92
 
90
93
  record['pk'] = record['cid'] + record['dt']
91
94
  return "#{record.to_json},"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-grassland
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ripplation Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-04-12 00:00:00.000000000 Z
11
+ date: 2014-04-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fluentd
@@ -67,7 +67,7 @@ files:
67
67
  - lib/fluent/plugin/out_grassland.rb
68
68
  - test/helper.rb
69
69
  - test/plugin/test_out_grassland.rb
70
- homepage: https://bitbucket.org/winebarrel/fluent-plugin-kinesis-alt
70
+ homepage: https://www.ripplation.co.jp
71
71
  licenses:
72
72
  - MIT
73
73
  metadata: {}