Skip to content

Commit 13cf46f

Browse files
committed
Merge remote-tracking branch 'upstream/master' into add-client-configuration-info
2 parents 9dc1048 + e78402f commit 13cf46f

13 files changed

Lines changed: 70 additions & 22 deletions

File tree

.travis.yml

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ before_install: rm -f Gemfile.lock
33
sudo: false
44
cache: bundler
55
rvm:
6-
- 1.9.3
76
- 2.0.0
87
- 2.1.0
8+
- 2.2.3
99
script:
1010
- bundle exec rake spec
1111
- bundle exec rake test
@@ -25,10 +25,6 @@ env:
2525
- PUPPET_VERSION="~> 4.2.1" STRICT_VARIABLES=yes
2626
matrix:
2727
exclude:
28-
# Ruby 1.9.3
29-
- rvm: 1.9.3
30-
env: PUPPET_VERSION="~> 2.7.0"
31-
3228
# Ruby 2.0.0
3329
- rvm: 2.0.0
3430
env: PUPPET_VERSION="~> 2.7.0"
@@ -42,3 +38,13 @@ matrix:
4238
env: PUPPET_VERSION="~> 3.3.0"
4339
- rvm: 2.1.0
4440
env: PUPPET_VERSION="~> 3.4.0"
41+
42+
# Ruby 2.2.3
43+
- rvm: 2.2.3
44+
env: PUPPET_VERSION="~> 2.7.0"
45+
- rvm: 2.2.3
46+
env: PUPPET_VERSION="~> 3.2.0"
47+
- rvm: 2.2.3
48+
env: PUPPET_VERSION="~> 3.3.0"
49+
- rvm: 2.2.3
50+
env: PUPPET_VERSION="~> 3.4.0"

CHANGELOG.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,16 @@
11
Changes
22
=======
33

4+
# 1.7.1 / 2016-06-22
5+
6+
### Notes
7+
8+
* [BUFIX] Fix reversed logic in `hostname_extraction` option.. See [#189][]. (Thanks [@davejrt][]).
9+
* [BUFIX] Fix reporting on PE and POSS. Dogapi gem required in JRuby Env. See [#188][].
10+
* [BUFIX] On ubuntu manifest, agent version should be explicitly configurable. See [#187][].
11+
* [BUFIX] HTTP check, name is a compulsory field. See [#186][].
12+
* [BUFIX] Dogstatsd should be enabled by default. See [#183][].
13+
414
# 1.7.0 / 2016-04-12
515

616
### Notes
@@ -150,6 +160,11 @@ Changes
150160
[#174]: https://github.com/DataDog/puppet-datadog-agent/issues/174
151161
[#175]: https://github.com/DataDog/puppet-datadog-agent/issues/175
152162
[#176]: https://github.com/DataDog/puppet-datadog-agent/issues/176
163+
[#183]: https://github.com/DataDog/puppet-datadog-agent/pull/183
164+
[#186]: https://github.com/DataDog/puppet-datadog-agent/pull/186
165+
[#187]: https://github.com/DataDog/puppet-datadog-agent/pull/187
166+
[#188]: https://github.com/DataDog/puppet-datadog-agent/pull/188
167+
[#189]: https://github.com/DataDog/puppet-datadog-agent/pull/189
153168
[@BIAndrews]: https://github.com/BIAndrews
154169
[@LeoCavaille]: https://github.com/LeoCavaille
155170
[@MartinDelta]: https://github.com/MartinDelta
@@ -167,3 +182,4 @@ Changes
167182
[@obowersa]: https://github.com/obowersa
168183
[@rtyler]: https://github.com/rtyler
169184
[@tuxinaut]: https://github.com/tuxinaut
185+
[@davejrt]: https://github.com/davejrt

Gemfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
source "https://rubygems.org"
22

33
group :test do
4+
gem "syck"
5+
gem "safe_yaml", "~> 1.0.4"
6+
gem "listen", "~> 3.0.0"
47
gem "puppet", ENV['PUPPET_VERSION'] || '~> 4.2.0'
58
gem "puppet-lint"
69
gem "puppet-syntax"

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,8 @@ that needs to be done.
5959
puppet_run_reports => true,
6060
}
6161

62-
__To support reporting, your Puppet master needs to have the [dogapi](https://github.com/DataDog/dogapi-rb) gem installed, to do that either run the puppet agent on your master with this configuration or install it manually with `gem`__
62+
__To support reporting, your Puppet master needs to have the [dogapi](https://github.com/DataDog/dogapi-rb) gem installed, to do that either run the puppet agent on your master with this configuration or install it manually with `gem`.__
63+
_Please note if on Puppet Enterprise or POSS (ie. >=3.7.0) there is a soft dependency for reporting on the `puppetserver_gem` module. Install with `puppet module install puppetlabs-puppetserver_gem` - installing manually with `gem` will *not* work._
6364

6465
3. Include any other integrations you want the agent to use, e.g.
6566

@@ -97,6 +98,7 @@ And on all of your Puppet client nodes add:
9798
# ...
9899
report=true
99100

101+
100102
If you get
101103

102104
err: Could not send report:

manifests/init.pp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@
104104
# String. Default: empty
105105
# $use_dogstatsd
106106
# Enables the dogstatsd server
107-
# Boolean. Default: false
107+
# Boolean. Default: true
108108
# $dogstatsd_port
109109
# Specifies the port to be used by dogstatsd. Must have use_dogstatsd set
110110
# String. Default: empty
@@ -216,7 +216,7 @@
216216
$pup_port = '',
217217
$pup_interface = '',
218218
$pup_url = '',
219-
$use_dogstatsd = false,
219+
$use_dogstatsd = true,
220220
$dogstatsd_target = '',
221221
$dogstatsd_interval = '',
222222
$dogstatsd_normalize = true,

manifests/integrations/http_check.pp

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,16 +52,19 @@
5252
# Sample Usage:
5353
#
5454
# class { 'datadog_agent::integrations::http_check':
55-
# url => 'http://www.google.com/',
55+
# sitename => 'google',
56+
# url => 'http://www.google.com/',
5657
# }
5758
#
5859
# class { 'datadog_agent::integrations::http_check':
59-
# url => 'http://localhost/',
60-
# headers => ['Host: stan.borbat.com', 'DNT: true'],
61-
# tags => ['production', 'wordpress'],
60+
# sitename => 'local',
61+
# url => 'http://localhost/',
62+
# headers => ['Host: stan.borbat.com', 'DNT: true'],
63+
# tags => ['production', 'wordpress'],
6264
# }
6365
#
6466
# class { 'datadog_agent::integrations::http_check':
67+
# sitename => 'localhost-9001',
6568
# url => 'http://localhost:9001/',
6669
# timeout => 5,
6770
# threshold => 1,
@@ -74,6 +77,7 @@
7477
#
7578
#
7679
class datadog_agent::integrations::http_check (
80+
$sitename = undef,
7781
$url = undef,
7882
$username = undef,
7983
$password = undef,
@@ -92,6 +96,7 @@
9296

9397
if !$instances and $url {
9498
$_instances = [{
99+
'sitename' => $sitename,
95100
'url' => $url,
96101
'username' => $username,
97102
'password' => $password,

manifests/reports.pp

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,14 @@
2121

2222
include datadog_agent::params
2323
$rubydev_package = $datadog_agent::params::rubydev_package
24+
$gemprovider = 'puppetserver_gem'
25+
26+
# set the right provider
27+
if (!defined('$::serverversion') or versioncmp($::serverversion, '3.7.0') < 0) {
28+
$_gemprovider = 'gem'
29+
} else {
30+
$_gemprovider = $gemprovider
31+
}
2432

2533
# check to make sure that you're not installing rubydev somewhere else
2634
if ! defined(Package[$rubydev_package]) {
@@ -48,7 +56,7 @@
4856

4957
package{'dogapi':
5058
ensure => 'installed',
51-
provider => 'gem',
59+
provider => $_gemprovider,
5260
}
5361

5462
}

manifests/ubuntu.pp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111
# Sample Usage:
1212
#
1313
class datadog_agent::ubuntu(
14-
$apt_key = 'C7A7DA52'
14+
$apt_key = 'C7A7DA52',
15+
$agent_version = 'latest'
1516
) {
1617

1718
ensure_packages(['apt-transport-https'])
@@ -43,7 +44,7 @@
4344
}
4445

4546
package { 'datadog-agent':
46-
ensure => latest,
47+
ensure => $agent_version,
4748
require => [File['/etc/apt/sources.list.d/datadog.list'],
4849
Exec['datadog_apt-get_update']],
4950
}

metadata.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "datadog-datadog_agent",
3-
"version": "1.7.0",
3+
"version": "1.7.1",
44
"author": "James Turnbull (<james@lovedthanlost.net>) and Rob Terhaar (<rob@atlanticdynamic>) for Datadog Inc.",
55
"summary": "Install the Datadog monitoring agent and report Puppet runs to Datadog",
66
"license": "Apache License, Version 2.0",

spec/classes/datadog_agent_integrations_http_check_spec.rb

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
it { should contain_file(conf_file).that_notifies("Service[#{dd_service}]") }
2222

2323
context 'with default parameters' do
24+
it { should contain_file(conf_file).without_content(%r{name: }) }
2425
it { should contain_file(conf_file).without_content(%r{url: }) }
2526
it { should contain_file(conf_file).without_content(%r{username: }) }
2627
it { should contain_file(conf_file).without_content(%r{password: }) }
@@ -36,6 +37,7 @@
3637

3738
context 'with parameters set' do
3839
let(:params) {{
40+
sitename: 'foo.bar.baz',
3941
url: 'http://foo.bar.baz:4096',
4042
username: 'foouser',
4143
password: 'barpassword',
@@ -47,6 +49,7 @@
4749
disable_ssl_validation: true,
4850
}}
4951

52+
it { should contain_file(conf_file).with_content(%r{name: foo.bar.baz}) }
5053
it { should contain_file(conf_file).with_content(%r{url: http://foo.bar.baz:4096}) }
5154
it { should contain_file(conf_file).with_content(%r{username: foouser}) }
5255
it { should contain_file(conf_file).with_content(%r{password: barpassword}) }
@@ -60,6 +63,7 @@
6063

6164
context 'with headers parameter array' do
6265
let(:params) {{
66+
sitename: 'foo.bar.baz',
6367
url: 'http://foo.bar.baz:4096',
6468
headers: %w{ foo bar baz },
6569
}}
@@ -69,6 +73,7 @@
6973
context 'with headers parameter empty values' do
7074
context 'mixed in with other headers' do
7175
let(:params) {{
76+
sitename: 'foo.bar.baz',
7277
url: 'http://foo.bar.baz:4096',
7378
headers: [ 'foo', '', 'baz' ]
7479
}}
@@ -96,6 +101,7 @@
96101

97102
context 'with tags parameter array' do
98103
let(:params) {{
104+
sitename: 'foo.bar.baz',
99105
url: 'http://foo.bar.baz:4096',
100106
tags: %w{ foo bar baz },
101107
}}
@@ -105,6 +111,7 @@
105111
context 'with tags parameter empty values' do
106112
context 'mixed in with other tags' do
107113
let(:params) {{
114+
sitename: 'foo.bar.baz',
108115
url: 'http://foo.bar.baz:4096',
109116
tags: [ 'foo', '', 'baz' ]
110117
}}

0 commit comments

Comments
 (0)