fluent-plugin-cloud-feeds 1.2.0 → 1.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/README.md +84 -2
- data/fluent-plugin-cloud-feeds.gemspec +2 -2
- data/lib/fluent/plugin/out_rackspace_cloud_feeds.rb +1 -1
- data/spec/feeds_output_spec.rb +1 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
YzI2Njg3NGJhNzJkOWQwZjdjOWNiZjIyMWNiYjUzMTdkNmQyN2Q2OA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
ZTc0MWM2NDQ0NWRjMGU5YTE3Yzg2ZDhiM2M1NTZkMzRkMzI3NDMxMQ==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
MWE1NmUxNWFhNDFiY2FiZTllZTM5OTEwNTBmODhiNGQ4MWJlZTFjOTgxYWQ1
|
10
|
+
NmZkNzY2ZTkwYWQxZWViMWM5OTY3N2JiNTAyOTc3OGVkY2RjOTE5OWE2NTU5
|
11
|
+
ZTM5MjNmZjcwZTM2NDk2NTE0NTA5M2NmMjc3ZDQxN2ZlZDlhYWI=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
MjFiOWZmZmY4YjAyODRkMzVmYWJlMzNmNmVmZDY3ZDA5Mzk1MDZjNmFkNjc2
|
14
|
+
MmE0NjY3M2UxNzllMjhjZmZjZWE4OTE3ZTkwY2QwZjgxMmUwZTdlZTcxNDI4
|
15
|
+
MzMwYjhkNTE1MTRiNDAxZWFlNzAyOGRmZWExNjQ3NThjZDU3YjY=
|
data/README.md
CHANGED
@@ -1,2 +1,84 @@
|
|
1
|
-
#
|
2
|
-
|
1
|
+
# Fluentd output plugin to Rackspace cloud feeds
|
2
|
+
|
3
|
+
This plugin mirrors functionality in the [cf-flume-sink](https://github.com/rackerlabs/cf-flume-sink/tree/master/cf-sink)
|
4
|
+
except for [fluentd](www.fluentd.org) instead of flume.
|
5
|
+
|
6
|
+
## Configuration
|
7
|
+
|
8
|
+
It is highly recommended to use this plugin with the [bufferize plugin](https://github.com/sabottenda/fluent-plugin-bufferize).
|
9
|
+
This plugin has been designed to fail in a way that allows the bufferize plugin to properly retry.
|
10
|
+
|
11
|
+
### Fluentd configuration for this plugin
|
12
|
+
|
13
|
+
```
|
14
|
+
type rackspace_cloud_feeds
|
15
|
+
identity_endpoint http://identity.com/post/for/token
|
16
|
+
identity_username username
|
17
|
+
identity_password teh_password
|
18
|
+
feeds_endpoint http://feed.com/endpoint/of/feed
|
19
|
+
```
|
20
|
+
|
21
|
+
* **type** Needs to be rackspace_cloud_feeds for fluentd to recognize the plugin
|
22
|
+
* **identity_endpoint** The url to authenticate with identity
|
23
|
+
* **identity_username** The username to use during posting to get a token
|
24
|
+
* **identity_password** The password component of getting a token
|
25
|
+
* **feeds_endpoint** The endpoint of the authenticated feed to post events to
|
26
|
+
|
27
|
+
### log4j2 logging configuration
|
28
|
+
|
29
|
+
This example configuration assumes that you're using the Repose [HERP filter](https://repose.atlassian.net/wiki/display/REPOSE/Highly+Efficient+Record+Processor+%28HERP%29+filter), as this is the primary purpose for building this output plugin.
|
30
|
+
|
31
|
+
|
32
|
+
```xml
|
33
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
34
|
+
<Configuration packages="org.openrepose.commons.utils.xslt">
|
35
|
+
<Appenders>
|
36
|
+
<RollingFile name="UserAccessEventLog" fileName="/var/log/repose-uae.log"
|
37
|
+
filePattern="logs/$${date:yyyy-MM}/app-%d{MM-dd-yyyy}-%i.log.gz">
|
38
|
+
<PatternLayout pattern="%m%n"/>
|
39
|
+
<Policies>
|
40
|
+
<TimeBasedTriggeringPolicy />
|
41
|
+
<SizeBasedTriggeringPolicy size="250 MB"/>
|
42
|
+
</Policies>
|
43
|
+
</RollingFile>
|
44
|
+
</Appenders>
|
45
|
+
<Loggers>
|
46
|
+
<Logger name="highly-efficient-record-processor-post-Logger" level="trace">
|
47
|
+
<AppenderRef ref="UserAccessEventLog"/>
|
48
|
+
</Logger>
|
49
|
+
</Loggers>
|
50
|
+
</Configuration>
|
51
|
+
```
|
52
|
+
|
53
|
+
This will ensure that the output log lines from Repose are one JSON per line so that the fluentd can consume them.
|
54
|
+
|
55
|
+
### Naieve sample configuration for fluentd
|
56
|
+
|
57
|
+
This is a very naieve configuration for fluentd that can be extended upon to configure fluentd to pull in
|
58
|
+
entries from the repose log and send them out the cloud-feeds fluent plugin through the bufferize plugin.
|
59
|
+
|
60
|
+
```
|
61
|
+
<source>
|
62
|
+
type tail
|
63
|
+
path /var/log/repose-uae.log
|
64
|
+
pos_file /var/log/repose-uae.log
|
65
|
+
format none
|
66
|
+
tag repose
|
67
|
+
</source>
|
68
|
+
|
69
|
+
<match repose*>
|
70
|
+
type bufferize
|
71
|
+
buffer_type file
|
72
|
+
buffer_path /tmp/repose.*.buffer
|
73
|
+
<config>
|
74
|
+
type rackspace_cloud_feeds
|
75
|
+
identity_endpoint http://localhost:8080/tokens
|
76
|
+
identity_username lolol
|
77
|
+
identity_password butts
|
78
|
+
feeds_endpoint http://localhost:8081/feed
|
79
|
+
</config>
|
80
|
+
</match>
|
81
|
+
```
|
82
|
+
|
83
|
+
There are many options with the bufferize plugin, be sure to read the documentation for bufferize and
|
84
|
+
fluentd to ensure that the stuff is set up properly for your environment.
|
@@ -2,7 +2,7 @@ $:.push File.expand_path("../lib", __FILE__)
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = "fluent-plugin-cloud-feeds"
|
5
|
-
s.version = "1.
|
5
|
+
s.version = "1.3.0"
|
6
6
|
s.authors = ["David Kowis", "Tyler Royal"]
|
7
7
|
s.email= ["david.kowis@rackspace.com", "tyler.royal@rackspace.com"]
|
8
8
|
s.homepage = "https://github.com/rackerlabs/fluent-plugin-cloud-feeds"
|
@@ -27,4 +27,4 @@ Gem::Specification.new do |s|
|
|
27
27
|
s.add_development_dependency('rspec', '3.2.0')
|
28
28
|
s.add_development_dependency('webmock', '1.21.0')
|
29
29
|
s.add_development_dependency('simplecov', '0.10.0')
|
30
|
-
end
|
30
|
+
end
|
@@ -99,7 +99,7 @@ class Fluent::RackspaceCloudFeedsOutput < Fluent::Output
|
|
99
99
|
<title type="text">User Access Event</title>
|
100
100
|
<author><name>Repose</name></author>
|
101
101
|
<updated>#{now}</updated>
|
102
|
-
<content type="
|
102
|
+
<content type="application/xml">#{content}</content>
|
103
103
|
</entry>
|
104
104
|
EOF
|
105
105
|
end
|
data/spec/feeds_output_spec.rb
CHANGED
@@ -59,6 +59,7 @@ EOF
|
|
59
59
|
expect(REXML::XPath.first(doc, "/entry/author/name").text).to eq("Repose")
|
60
60
|
expect(REXML::XPath.first(doc, "/entry/updated").text).to match(/\d\d\d\d-\d\d-\d\dT\d\d:\d\d:\d\d.\d\d\dZ/)
|
61
61
|
expect(REXML::XPath.first(doc, "/entry/content").text).to eq(content)
|
62
|
+
expect(REXML::XPath.first(doc, "/entry/content/@type").value).to eq("application/xml")
|
62
63
|
end
|
63
64
|
|
64
65
|
def print_logs
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fluent-plugin-cloud-feeds
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Kowis
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2015-
|
12
|
+
date: 2015-05-11 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: net-http-persistent
|