fluent-plugin-cloudwatch-transform 0.0.1 → 0.0.2
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.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 90e1f0b5e157a970e9083dceca362c9fa7ec15b8
|
4
|
+
data.tar.gz: 3a404fc2307d83b9e4bbaf3a84f695225cceecf0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f6c9a5a5ade65723fb7f3f705cb0c3ee771de69f940003941d815f160b2ba4547260cad6b680d556ce50e469324610944f9f58741682278e889629c7f6f0def3
|
7
|
+
data.tar.gz: f05d5a02c3f9d059bba329adbabcc004b8f2dc80e0bb0fdfd78213e925c5afe2c17d9e79b46b78223a2dbc04527a3569cc29ea034aaa05fb41d9951ba482cc56
|
data/README.md
CHANGED
@@ -9,24 +9,81 @@ If you don't, please run through [quick start for fluentd] (https://github.com/f
|
|
9
9
|
|
10
10
|
Now after you have fluentd installed you can follow either of the steps below:
|
11
11
|
|
12
|
+
|
13
|
+
//not available yet:
|
14
|
+
|
12
15
|
Add this line to your application's Gemfile:
|
13
16
|
|
14
|
-
gem 'fluent-plugin-cloudwatch-transform'
|
17
|
+
$ gem 'fluent-plugin-cloudwatch-transform'
|
15
18
|
|
16
19
|
Or install it yourself as:
|
17
20
|
|
18
21
|
$ gem install fluent-plugin-cloudwatch-transform
|
19
22
|
|
23
|
+
//for current version:
|
24
|
+
|
25
|
+
just download or clone this repository
|
26
|
+
|
27
|
+
in the folder of this repository:
|
28
|
+
|
29
|
+
$ gem build fluent-plugin-cloudwatch-transform.gemspec
|
30
|
+
|
31
|
+
$ sudo gem install ./fluent-plugin-cloudwatch-transform-0.0.1.gem
|
32
|
+
|
33
|
+
|
20
34
|
## Usage
|
35
|
+
|
36
|
+
### fluent configure
|
37
|
+
require fluent-plugin-cloudwatch for input.
|
21
38
|
Add the following into your fluentd config.
|
22
39
|
|
23
|
-
<
|
24
|
-
|
25
|
-
|
26
|
-
|
40
|
+
<source>
|
41
|
+
type cloudwatch
|
42
|
+
tag #tag with application name, like: alert.cloudwatch.raw.Form & Printing Services (FPS)
|
43
|
+
aws_key_id #your id
|
44
|
+
aws_sec_key #your key
|
45
|
+
cw_endpoint #your endpoint
|
46
|
+
interval #frequency to pull data
|
47
|
+
namespace #AWS namepace
|
48
|
+
metric_name #selected metric name, like: HealthyHostCount
|
49
|
+
dimensions_name #dimensions name
|
50
|
+
dimensions_value # dimensions value
|
51
|
+
</source>
|
52
|
+
|
53
|
+
<match alert.cloudwatch.raw.**>
|
54
|
+
type cloudwatch_transform
|
55
|
+
tag alert.cloudwatch.out
|
56
|
+
</match>
|
57
|
+
|
58
|
+
<match alert.cloudwatch.out>
|
59
|
+
type stdout
|
60
|
+
</match>
|
61
|
+
|
62
|
+
### input example
|
63
|
+
{
|
64
|
+
"HealthyHostCount": 6
|
65
|
+
}
|
66
|
+
|
67
|
+
|
68
|
+
### output examle
|
69
|
+
|
70
|
+
{
|
71
|
+
"event_name": "HealthyHostCount",
|
72
|
+
"value": "6.0",
|
73
|
+
"raw": {
|
74
|
+
"HealthyHostCount": 6
|
75
|
+
},
|
76
|
+
"receive_time_input": "1426189324",
|
77
|
+
"application_name": "Form & Printing Services (FPS)",
|
78
|
+
"intermediary_source": "cloudwatch",
|
79
|
+
"tag": "alert.cloudwatch.out"
|
80
|
+
}
|
81
|
+
|
82
|
+
## To DO
|
83
|
+
need to write the test
|
84
|
+
|
85
|
+
not push to fluent.org yet
|
86
|
+
|
27
87
|
|
28
|
-
<match alert.cloudwatch.out>
|
29
|
-
type stdout
|
30
|
-
</match>
|
31
88
|
|
32
89
|
|
@@ -3,8 +3,8 @@ $:.push File.expand_path("../lib", __FILE__)
|
|
3
3
|
|
4
4
|
Gem::Specification.new do |gem|
|
5
5
|
gem.name = "fluent-plugin-cloudwatch-transform"
|
6
|
-
gem.version = "0.0.
|
7
|
-
gem.date = '2015-03-
|
6
|
+
gem.version = "0.0.2"
|
7
|
+
gem.date = '2015-03-18'
|
8
8
|
gem.authors = ["Ling Zhang"]
|
9
9
|
gem.email = ["zhangling.ice@gmail.com"]
|
10
10
|
gem.summary = %q{Fluentd output plugin for transform cloudwatch alerts }
|
@@ -4,7 +4,8 @@ module Fluent
|
|
4
4
|
# and identifies the plugin in the configuration file.
|
5
5
|
Fluent::Plugin.register_output('cloudwatch_transform', self)
|
6
6
|
|
7
|
-
config_param :tag, :string, default:'alert.cloudwatch.out'
|
7
|
+
#config_param :tag, :string, default:'alert.cloudwatch.out'
|
8
|
+
config_param :tag, :string
|
8
9
|
|
9
10
|
# This method is called before starting.
|
10
11
|
def configure(conf)
|
@@ -6,19 +6,15 @@ class SnmpTrapInputTest < Test::Unit::TestCase
|
|
6
6
|
end
|
7
7
|
|
8
8
|
CONFIG = %[
|
9
|
-
|
10
|
-
port 1062
|
11
|
-
tag alert.snmptrap
|
9
|
+
tag alert.cloudwatch.raw.FPS
|
12
10
|
]
|
13
11
|
|
14
12
|
def create_driver(conf=CONFIG)
|
15
|
-
Fluent::Test::InputTestDriver.new(Fluent::
|
13
|
+
Fluent::Test::InputTestDriver.new(Fluent::CloudwatchTransformOutput).configure(conf)
|
16
14
|
end
|
17
15
|
|
18
16
|
def test_configure
|
19
|
-
d = create_driver
|
20
|
-
assert_equal
|
21
|
-
assert_equal "1062".to_i, d.instance.port
|
22
|
-
assert_equal 'alert.snmptrap', d.instance.tag
|
17
|
+
d = create_driver
|
18
|
+
assert_equal 'alert.cloudwatch.out', d.instance.tag
|
23
19
|
end
|
24
20
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fluent-plugin-cloudwatch-transform
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ling Zhang
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-03-
|
11
|
+
date: 2015-03-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: fluentd
|