Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pre-Release 1.7.0 PR #176

Merged
merged 49 commits into from
Apr 13, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
07fff5e
Additional Mongo configuration for SSL, additional metrics, and datab…
bflad Jan 24, 2016
2da6d09
Allow multiple instances in the http_check.
jniesen Dec 18, 2015
3b57953
Move the GPGkey to a parameter.
davidgibbons Jan 14, 2016
dd331e3
Decouple the yum repo definition from the package.
bjjsre Feb 4, 2016
6b50a61
added support for apache integration disable_ssl_validation
BIAndrews Mar 15, 2016
15ef377
add consul
Dec 3, 2015
54c46d1
[spec] fixing rake spec issue.
truthbk Apr 7, 2016
f3f846b
add option in datadog_agent to extract hostnames
LeoCavaille Mar 30, 2016
e5e9b8a
fix mesos with new checks
flyinprogrammer Apr 5, 2016
e05b0b1
[spec] fixing spec for hostname_extraction_regex in Reports.
truthbk Apr 7, 2016
43fe1b4
[http_check] fixing variable reassignment, and template.
truthbk Apr 7, 2016
ad64a96
Expanded datadog.conf.erb to parametize additional options. Spec test…
Mar 30, 2015
5dc07be
[spec] fixing spec issues, inconsistencies.
truthbk Apr 8, 2016
7bc1cc2
support multiple ports for a single host
fzwart Feb 18, 2016
3f3f15b
[redis] making backward compatible by keeping port parameter.
truthbk Apr 8, 2016
0ea5310
[datadog.conf] use_mount is deprecated, removing.
truthbk Apr 8, 2016
3aa17e7
Add manifest for the pgbouncer integration
mcasper Apr 8, 2016
a2ae842
[release] updating CHANGELOG.md
truthbk Apr 12, 2016
117d27a
[release] bumping version metadata.
truthbk Apr 12, 2016
23eb8b2
add option in datadog_agent to extract hostnames (fixes)
LeoCavaille Mar 30, 2016
948b247
adds tests for apache integration
kitchen Nov 16, 2015
18e012b
removed empty context
kitchen Nov 16, 2015
ceff1ad
adds test for docker integration
kitchen Nov 16, 2015
02e28ed
adds tests for elasticsearch integration
kitchen Nov 16, 2015
aa2ee89
adds tests for haproxy integration
kitchen Nov 16, 2015
8eb8a34
adds tests for http check integration
kitchen Nov 17, 2015
7610709
adds tests for jenkins integration
kitchen Nov 17, 2015
f02af0b
adds tests for marathon integration
kitchen Nov 17, 2015
54a5bf2
adds test for mesos integration
kitchen Nov 17, 2015
3552834
adds tests for mongo integration
kitchen Nov 17, 2015
ee7b98e
adds tests for mysql integration
kitchen Nov 17, 2015
f3e4a06
adds tests for nginx integration
kitchen Nov 17, 2015
a19bfe3
adds tests for ntp integration
kitchen Nov 17, 2015
f925121
adds a skipped test for missing functionality in http_check
kitchen Nov 17, 2015
88e9620
adds tests for postgres integration
kitchen Nov 17, 2015
ba92ad1
adds tests for process integration
kitchen Nov 17, 2015
1ae02d4
adds tests for rabbitmq integration
kitchen Nov 17, 2015
92a2963
adds tests for redis integration
kitchen Nov 18, 2015
5e248c9
adds tests for solr integration
kitchen Nov 18, 2015
c04da90
adds tests for tomcat integration
kitchen Nov 18, 2015
c46f6e2
adds tests for varnish integration
kitchen Nov 18, 2015
c17687a
adds tests for zookeeper integration
kitchen Nov 18, 2015
9680294
[docker_daemon] removing bad parameter new_tag_names.
truthbk Apr 12, 2016
fb63bf5
[docker_daemon] removing bad parameter new_tag_names.
truthbk Apr 12, 2016
2474085
[docker_daemon] renaming spec to docker_daemon, fixing test.
truthbk Apr 12, 2016
9a77fef
[mesos] renaming mesos to mesos_master.
truthbk Apr 12, 2016
c34121d
[spec] fixing tests
truthbk Apr 12, 2016
5f19f8f
[http_check] fixing spec test for older puppets.
truthbk Apr 12, 2016
f5464fe
[changelog] updating.
truthbk Apr 13, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 48 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,31 @@
Changes
=======

# 1.7.0 / 2016-04-12

### Notes

* [FEATURE] Added manifest for PGBouncer. See [#175][]. (Thanks [@mcasper][]).
* [FEATURE] Added manifest for Consul. See [#174][]. (Thanks [@flyinprogrammer][]).
* [FEATURE] Added mesos master and slave manifests for individual management. See [#174][]. (Thanks [@flyinprogrammer][] and [@jangie][]).
* [FEATURE] Added option to extract the hostname from puppet hostname strings with a regex capture group. See [#173][]. (Thanks [@LeoCavaille][]).
* [FEATURE] Added support on multiple ports per host on Redis integration. See [#169][]. (Thanks [@fzwart][]).
* [FEATURE] Added support for `disable_ssl_validation` on Apache integration. See[#171. (Thanks [@BIAndrews][]).
* [FEATURE] Added support for SSL, additional metrics and database connection in Mongo integration. See [#164][]. (Thanks [@bflad][]).
* [FEATURE] Added support for multiple instance in HTTP check. See [#155][]. (Thanks [@bfla][]d].
* [FEATURE] Added support for multiple new datadog.conf directives. See [#79][]. (Thanks [@obowersa][]).
* [FEATURE] Decouple yum repo from agent package. See [#168][]. (Thanks [@b2jrock][]).

* [IMPROVEMENT] Moved GPG key to its own parameter. See [#158][]. (Thanks [@davidgibbons][]).

* [BUFIX] Updated docker to use more current `docker_daemon`. See [#174][]. (Thanks [@flyinprogrammer][] and [@jangie][]).

* [DEPRECATE] Deprecated old docker manifest. See [#174][]. (Thanks [@flyinprogrammer][]).
* [DEPRECATE] Deprecated `new_tag_names` in `docker_daemon` manifest. See [#174][]. (Thanks [@flyinprogrammer][]).
* [DEPRECATE] Deprecated `use_mount` option in base manifest. See [#174][]. (Thanks [@flyinprogrammer][]).

* [CI] Improved spec and docs. See [#79][]. (Thanks [@obowersa][]).
* [CI] Added multiple tests for integration classes. See [#145][]. (Thanks [@kitchen][]).

# 1.6.0 / 2016-01-20

Expand Down Expand Up @@ -107,14 +132,37 @@ Changes
# 1.0.1

<!--- The following link definition list is generated by PimpMyChangelog --->
[#79]: https://github.com/DataDog/puppet-datadog-agent/issues/79
[#139]: https://github.com/DataDog/puppet-datadog-agent/issues/139
[#145]: https://github.com/DataDog/puppet-datadog-agent/issues/145
[#149]: https://github.com/DataDog/puppet-datadog-agent/issues/149
[#150]: https://github.com/DataDog/puppet-datadog-agent/issues/150
[#154]: https://github.com/DataDog/puppet-datadog-agent/issues/154
[#155]: https://github.com/DataDog/puppet-datadog-agent/issues/155
[#156]: https://github.com/DataDog/puppet-datadog-agent/issues/156
[#158]: https://github.com/DataDog/puppet-datadog-agent/issues/158
[#161]: https://github.com/DataDog/puppet-datadog-agent/issues/161
[#164]: https://github.com/DataDog/puppet-datadog-agent/issues/164
[#168]: https://github.com/DataDog/puppet-datadog-agent/issues/168
[#169]: https://github.com/DataDog/puppet-datadog-agent/issues/169
[#171]: https://github.com/DataDog/puppet-datadog-agent/issues/171
[#173]: https://github.com/DataDog/puppet-datadog-agent/issues/173
[#174]: https://github.com/DataDog/puppet-datadog-agent/issues/174
[#175]: https://github.com/DataDog/puppet-datadog-agent/issues/175
[@BIAndrews]: https://github.com/BIAndrews
[@LeoCavaille]: https://github.com/LeoCavaille
[@MartinDelta]: https://github.com/MartinDelta
[@b2jrock]: https://github.com/b2jrock
[@bfla]: https://github.com/bfla
[@bflad]: https://github.com/bflad
[@davidgibbons]: https://github.com/davidgibbons
[@flyinprogrammer]: https://github.com/flyinprogrammer
[@fzwart]: https://github.com/fzwart
[@grubernaut]: https://github.com/grubernaut
[@jangie]: https://github.com/jangie
[@kitchen]: https://github.com/kitchen
[@mcasper]: https://github.com/mcasper
[@mrunkel-ut]: https://github.com/mrunkel-ut
[@obowersa]: https://github.com/obowersa
[@rtyler]: https://github.com/rtyler
[@tuxinaut]: https://github.com/tuxinaut
14 changes: 14 additions & 0 deletions lib/puppet/reports/datadog_reports.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,14 @@
config = YAML.load_file(configfile)
API_KEY = config[:datadog_api_key]

# if need be initialize the regex
HOSTNAME_EXTRACTION_REGEX = config[:hostname_extraction_regex]
begin
HOSTNAME_EXTRACTION_REGEX = Regexp.new HOSTNAME_EXTRACTION_REGEX unless HOSTNAME_EXTRACTION_REGEX.nil?
rescue
raise(Puppet::ParseError, "Invalid hostname_extraction_regex #{HOSTNAME_EXTRACTION_REGEX}")
end

desc <<-DESC
Send notification of metrics to Datadog
DESC
Expand All @@ -38,6 +46,12 @@ def pluralize(number, noun)
def process
@summary = self.summary
@msg_host = self.host
unless HOSTNAME_EXTRACTION_REGEX.nil?
m = @msg_host.match(HOSTNAME_EXTRACTION_REGEX)
unless m[:hostname].nil?
@msg_host = m[:hostname]
end
end

event_title = ''
alert_type = ''
Expand Down
160 changes: 149 additions & 11 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
# The host of the Datadog intake server to send agent data to.
# Defaults to https://app.datadoghq.com.
# $host:
# Your hostname to see in Datadog. Defaults with Datadog hostname detection.
# $api_key:
# Your DataDog API Key. Please replace with your key value.
# $collect_ec2_tags
Expand All @@ -34,12 +33,14 @@
# $log_level
# Set value of 'log_level' variable. Default is 'info' as in dd-agent.
# Valid values here are: critical, debug, error, fatal, info, warn and warning.
# $hostname_extraction_regex
# Completely optional.
# Instead of reporting the puppet nodename, use this regex to extract the named
# 'hostname' captured group to report the run in Datadog.
# ex.: '^(?<hostname>.*\.datadoghq\.com)(\.i-\w{8}\..*)?$'
# $log_to_syslog
# Set value of 'log_to_syslog' variable. Default is true -> yes as in dd-agent.
# Valid values here are: true or false.
# $use_mount
# Allow overriding default of tracking disks by device path instead of mountpoint
# Valid values here are: true or false.
# $dogstatsd_port
# Set value of the 'dogstatsd_port' variable. Defaultis 8125.
# $statsd_forward_host
Expand All @@ -48,6 +49,9 @@
# $statsd_forward_port
# Set the value of the statsd_forward_port varable. Used to forward all
# statsd metrics to another host.
# $manage_repo
# Boolean to indicate whether this module should attempt to manage
# the package repo. Default true.
# $proxy_host
# Set value of 'proxy_host' variable. Default is blank.
# $proxy_port
Expand All @@ -68,6 +72,90 @@
# Skip SSL validation.
# $use_curl_http_client
# Uses the curl HTTP client for the forwarder
# $collect_ec2_tas
# Presents custom EC2 tags as agent tags to datadog
# Boolean. Default: False
# $collect_instance_metadata
# Enables the agent to try and gather instance metadata on EC2/GCE
# Boolean. Default: true
# $recent_point_threshold
# Sets the threshold for accepting points.
# String. Default: empty (30 second intervals)
# $listen_port
# Change the port that the agent listens on
# String. Default: empty (port 17123 in dd-agent)
# $additional_checksd
# Additional directory to look for datadog checks in
# String. Default: empty
# $bind_host
# The loopback address the forwarder and Dogstatsd will bind.
# String. Default: empty
# $use_pup
# Enables the local pup dashboard
# Boolean. Default: false
# $pup_port
# Specifies the port to be used by pup. Must have use_pup set
# String. Default: empty
# $pup_interface
# Specifies which interface pup will use. Must have use_pup set
# String. Default: empty
# $pup_url
# Specifies the URL used to access pup. Must have use_pup set
# String. Default: empty
# $use_dogstatsd
# Enables the dogstatsd server
# Boolean. Default: false
# $dogstatsd_port
# Specifies the port to be used by dogstatsd. Must have use_dogstatsd set
# String. Default: empty
# $dogstatsd_target
# Change the target to be used by dogstatsd. Must have use_dogstatsd set
# set
# String. Default: empty
# $dogstatsd_interval
# Change the dogstatsd flush period. Must have use_dogstatsd set
# String. Default: empty ( 10 second interval)
# $dogstatsd_normalize
# Enables 1 second nomralization. Must have use_dogstatsd set
# Boolean. Default: true
# $statsd_forward_host
# Enables forwarding of statsd packetsto host. Must have use_dogstatsd set
# String. Default: empty
# $statsd_forward_port
# Specifis port for $statsd_forward_host. Must have use_dogstatsd set
# String. Default: empty
# $device_blacklist_re
# Specifies pattern for device blacklisting.
# String. Default: empty
# $ganglia_host
# Specifies host where gmetad is running
# String. Default: empty
# $ganglia_port
# Specifies port for $ganglia_host
# String. Default: empty
# $dogstreams
# Specifies port for list of logstreams/modules to be used.
# String. Default: empty
# $custom_emitters
# Specifies a comma seperated list of non standard emitters to be used
# String. Default: empty
# $custom_emitters
# Specifies a comma seperated list of non standard emitters to be used
# String. Default: empty
# $collector_log_file
# Specifies the log file location for the collector system
# String. Default: empty
# $forwarder_log_file
# Specifies the log file location for the forwarder system
# String. Default: empty
# $dogstatsd
# Specifies the log file location for the dogstatsd system
# String. Default: empty
# $pup_log_file
# Specifies the log file location for the pup system
# String. Default: empty
#
#
# Actions:
#
# Requires:
Expand Down Expand Up @@ -103,10 +191,11 @@
$log_to_syslog = true,
$service_ensure = 'running',
$service_enable = true,
$use_mount = false,
$manage_repo = true,
$hostname_extraction_regex = nil,
$dogstatsd_port = 8125,
$statsd_forward_host = '',
$statsd_forward_port = 8125,
$statsd_forward_port = '',
$statsd_histogram_percentiles = '0.95',
$proxy_host = '',
$proxy_port = '',
Expand All @@ -118,7 +207,27 @@
$ganglia_port = 8651,
$skip_ssl_validation = false,
$skip_apt_key_trusting = false,
$use_curl_http_client = false
$use_curl_http_client = false,
$recent_point_threshold = '',
$listen_port = '',
$additional_checksd = '',
$bind_host = '',
$use_pup = false,
$pup_port = '',
$pup_interface = '',
$pup_url = '',
$use_dogstatsd = false,
$dogstatsd_target = '',
$dogstatsd_interval = '',
$dogstatsd_normalize = true,
$device_blacklist_re = '',
$custom_emitters = '',
$collector_log_file = '',
$forwarder_log_file = '',
$dogstatsd_log_file = '',
$pup_log_file = '',
$syslog_host = '',
$syslog_port = '',
) inherits datadog_agent::params {

validate_string($dd_url)
Expand All @@ -132,9 +241,11 @@
validate_string($puppetmaster_user)
validate_bool($non_local_traffic)
validate_bool($log_to_syslog)
validate_bool($manage_repo)
validate_string($log_level)
validate_integer($dogstatsd_port)
validate_string($statsd_histogram_percentiles)
validate_string($statsd_forward_port)
validate_string($proxy_host)
validate_string($proxy_port)
validate_string($proxy_user)
Expand All @@ -146,6 +257,29 @@
validate_bool($skip_ssl_validation)
validate_bool($skip_apt_key_trusting)
validate_bool($use_curl_http_client)
validate_bool($collect_ec2_tags)
validate_bool($collect_instance_metadata)
validate_string($recent_point_threshold)
validate_string($listen_port)
validate_string($additional_checksd)
validate_string($bind_host)
validate_bool($use_pup)
validate_string($pup_port)
validate_string($pup_interface)
validate_string($pup_url)
validate_bool($use_dogstatsd)
validate_string($dogstatsd_target)
validate_string($dogstatsd_interval)
validate_bool($dogstatsd_normalize)
validate_string($statsd_forward_host)
validate_string($device_blacklist_re)
validate_string($custom_emitters)
validate_string($collector_log_file)
validate_string($forwarder_log_file)
validate_string($dogstatsd_log_file)
validate_string($pup_log_file)
validate_string($syslog_host)
validate_string($syslog_port)

if $hiera_tags {
$local_tags = hiera_array('datadog_agent::tags')
Expand All @@ -167,7 +301,11 @@

case $::operatingsystem {
'Ubuntu','Debian' : { include datadog_agent::ubuntu }
'RedHat','CentOS','Fedora','Amazon','Scientific' : { include datadog_agent::redhat }
'RedHat','CentOS','Fedora','Amazon','Scientific' : {
class { 'datadog_agent::redhat':
manage_repo => $manage_repo,
}
}
default: { fail("Class[datadog_agent]: Unsupported operatingsystem: ${::operatingsystem}") }
}

Expand Down Expand Up @@ -201,9 +339,9 @@

if $puppet_run_reports {
class { 'datadog_agent::reports':
api_key => $api_key,
puppetmaster_user => $puppetmaster_user,
api_key => $api_key,
puppetmaster_user => $puppetmaster_user,
hostname_extraction_regex => $hostname_extraction_regex,
}
}

}
11 changes: 7 additions & 4 deletions manifests/integrations/apache.pp
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,17 @@
# }
#
class datadog_agent::integrations::apache (
$url = 'http://localhost/server-status?auto',
$username = undef,
$password = undef,
$tags = []
$url = 'http://localhost/server-status?auto',
$username = undef,
$password = undef,
$tags = [],
$disable_ssl_validation = false
) inherits datadog_agent::params {
include datadog_agent

validate_string($url)
validate_array($tags)
validate_bool($disable_ssl_validation)

file { "${datadog_agent::params::conf_dir}/apache.yaml":
ensure => file,
Expand Down
28 changes: 28 additions & 0 deletions manifests/integrations/consul.pp
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Class: datadog_agent::integrations::consul
#
# This class will install the necessary configuration for the consul integration
#
# Parameters:
# $url:
# The URL for consul
#
# Sample Usage:
#
# class { 'datadog_agent::integrations::consul' :
# url => "http://localhost:8500"
# }
#
class datadog_agent::integrations::consul(
$url = 'http://localhost:8500'
) inherits datadog_agent::params {

file { "${datadog_agent::params::conf_dir}/consul.yaml":
ensure => file,
owner => $datadog_agent::params::dd_user,
group => $datadog_agent::params::dd_group,
mode => '0644',
content => template('datadog_agent/agent-conf.d/consul.yaml.erb'),
require => Package[$datadog_agent::params::package_name],
notify => Service[$datadog_agent::params::service_name]
}
}
Loading