fluent-plugin-google-cloud-storage-out 0.1.11 → 0.1.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +46 -18
- data/fluent-plugin-google-cloud-storage-out.gemspec +2 -2
- data/lib/fluent/plugin/out_google_cloud_storage_out.rb +1 -1
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cca3bf8d8f2334183a8a2c9c822fd4ac1b6da41c
|
4
|
+
data.tar.gz: 13670ae18640b2ce42d5e541ac7e150ddaee29cb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6e8b7e4c94c667a44eb0d764d64e0dd71d10feee7e8616defddbd11c324cbf350a5205abef69d237aabd737e72dc26a9bec9c7b44d80d898788745d181c0c8bb
|
7
|
+
data.tar.gz: 5f7d259c8fc5e85ce5b18e703d6a1629c2ec770f6028a014a435f029b68dc715983cd685a19eaebdff12dcb5e70bd25ff64baa3a96e54e21aa2bb9ea17ceeb0d
|
data/README.md
CHANGED
@@ -1,36 +1,64 @@
|
|
1
|
-
# Fluent::
|
2
|
-
|
3
|
-
Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/fluent/plugin/google/cloud/storage/out`. To experiment with that code, run `bin/console` for an interactive prompt.
|
4
|
-
|
5
|
-
TODO: Delete this and the text above, and describe your gem
|
6
|
-
|
1
|
+
# Fluent::GoogleCloudStorageOut
|
7
2
|
## Installation
|
8
3
|
|
9
4
|
Add this line to your application's Gemfile:
|
10
5
|
|
11
6
|
```ruby
|
12
|
-
gem
|
7
|
+
$ td-agent-gem install fluent-plugin-google-cloud-storage-out
|
8
|
+
```
|
9
|
+
|
10
|
+
## Usage
|
11
|
+
|
12
|
+
#### Sample Conf
|
13
|
+
```
|
14
|
+
<match *.json.log>
|
15
|
+
type google_cloud_storage_out
|
16
|
+
service_account_json_key_path /etc/td-agent/client_secrets.json
|
17
|
+
bucket_id access-log
|
18
|
+
path nginx/%Y_%m_%d/${hostname}_%H%M_${unique}
|
19
|
+
unique_strategy increment
|
20
|
+
format json
|
21
|
+
compress gzip
|
22
|
+
|
23
|
+
buffer_type memory
|
24
|
+
buffer_chunk_limit 10m
|
25
|
+
</match>
|
13
26
|
```
|
14
27
|
|
15
|
-
|
28
|
+
| parameter | description |
|
29
|
+
| ---- | ---- |
|
30
|
+
| service_account_json_key_path | Absolute Path to json key |
|
31
|
+
| bucket_id | GCS Bucket ID to Store |
|
32
|
+
| path | Path to save, if you use `/`, that will resolve to directory. And if path is including time format , then rotate by minum unit. Moreover, you can include ${unique}, that is to replace token with unique key|
|
33
|
+
| unique_strategy | you can choice chunk_id, timestamp and inctement |
|
34
|
+
| unique_format | Now, if you choiced `timestamp` to unique_strategy, then you can ccustom timestampformat. Default format is `%Y%m%d%H%M%S%L` |
|
35
|
+
| format | |
|
36
|
+
| compress | gzip or nil |
|
16
37
|
|
17
|
-
|
38
|
+
#### Bucket
|
18
39
|
|
19
|
-
|
40
|
+
You shuould beforehand make a Bucket in GCS. This plugin will not support to create a Bucket automatically. Because I assume this plugin was used any servers.
|
20
41
|
|
21
|
-
|
42
|
+
#### ServiceAccountKey(json)
|
22
43
|
|
23
|
-
|
44
|
+
TODO
|
45
|
+
|
46
|
+
#### Conf
|
47
|
+
|
48
|
+
TODO
|
49
|
+
|
50
|
+
#### Make Unique Strategy for avoid override object
|
24
51
|
|
25
|
-
TODO
|
52
|
+
TODO
|
26
53
|
|
27
|
-
|
54
|
+
###### Use The Chunk ID
|
28
55
|
|
29
|
-
|
56
|
+
TODO
|
30
57
|
|
31
|
-
|
58
|
+
###### Use The Timestamp
|
32
59
|
|
33
|
-
|
60
|
+
TODO
|
34
61
|
|
35
|
-
|
62
|
+
###### Use The Increment
|
36
63
|
|
64
|
+
TODO
|
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
4
|
|
5
5
|
Gem::Specification.new do |spec|
|
6
6
|
spec.name = "fluent-plugin-google-cloud-storage-out"
|
7
|
-
spec.version = "0.1.
|
7
|
+
spec.version = "0.1.12"
|
8
8
|
spec.authors = ["Hideki Matsuoka"]
|
9
9
|
spec.email = ["matsuoka.hide@gmail.com"]
|
10
10
|
|
@@ -27,6 +27,6 @@ Gem::Specification.new do |spec|
|
|
27
27
|
spec.add_runtime_dependency "fluentd", ">= 0.10.60"
|
28
28
|
spec.add_runtime_dependency "fluent-mixin-config-placeholders", ">= 0.3.0"
|
29
29
|
spec.add_runtime_dependency "googleauth", ">= 0.5"
|
30
|
-
spec.add_runtime_dependency "google-api-client", "0.9.
|
30
|
+
spec.add_runtime_dependency "google-api-client", ">= 0.9.11"
|
31
31
|
spec.add_runtime_dependency "mime-types", ">= 3.0"
|
32
32
|
end
|
@@ -191,7 +191,7 @@ module Fluent
|
|
191
191
|
io = StringIO.new(data)
|
192
192
|
end
|
193
193
|
|
194
|
-
@storage.insert_object(@bucket_id,
|
194
|
+
@storage.insert_object(@bucket_id, {name: path}, upload_source: io, content_type:mimetype.content_type)
|
195
195
|
end
|
196
196
|
|
197
197
|
def write(chunk)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fluent-plugin-google-cloud-storage-out
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.12
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Hideki Matsuoka
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-01
|
11
|
+
date: 2016-08-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -98,16 +98,16 @@ dependencies:
|
|
98
98
|
name: google-api-client
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
100
100
|
requirements:
|
101
|
-
- - '
|
101
|
+
- - '>='
|
102
102
|
- !ruby/object:Gem::Version
|
103
|
-
version: 0.9.
|
103
|
+
version: 0.9.11
|
104
104
|
type: :runtime
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
|
-
- - '
|
108
|
+
- - '>='
|
109
109
|
- !ruby/object:Gem::Version
|
110
|
-
version: 0.9.
|
110
|
+
version: 0.9.11
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
112
|
name: mime-types
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
@@ -161,7 +161,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
161
161
|
version: '0'
|
162
162
|
requirements: []
|
163
163
|
rubyforge_project:
|
164
|
-
rubygems_version: 2.0.14
|
164
|
+
rubygems_version: 2.0.14.1
|
165
165
|
signing_key:
|
166
166
|
specification_version: 4
|
167
167
|
summary: Fluentd out plugin for store to Google Cloud Storage
|