fluent-plugin-datadog 0.9.6 → 0.10.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
  SHA1:
3
- metadata.gz: 9d97d73d14d2207da6a62a845c1085d64d9b86d9
4
- data.tar.gz: c2556c7eb295bda3c3e1cc428571dd068c28e458
3
+ metadata.gz: 64fc3410e04ef9d313059b2f93efdbd89ef0290c
4
+ data.tar.gz: '0962e805a36d1ffcf9910db5ee46757a418f3e54'
5
5
  SHA512:
6
- metadata.gz: 010af82ee44ec20f858d4d53dc46c02cb25a9412de4b869641dbd201075832f79df300ed3571b8908a9ad20754a5275090a7642294c9183a1e923226f6fb4a37
7
- data.tar.gz: f7b8ded303650fbac32cb98858daa6129623a9e47c1dc165fa30e2b480147c8b079fc578e32e618a0740bba33f4869f3a396953537ef8096be96a3172cad1ac5
6
+ metadata.gz: 94e21de6fc0be2fc23ec22f2836faabc25b5cee008b4b3ec83e17e0a1d12744deeb931bbc2c84260e512de11bf6e438656063830260c8fa8b55d60f54784aafc
7
+ data.tar.gz: 065dbe1169ffff05fbe4044aee9886c44713a1be81ea79bc2c0764fb95cc5d9f696212eba2755e122ce440f0965a8bc517265210acd7c73f8779faa7cb2d2672
data/.gitignore CHANGED
@@ -39,3 +39,6 @@ build/
39
39
  foo/
40
40
  *.iml
41
41
  .idea/
42
+
43
+ fluent/
44
+ Gemfile.lock
data/README.md CHANGED
@@ -33,6 +33,11 @@ TCP example
33
33
  include_tag_key true
34
34
  tag_key 'tag'
35
35
 
36
+ # Optional tags
37
+ dd_sourcecategory 'aws'
38
+ dd_source 'rds'
39
+ dd_tags 'app:mysql,env:prod'
40
+
36
41
  </match>
37
42
  ```
38
43
 
@@ -65,5 +70,9 @@ As fluent-plugin-datadog is an output_buffer, you can set all output_buffer prop
65
70
  | **use_json**| Event format, if true, the event is sent in json format. Othwerwise, in plain text. | true |
66
71
  | **include_tag_key**| Automatically include tags in the record. | false |
67
72
  | **tag_key**| Name of the tag attribute, if they are included. | "tag" |
68
- | **use_ssl** | If true, the agent initializes a secure connection to Datadog. In clear TCP otherwise. | false |
73
+ | **use_ssl** | If true, the agent initializes a secure connection to Datadog. In clear TCP otherwise. | true |
69
74
  |**max_retries**| The number of retries before the output plugin stops. Set to -1 for unlimited retries | -1 |
75
+ | **max_retries** | The number of retries before the output plugin stops. Set to -1 for unlimited retries | -1 |
76
+ | **dd_source** | This tells Datadog what integration it is | nil |
77
+ | **dd_sourcecategory** | Multiple value attribute. Can be used to refine the source attribtue | nil |
78
+ | **dd_tags** | Custom tags with the following format "key1:value1, key2:value2" | nil |
@@ -9,12 +9,12 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
9
9
 
10
10
  Gem::Specification.new do |spec|
11
11
  spec.name = "fluent-plugin-datadog"
12
- spec.version = "0.9.6"
12
+ spec.version = "0.10.0"
13
13
  spec.authors = ["Datadog Solutions Team"]
14
14
  spec.email = ["support@datadoghq.com"]
15
15
  spec.summary = "Datadog output plugin for Fluent event collector"
16
16
  spec.homepage = "http://datadoghq.com"
17
- spec.license = "Apache-2.0"
17
+ spec.license = "Apache License 2.0"
18
18
 
19
19
  spec.files = [".gitignore", "Gemfile", "LICENSE", "README.md", "Rakefile", "fluent-plugin-datadog.gemspec", "lib/fluent/plugin/out_datadog.rb"]
20
20
  spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
@@ -13,13 +13,16 @@ class Fluent::DatadogOutput < Fluent::BufferedOutput
13
13
  # Register the plugin
14
14
  Fluent::Plugin.register_output('datadog', self)
15
15
  # Output settings
16
- config_param :use_json, :bool, :default => true
17
- config_param :include_tag_key,:bool, :default => false
18
- config_param :tag_key, :string, :default => 'tag'
16
+ config_param :use_json, :bool, :default => true
17
+ config_param :include_tag_key, :bool, :default => false
18
+ config_param :tag_key, :string, :default => 'tag'
19
+ config_param :dd_sourcecategory, :string
20
+ config_param :dd_source, :string
21
+ config_param :dd_tags, :string
19
22
 
20
23
  # Connection settings
21
24
  config_param :host, :string, :default => 'intake.logs.datadoghq.com'
22
- config_param :use_ssl, :bool, :default => false
25
+ config_param :use_ssl, :bool, :default => true
23
26
  config_param :port, :integer, :default => 10514
24
27
  config_param :ssl_port, :integer, :default => 10516
25
28
  config_param :max_retries, :integer, :default => -1
@@ -108,9 +111,19 @@ class Fluent::DatadogOutput < Fluent::BufferedOutput
108
111
  log.trace "Datadog plugin: received chunck: #{chunk}"
109
112
  chunk.msgpack_each do |tag, record|
110
113
  next unless record.is_a? Hash
114
+ next if record.empty?
111
115
 
112
116
  log.trace "Datadog plugin: received record: #{record}"
113
117
 
118
+ if @dd_sourcecategory
119
+ record["ddsourcecategory"] = @dd_sourcecategory
120
+ end
121
+ if @dd_source
122
+ record["ddsource"] = @dd_source
123
+ end
124
+ if @dd_tags
125
+ record["ddtags"] = @dd_tags
126
+ end
114
127
  if @include_tag_key
115
128
  record[@tag_key] = tag
116
129
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluent-plugin-datadog
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.6
4
+ version: 0.10.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Datadog Solutions Team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-10-26 00:00:00.000000000 Z
11
+ date: 2018-05-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -68,7 +68,7 @@ files:
68
68
  - lib/fluent/plugin/out_datadog.rb
69
69
  homepage: http://datadoghq.com
70
70
  licenses:
71
- - Apache-2.0
71
+ - Apache License 2.0
72
72
  metadata: {}
73
73
  post_install_message:
74
74
  rdoc_options: []
@@ -86,7 +86,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
86
86
  version: '0'
87
87
  requirements: []
88
88
  rubyforge_project:
89
- rubygems_version: 2.6.13
89
+ rubygems_version: 2.6.14
90
90
  signing_key:
91
91
  specification_version: 4
92
92
  summary: Datadog output plugin for Fluent event collector