logstash-output-datadog_metrics 3.0.5 → 3.0.7
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 +4 -4
- data/CHANGELOG.md +6 -0
- data/docs/index.asciidoc +9 -0
- data/lib/logstash/outputs/datadog_metrics.rb +6 -4
- data/logstash-output-datadog_metrics.gemspec +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7b1f4976cd83d20919b6294912d7e80e7edc0a52534ce8bf51445f5539466813
|
4
|
+
data.tar.gz: 90692a97f4f02429603a6f0b1c6d7c0532ad88b467857a17a644e1a1809ad561
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 14a7719eaca2645a630b8d6039053ab2b63038ab53f0a1d2caa2244729be8ba276796a7b41c9e02e8380571d53ba97a57bc90f6cbfb8312a72973cbc0bc4632f
|
7
|
+
data.tar.gz: ad997bd39bee68a19a63c98d475687d5fa6b9619f9732c6ed9a7aeeb4717076b96848983af916b783a5d0fd2ff0c545aa76c2d0fb3f4432575d86fb20195e183
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,9 @@
|
|
1
|
+
## 3.0.7
|
2
|
+
- move every message logging to debug [#11](https://github.com/logstash-plugins/logstash-output-datadog_metrics/pull/11)
|
3
|
+
|
4
|
+
## 3.0.6
|
5
|
+
- Add `api_url` config option to allow usage in different regions [#13](https://github.com/logstash-plugins/logstash-output-datadog_metrics/pull/13)
|
6
|
+
|
1
7
|
## 3.0.5
|
2
8
|
- Change `api_key` config type to `password` to prevent leaking in debug logs [#18](https://github.com/logstash-plugins/logstash-output-datadog_metrics/pull/18)
|
3
9
|
|
data/docs/index.asciidoc
CHANGED
@@ -35,6 +35,7 @@ This plugin supports the following configuration options plus the <<plugins-{typ
|
|
35
35
|
|=======================================================================
|
36
36
|
|Setting |Input type|Required
|
37
37
|
| <<plugins-{type}s-{plugin}-api_key>> |<<password,password>>|Yes
|
38
|
+
| <<plugins-{type}s-{plugin}-api_url>> |<<string,string>>|No
|
38
39
|
| <<plugins-{type}s-{plugin}-dd_tags>> |<<array,array>>|No
|
39
40
|
| <<plugins-{type}s-{plugin}-device>> |<<string,string>>|No
|
40
41
|
| <<plugins-{type}s-{plugin}-host>> |<<string,string>>|No
|
@@ -59,6 +60,14 @@ output plugins.
|
|
59
60
|
|
60
61
|
Your DatadogHQ API key. https://app.datadoghq.com/account/settings#api
|
61
62
|
|
63
|
+
[id="plugins-{type}s-{plugin}-api_url"]
|
64
|
+
===== `api_url`
|
65
|
+
|
66
|
+
* Value type is <<string,string>>
|
67
|
+
* Default value is `"https://api.datadoghq.com/api/v1/series"`
|
68
|
+
|
69
|
+
Set the api endpoint for Datadog EU Site users
|
70
|
+
|
62
71
|
[id="plugins-{type}s-{plugin}-dd_tags"]
|
63
72
|
===== `dd_tags`
|
64
73
|
|
@@ -45,14 +45,16 @@ module LogStash module Outputs class DatadogMetrics < LogStash::Outputs::Base
|
|
45
45
|
# How often (in seconds) to flush queued events to Datadog
|
46
46
|
config :timeframe, :validate => :number, :default => 10
|
47
47
|
|
48
|
+
# api endpoint may vary for EU customers
|
49
|
+
config :api_url, :validate => :string, :default => "https://api.datadoghq.com/api/v1/series"
|
50
|
+
|
48
51
|
public
|
49
52
|
|
50
53
|
def register
|
51
54
|
require "net/https"
|
52
55
|
require "uri"
|
53
56
|
|
54
|
-
@
|
55
|
-
@uri = URI.parse(@url)
|
57
|
+
@uri = URI.parse(@api_url)
|
56
58
|
@client = Net::HTTP.new(@uri.host, @uri.port)
|
57
59
|
@client.use_ssl = true
|
58
60
|
@client.verify_mode = OpenSSL::SSL::VERIFY_NONE
|
@@ -83,7 +85,7 @@ module LogStash module Outputs class DatadogMetrics < LogStash::Outputs::Base
|
|
83
85
|
end
|
84
86
|
dd_metrics['tags'] = tagz if tagz
|
85
87
|
|
86
|
-
@logger.
|
88
|
+
@logger.debug("Queueing event", :event => dd_metrics)
|
87
89
|
buffer_receive(dd_metrics)
|
88
90
|
end # def receive
|
89
91
|
|
@@ -98,7 +100,7 @@ module LogStash module Outputs class DatadogMetrics < LogStash::Outputs::Base
|
|
98
100
|
request.body = series_to_json(dd_series)
|
99
101
|
request.add_field("Content-Type", 'application/json')
|
100
102
|
response = @client.request(request)
|
101
|
-
@logger.
|
103
|
+
@logger.debug("DD convo", :request => request.inspect, :response => response.inspect)
|
102
104
|
raise unless response.code == '202'
|
103
105
|
rescue Exception => e
|
104
106
|
@logger.warn("Unhandled exception", :request => request.inspect, :response => response.inspect, :exception => e.inspect)
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = 'logstash-output-datadog_metrics'
|
3
|
-
s.version = '3.0.
|
3
|
+
s.version = '3.0.7'
|
4
4
|
s.licenses = ['Apache License (2.0)']
|
5
5
|
s.summary = "Sends metrics to DataDogHQ based on Logstash events"
|
6
6
|
s.description = "This gem is a Logstash plugin required to be installed on top of the Logstash core pipeline using $LS_HOME/bin/logstash-plugin install gemname. This gem is not a stand-alone program"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: logstash-output-datadog_metrics
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
4
|
+
version: 3.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Elastic
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-10-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|
@@ -20,8 +20,8 @@ dependencies:
|
|
20
20
|
- !ruby/object:Gem::Version
|
21
21
|
version: '2.99'
|
22
22
|
name: logstash-core-plugin-api
|
23
|
-
prerelease: false
|
24
23
|
type: :runtime
|
24
|
+
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
26
26
|
requirements:
|
27
27
|
- - ">="
|
@@ -37,8 +37,8 @@ dependencies:
|
|
37
37
|
- !ruby/object:Gem::Version
|
38
38
|
version: '0'
|
39
39
|
name: logstash-codec-plain
|
40
|
-
prerelease: false
|
41
40
|
type: :runtime
|
41
|
+
prerelease: false
|
42
42
|
version_requirements: !ruby/object:Gem::Requirement
|
43
43
|
requirements:
|
44
44
|
- - ">="
|
@@ -51,8 +51,8 @@ dependencies:
|
|
51
51
|
- !ruby/object:Gem::Version
|
52
52
|
version: '0'
|
53
53
|
name: logstash-devutils
|
54
|
-
prerelease: false
|
55
54
|
type: :development
|
55
|
+
prerelease: false
|
56
56
|
version_requirements: !ruby/object:Gem::Requirement
|
57
57
|
requirements:
|
58
58
|
- - ">="
|
@@ -97,7 +97,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
97
97
|
- !ruby/object:Gem::Version
|
98
98
|
version: '0'
|
99
99
|
requirements: []
|
100
|
-
rubygems_version: 3.
|
100
|
+
rubygems_version: 3.3.26
|
101
101
|
signing_key:
|
102
102
|
specification_version: 4
|
103
103
|
summary: Sends metrics to DataDogHQ based on Logstash events
|