logstash-output-qingstor 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +31 -15
- data/README_zh_CN.md +44 -28
- data/lib/logstash/outputs/qingstor/rotation_policy.rb +1 -1
- data/lib/logstash/outputs/qingstor/uploader.rb +1 -1
- data/logstash-output-qingstor.gemspec +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 41089e1e98df15badcfb495f08a3103e8620a3b0
|
4
|
+
data.tar.gz: 98da69b9f5cdedd029ed59ef6049fcb52bea57cd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7c46fc69ecbd55569c04805a87ec3d9ee30d4bc9850c46539899ee47d4501dad0cd7cfe68d869da01b5b179d6304e7533ca7efdcc0a8a6954e9f2f7660911dd0
|
7
|
+
data.tar.gz: e940a0b9eb73a14ab0d5adc093512b4aca12d443dafa1a559e3eb6da5258e138ca809ec2a0de28f071134aff711810d78228ccbad4ff7620fc98861440e3ee53
|
data/README.md
CHANGED
@@ -1,17 +1,21 @@
|
|
1
1
|
# Logstash Output Plugin for QingStor
|
2
2
|
|
3
|
+
English | [中文](/README_zh_CN.md)
|
4
|
+
|
3
5
|
As an output plugin, it can collect the outputs from logstash, and store them in [QingStor](https://www.qingcloud.com/products/storage#qingstor), which is a remarkable object storage service provided by [QingCloud](https://www.qingcloud.com/).
|
4
6
|
|
5
7
|
For now, We've submitted this plugin to rubygems.org. Use the following command to install.
|
6
|
-
|
7
|
-
|
8
|
+
|
9
|
+
``` bash
|
10
|
+
$ bin/logstash-plugin install logstash-output-qingstor
|
8
11
|
```
|
12
|
+
|
9
13
|
If want to install the local code, please refer to the following guide to install it manually.
|
10
14
|
|
11
|
-
Simplified Chinese version README can be found [here](/README_zh_CN.md)
|
12
15
|
## 1. Configuration Guide
|
13
16
|
|
14
17
|
#### 1.1 Run in minimal Configuration Items
|
18
|
+
|
15
19
|
```sh
|
16
20
|
output {
|
17
21
|
qingstor {
|
@@ -31,19 +35,28 @@ More configuration details please refer to [common options](/docs/index.asciidoc
|
|
31
35
|
#### 2.1 Run in a local Logstash clone
|
32
36
|
|
33
37
|
- Edit Logstash `Gemfile` and add the local plugin path, for example:
|
34
|
-
|
35
|
-
|
38
|
+
-
|
39
|
+
``` ruby
|
40
|
+
$ gem "logstash-output-qingstor", :path => "/your/local/logstash-output-qingstor"
|
36
41
|
```
|
42
|
+
|
37
43
|
- Install plugin
|
38
|
-
|
39
|
-
|
44
|
+
-
|
45
|
+
``` bash
|
46
|
+
$ bin/logstash-plugin install --no-verify
|
40
47
|
```
|
41
48
|
- Run Logstash with your plugin
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
49
|
+
|
50
|
+
```bash
|
51
|
+
$ bin/logstash -e "output { \
|
52
|
+
qingstor { \
|
53
|
+
access_key_id => 'your_access_key_id' \
|
54
|
+
secret_access_key => 'your_secret_access_key' \
|
55
|
+
bucket => 'bucket_name' \
|
56
|
+
} \
|
57
|
+
}"
|
46
58
|
```
|
59
|
+
|
47
60
|
At this point any modifications to the plugin code will be applied to this local Logstash setup. After modifying the plugin, simply rerun Logstash.
|
48
61
|
|
49
62
|
#### 2.2 Run in an installed Logstash
|
@@ -51,13 +64,16 @@ At this point any modifications to the plugin code will be applied to this local
|
|
51
64
|
You can use the same **2.1** method to run your plugin in an installed Logstash by editing its `Gemfile` and pointing the `:path` to your local plugin development directory or you can build the gem and install it using:
|
52
65
|
|
53
66
|
- Build your plugin gem
|
54
|
-
|
55
|
-
|
67
|
+
|
68
|
+
``` bash
|
69
|
+
$ gem build logstash-output-qingstor.gemspec
|
56
70
|
```
|
57
71
|
- Install the plugin from the Logstash home
|
58
|
-
|
59
|
-
|
72
|
+
|
73
|
+
``` bash
|
74
|
+
$ bin/logstash-plugin install /your/local/plugin/logstash-output-qingstor.gem
|
60
75
|
```
|
76
|
+
|
61
77
|
- Start Logstash and proceed to test the plugin
|
62
78
|
|
63
79
|
## Contributing
|
data/README_zh_CN.md
CHANGED
@@ -1,21 +1,24 @@
|
|
1
1
|
# Logstash Output Plugin for QingStor
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
作为一个
|
3
|
+
[English](/README.md) | 中文
|
4
|
+
|
5
|
+
作为一个 Logstash 的 Output 插件, 它可以将 Logstash 输出的结果打包上传至 QingStor 对象存储中.
|
6
6
|
详细功能参考下面配置说明.
|
7
7
|
|
8
|
-
目前插件已经提交至rubygems.org, 使用以下命令安装:
|
9
|
-
|
10
|
-
|
8
|
+
目前插件已经提交至 [RubyGems](https://rubygems.org), 使用以下命令安装:
|
9
|
+
|
10
|
+
``` bash
|
11
|
+
$ bin/logstash-plugin install logstash-output-qingstor
|
11
12
|
```
|
13
|
+
|
12
14
|
手动安装本地代码, 安装方法参考下文.
|
13
15
|
|
14
16
|
## 1. 配置说明
|
15
17
|
|
16
18
|
#### 1.1 最小运行配置
|
17
|
-
- 使用
|
18
|
-
|
19
|
+
- 使用 `-f` 接受一个 `*.conf` 文件或者使用 `-e` 参数直接输入配置, 最小运行配置至少需要以下三项
|
20
|
+
-
|
21
|
+
``` bash
|
19
22
|
output {
|
20
23
|
qingstor {
|
21
24
|
access_key_id => 'your_access_key_id' #required
|
@@ -24,11 +27,11 @@ output {
|
|
24
27
|
# region => "pek3a" #optional, default value "pek3a"
|
25
28
|
}
|
26
29
|
}
|
27
|
-
|
28
30
|
```
|
29
31
|
|
30
32
|
#### 1.2 其他可选参数说明
|
31
|
-
|
33
|
+
|
34
|
+
``` bash
|
32
35
|
output {
|
33
36
|
qingstor {
|
34
37
|
......
|
@@ -76,38 +79,51 @@ output {
|
|
76
79
|
|
77
80
|
}
|
78
81
|
}
|
79
|
-
|
80
82
|
```
|
81
83
|
|
82
84
|
## 2. 安装插件
|
83
85
|
|
84
86
|
#### 2.1 直接运行本地的插件
|
85
87
|
|
86
|
-
- 编辑Logstash目录下的
|
87
|
-
|
88
|
-
|
88
|
+
- 编辑 Logstash 目录下的 Gemfile, 添加插件的路径, 例如
|
89
|
+
|
90
|
+
``` ruby
|
91
|
+
$ gem "logstash-output-qingstor", :path => "/your/local/logstash-output-qingstor"
|
89
92
|
```
|
93
|
+
|
90
94
|
- 安装插件
|
91
|
-
|
92
|
-
|
95
|
+
|
96
|
+
``` bash
|
97
|
+
$ bin/logstash-plugin install --no-verify
|
93
98
|
```
|
99
|
+
|
94
100
|
- 使用插件运行
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
101
|
+
-
|
102
|
+
``` bash
|
103
|
+
$ bin/logstash -e "output { \
|
104
|
+
qingstor { \
|
105
|
+
access_key_id => 'your_access_key_id' \
|
106
|
+
secret_access_key => 'your_secret_access_key' \
|
107
|
+
bucket => 'bucket_name' \
|
108
|
+
} \
|
109
|
+
}"
|
99
110
|
```
|
111
|
+
|
100
112
|
此时你对插件所做的任意的代码上的修改都会直接生效.
|
101
113
|
|
102
114
|
#### 2.2 安装一个本地插件然后运行
|
103
115
|
|
104
|
-
这一步你需要生成一个插件的
|
105
|
-
- 在项目目录下生成
|
106
|
-
|
107
|
-
|
116
|
+
这一步你需要生成一个插件的 Gem 包, 然后通过 Logstash 来安装到 Logstash 的插件目录下
|
117
|
+
- 在项目目录下生成 Gem
|
118
|
+
|
119
|
+
``` bash
|
120
|
+
$ gem build logstash-output-qingstor.gemspec
|
108
121
|
```
|
109
|
-
|
110
|
-
|
111
|
-
|
122
|
+
|
123
|
+
- 在 Logstash 的目录下使用 `logstash-plugin` 安装
|
124
|
+
|
125
|
+
``` bash
|
126
|
+
$ bin/logstash-plugin install /your/local/plugin/logstash-output-qingstor.gem
|
112
127
|
```
|
113
|
-
|
128
|
+
|
129
|
+
- 安装完毕之后, 就可以使用 Logstash 运行开始测试了.
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = 'logstash-output-qingstor'
|
3
|
-
s.version = '0.2.
|
3
|
+
s.version = '0.2.1'
|
4
4
|
s.licenses = ['Apache License (2.0)']
|
5
5
|
s.summary = 'logstash output plugin for qingstor'
|
6
6
|
s.description = 'Collect the outputs of logstash and store into Qingstor'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: logstash-output-qingstor
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Evan Zhao
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-08-
|
11
|
+
date: 2017-08-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|