fluent-plugin-newrelic 0.2.6 → 0.2.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/DEVELOPER.md +57 -15
- data/lib/fluent/plugin/out_newrelic.rb +6 -0
- data/lib/newrelic-fluentd-output/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0773cd3e502a6dd497014062c8be8403f514c77bea25616ffd6fbf90fad30287
|
4
|
+
data.tar.gz: 86dbe19317eaf443f5dda768c863dac741ddf78667b36a5f391c9454041334f5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4b0349c68cf61dcf9bd0199d90ab537b7d12a272f506df873795f23c19485302bf1f7fbcdbbc444b091742f70d6cc261281550bd971c803c905dd6d5b41d4707
|
7
|
+
data.tar.gz: 109fd9f8727729ae92ef5702267e195838b358e99d107fdb547d21f5edc42a0c2eacff36a6a9f9ec1e9e34defc4e864a91d9f9ad49b9b1ad01d889e292267699
|
data/DEVELOPER.md
CHANGED
@@ -9,26 +9,68 @@
|
|
9
9
|
* Run tests: `bundle exec rspec`
|
10
10
|
* Build the gem: `gem build newrelic-fluentd-output.gemspec`
|
11
11
|
|
12
|
-
**NOTE**: Be mindful that using `log.info` in the plugin causes an unintended Sorcerer's
|
12
|
+
**NOTE**: Be mindful that using `log.info` in the plugin causes an unintended Sorcerer's
|
13
|
+
Apprentice Syndrome style bug where exponentially larger copies of log messages are sent until the
|
14
|
+
td-agent is unloaded. Super weird, but now you know.
|
13
15
|
|
14
|
-
##
|
15
|
-
|
16
|
+
## Testing on MacOS
|
17
|
+
|
18
|
+
### Install Fluentd
|
19
|
+
* `brew cask install td-agent`
|
20
|
+
|
21
|
+
### Configure Fluentd
|
22
|
+
* `sudo vi /etc/td-agent/td-agent.conf`
|
23
|
+
* Add the following:
|
24
|
+
```
|
25
|
+
<match **>
|
26
|
+
@type newrelic
|
27
|
+
api_key (your-api-key)
|
28
|
+
base_uri https://staging-insights-collector.newrelic.com/logs/v1
|
29
|
+
</match>
|
16
30
|
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
31
|
+
<source>
|
32
|
+
@type tail
|
33
|
+
format none
|
34
|
+
path /usr/local/var/log/test.log
|
35
|
+
tag test
|
36
|
+
</source>
|
37
|
+
```
|
38
|
+
|
39
|
+
### Testing plugin
|
40
|
+
* Stop Fluentd: `sudo launchctl unload /Library/LaunchDaemons/td-agent.plist`
|
41
|
+
* Remove previous version: `sudo /opt/td-agent/usr/sbin/td-agent-gem uninstall fluent-plugin-newrelic`
|
42
|
+
* Add new version: `sudo /opt/td-agent/usr/sbin/td-agent-gem install fluent-plugin-newrelic-<version>.gem`
|
43
|
+
* Start Fluentd: `sudo launchctl load /Library/LaunchDaemons/td-agent.plist`
|
44
|
+
* Make sure things start up OK: `tail -f /var/log/td-agent/td-agent.log`
|
45
|
+
* Cause a change that you've configured Fluentd to pick up: (`echo "FluentdTest" >> /usr/local/var/log/test.log`
|
46
|
+
* Look in `https://staging-one.newrelic.com/launcher/logger.log-launcher` for your log message ("FluentdTest")
|
47
|
+
|
48
|
+
## Pushing changes to the public repo
|
49
|
+
After updating the New Relic repo with changes, changes will need to be pushed to the public GitHub repo
|
50
|
+
at: https://github.com/newrelic/newrelic-fluentd-output
|
21
51
|
|
22
|
-
|
52
|
+
Make sure you have the public set up as a remote called `public`:
|
53
|
+
```
|
54
|
+
git remote add public git@github.com:newrelic/logstash-output-plugin.git
|
55
|
+
```
|
23
56
|
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
57
|
+
Sync:
|
58
|
+
```
|
59
|
+
git checkout --orphan single-commit-for-public-sync && \
|
60
|
+
# Remove things we don't want sent to the public-sync repo \
|
61
|
+
rm grandcentral.yml DEVELOPER.md && \
|
62
|
+
# Create a single commit and force push it, overwriting the remote master \
|
63
|
+
git commit -am "Mirrored commit" && \
|
64
|
+
git push --force public single-commit-for-public-sync:master && \
|
65
|
+
# Clean up \
|
66
|
+
git checkout master && \
|
67
|
+
git branch -D single-commit-for-public-sync
|
68
|
+
```
|
29
69
|
|
30
70
|
# Push changes to RubyGems
|
31
|
-
After updating the source code and gem version in `version.rb`, push the changes to RubyGems.
|
71
|
+
After updating the source code and gem version in `version.rb`, push the changes to RubyGems.
|
72
|
+
Note, you must be a gem owner to publish changes on [RubyGems.org](https://rubygems.org/profiles/NR-LOGGING)
|
32
73
|
|
33
74
|
* Build the gem: `gem build newrelic-fluentd-output.gemspec`
|
34
|
-
* Publish the gem: `gem push
|
75
|
+
* Publish the gem: `gem push fluent-plugin-newrelic-<VERSION>.gem`
|
76
|
+
with the updated version (example: `gem push fluent-plugin-newrelic-0.2.2.gem`)
|
@@ -44,6 +44,12 @@ module Fluent
|
|
44
44
|
|
45
45
|
define_method('log') {$log} unless method_defined?(:log)
|
46
46
|
|
47
|
+
# This tells Fluentd that it can run this output plugin in multiple workers.
|
48
|
+
# Our plugin has no interactions with other processes
|
49
|
+
def multi_workers_ready?
|
50
|
+
true
|
51
|
+
end
|
52
|
+
|
47
53
|
def configure(conf)
|
48
54
|
super
|
49
55
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fluent-plugin-newrelic
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- New Relic Logging Team
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-08-
|
11
|
+
date: 2019-08-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: fluentd
|