logstash-output-newrelic 1.2.2 → 1.3.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '068a9ac838ba356ffc7cc6746933ad3970d5c72df54c6633e1c7453283d700c0'
4
- data.tar.gz: 8f6557b7b8ab66e4d2de7d772cbf470403be8f125d2bb90d371c0af4581ec84e
3
+ metadata.gz: 7f6e7768d78135be1d77a25e79d4db1eacbe23c5d1a31b4c738073672dfb3aa3
4
+ data.tar.gz: 8844275d5c3e3d5200d3a3461050e5f46053a7614582377db4480aca600b780c
5
5
  SHA512:
6
- metadata.gz: c200662a9b6e2157193f9d21c7dadc9562db4ca0245525775742b5518afa73b7db801dc05b506c8a5c4df74e127c7c8e520a684b5a9cf709f29350c09c0b9ebc
7
- data.tar.gz: b6f15e63a3a625fc86c4dc6423b37973a01ae8406f31aa944aac62c3343d7c7dcfb3a7642f54d0464c170b824f59126d5b25b87a459cea1c79f2d14e9fd087ab
6
+ metadata.gz: b71c733f87e3e1ec200b1ee101a9d293a84e20f744fcd8aa2b572b93e0523bda83af67d216d94b90da9c273152874ec832f1e1c7c02250fabee0cafc9b53a315
7
+ data.tar.gz: '0617081a05a7a31f9e5f0469836fd55016f8c7fbe971851ad531c646819898a31dc7303d1aa569be3fbec98f173d39bc60c7d090594c074745f0c72d70a42545'
data/README.md CHANGED
@@ -1,3 +1,5 @@
1
+ [![Community Plus header](https://github.com/newrelic/opensource-website/raw/master/src/images/categories/Community_Plus.png)](https://opensource.newrelic.com/oss-category/#community-plus)
2
+
1
3
  # New Relic Logstash Output Plugin
2
4
 
3
5
  This is a plugin for [Logstash](https://github.com/elastic/logstash) that outputs logs to New Relic.
@@ -65,7 +67,7 @@ When using this plugin in the EU override the base_uri with `https://log-api.eu.
65
67
 
66
68
  ## Testing
67
69
 
68
- An easy way to test the plugin is to make sure Logstash is getting input from a log file you
70
+ An easy way to test the plugin is to make sure Logstash is getting input from a log file you
69
71
  can write to. Something like this in your logstash.conf:
70
72
  ```
71
73
  input {
@@ -77,3 +79,18 @@ input {
77
79
  * Restart Logstash
78
80
  * Append a test log message to your log file: `echo "test message" >> /path/to/your/log/file`
79
81
  * Search New Relic Logs for `"test message"`
82
+
83
+ ## Community
84
+
85
+ New Relic hosts and moderates an online forum where customers can interact with New Relic employees as well as other customers to get help and share best practices. Like all official New Relic open source projects, there's a related Community topic in the New Relic Explorers Hub: [Log forwarding](https://discuss.newrelic.com/tag/log-forwarding)
86
+
87
+ ## A note about vulnerabilities
88
+
89
+ As noted in our [security policy](../../security/policy), New Relic is committed to the privacy and security of our customers and their data. We believe that providing coordinated disclosure by security researchers and engaging with the security community are important means to achieve our security goals.
90
+
91
+ If you believe you have found a security vulnerability in this project or any of New Relic's products or websites, we welcome and greatly appreciate you reporting it to New Relic through [HackerOne](https://hackerone.com/newrelic).
92
+
93
+ If you would like to contribute to this project, review [these guidelines](https://opensource.newrelic.com/code-of-conduct/).
94
+
95
+ ## License
96
+ logstash-output-plugin is licensed under the [Apache 2.0](http://apache.org/licenses/LICENSE-2.0.txt) License.
@@ -23,6 +23,8 @@ class LogStash::Outputs::NewRelic < LogStash::Outputs::Base
23
23
  config :concurrent_requests, :validate => :number, :default => 1
24
24
  config :base_uri, :validate => :string, :default => "https://log-api.newrelic.com/log/v1"
25
25
  config :max_retries, :validate => :number, :default => 3
26
+ # Only used for E2E testing
27
+ config :custom_ca_cert, :validate => :string, :required => false
26
28
 
27
29
  public
28
30
 
@@ -37,7 +39,8 @@ class LogStash::Outputs::NewRelic < LogStash::Outputs::Base
37
39
  }
38
40
  @header = {
39
41
  'X-Event-Source' => 'logs',
40
- 'Content-Encoding' => 'gzip'
42
+ 'Content-Encoding' => 'gzip',
43
+ 'Content-Type' => 'application/json'
41
44
  }.merge(auth).freeze
42
45
  @executor = java.util.concurrent.Executors.newFixedThreadPool(@concurrent_requests)
43
46
  @semaphor = java.util.concurrent.Semaphore.new(@concurrent_requests)
@@ -131,6 +134,12 @@ class LogStash::Outputs::NewRelic < LogStash::Outputs::Base
131
134
  request = Net::HTTP::Post.new(@end_point.request_uri)
132
135
  http.use_ssl = true
133
136
  http.verify_mode = OpenSSL::SSL::VERIFY_PEER
137
+ if !@custom_ca_cert.nil?
138
+ store = OpenSSL::X509::Store.new
139
+ ca_cert = OpenSSL::X509::Certificate.new(File.read(@custom_ca_cert))
140
+ store.add_cert(ca_cert)
141
+ http.cert_store = store
142
+ end
134
143
  @header.each { |k, v| request[k] = v }
135
144
  request.body = payload
136
145
  handle_response(http.request(request))
@@ -1,7 +1,7 @@
1
1
  module LogStash
2
2
  module Outputs
3
3
  module NewRelicVersion
4
- VERSION = "1.2.2"
4
+ VERSION = "1.3.0"
5
5
  end
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logstash-output-newrelic
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.2
4
+ version: 1.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - New Relic Logging Team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-05-18 00:00:00.000000000 Z
11
+ date: 2023-08-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement