To submit issues and patches please visit https://github.com/DataDog/chef-datadog. The code is licensed under the Apache License 2.0 (see LICENSE for details).
Chef recipes to deploy Datadog's components and configuration automatically.
- python >= 2.6
- chef >= 10.12
- Debian, Ubuntu, RedHat, CentOS
The following Opscode cookbooks are dependencies:
- apt
- chef_handler
- yum::epel
node['datadog']['api_key']
= This needs to be retrieved from your Account Settings page.node['datadog']['application_key']
= There are none by default. Visit the Account Settings page to create a new Application Key, to be used in conjunction with your API key.node['datadog']['url']
= The location of where Datadog is hosted. Should never change.node['datadog']['repo']
= Where the Datadog-maintained packages are located. Should never change.node['datadog']['debug']
= Will trigger heavy logging to /tmp/dd-agent.lognode['datadog']['use_ec2_instance_id']
= Whether to use the instance-id in lieu of hostname when running on EC2. No effect on non-EC2 servers.node['datadog']['use_mount']
= Whether to use the mount point instead of the device name for all I/O metrics.node['datadog']['tags']
= List of Datadog tags you want to apply to this hostnode['datadog']['dogstreams']
= List of Dogstreams (see Guide to Log Parsing for details).- `node['datadog']['agent_version'] = Sets the datadog agent version to install (default: latest available version)
node['datadog']['apache']['status_url']
= Url to Apache's status page. Must have mod_status installed. See http://httpd.apache.org/docs/2.0/mod/mod_status.html for details.
node['datadog']['ganglia']['url']
= Ganglia host where gmetad is runningnode['datadog']['ganglia']['port']
= Ganglia port where gmetad is running
node['datadog']['datadog']['graphite']
= Turns the agent into a Graphite carbon relay.node['datadog']['datadog']['graphite_port']
= Port that the carbon relay will listen on.
node['datadog']['datadog']['haproxy']['stats_url']
= URL for haproxy statsnode['datadog']['datadog']['haproxy']['stats_user']
= Optional HTTP Basic Auth user to access haproxy statsnode['datadog']['datadog']['haproxy']['stats_password']
= Optional HTTP Basic Auth password to access haproxy stats
node['datadog']['mysql']['server']
= MySQL hostnode['datadog']['mysql']['user']
= MySQL user. It only runs "SHOW STATUS" queries, which doesn't require any privileges, so you should consider creating a separate, unprivileged user.node['datadog']['mysql']['pass']
= MySQL user's password
node['datadog']['postgres']['server']
= PostgreSQL hostnode['datadog']['postgres']['port']
= 5432 by defaultnode['datadog']['postgres']['user']
= user that the agent will use to connect, "datadog" by defaultnode['datadog']['postgres']['password']
= password to connect the datadog agent
Do not forget to update you pg_hba.conf
and SIGHUP
postgres in case your postgres access control requires it.
node['datadog']['nginx']['status_url']
= Url to nginx's status page. Must have http_stub_status_module installed. See http://wiki.nginx.org/HttpStubStatusModule for details.
node['datadog']['rabbitmq']['status_url']
= Url to RabbitMQ's status page. Must have rabbitmq-status plugin installed. See http://www.lshift.net/blog/2009/11/30/introducing-rabbitmq-status-plugin for details.node['datadog']['rabbitmq']['user']
= RabbitMQ usernode['datadog']['rabbitmq']['pass']
= RabbitMQ user's password
node['datadog']['mongodb']['server']
= MongoDB uri. For example: mongodb://my_user:my_pass@localhost/my_db
node['datadog']['couchdb']['server']
= CouchDB host
node['datadog']['jenkins']['home_dir']
= Path to Jenkins's home directory
node['datadog']['nagios']['log_dir']
= Path to Nagios's event log filenode['datadog']['nagios']['conf_dir']
= If you use perfdata, dd-agent can import automatically and in real-time performance data collected by nagios. For more information on perfdata configuration, please refer to http://nagios.sourceforge.net/docs/3_0/perfdata.html. Path to Nagios' configuration file where the properties host|service_perfdata_file and host|service_perfdata_file_template are defined.
node['datadog']['cassandra']['host']
= Cassandra hostnode['datadog']['cassandra']['port']
= Cassandra portnode['datadog']['cassandra']['nodetool']
= Path to nodetool
node['datadog']['jvm_jmx']['server']
= JMX server:port to connect tonode['datadog']['jvm_jmx']['user']
= JMX user to log in with, if needednode['datadog']['jvm_jmx']['pass']
= Password for the configured JMX usernode['datadog']['jvm_jmx']['name']
= Name to report the statistics for this java VM. This will allow to monitor several JVMs running on the same machine.
node['datadog']['tomcat_jmx']['server']
= host:port to connect to. Must be configured in tomcat setenv.sh or similarnode['datadog']['tomcat_jmx']['user']
= JMX user to log in with, if needednode['datadog']['tomcat_jmx']['pass']
= Password for the configured JMX user
node['datadog']['varnish']
= if true, will invokevarnishstat
on the server to gather varnish metrics.
node['datadog']['memcached']['listen']
= memcached address; if 0.0.0.0 dd-agent will connect via the loopback address.node['datadog']['memcached']['port']
= memcached port
node['datadog']['redis']['server']['addr']
= redis server addressnode['datadog']['redis']['server']['port']
= redis server port
Just a placeholder for now, when we have more shared components they will probably live there.
Installs the Datadog agent on the target system, sets the API key, and start the service to report on the local system metrics
Installs the chef-handler-datadog gem and invokes the handler at the end of a chef run to report the details back to the newsfeed.
- Add this cookbook to your Chef Server, either by installing with knife or downloading and uploading to your chef-server with knife.
- Add your API Key, either to
attributes/default.rb
, or by using the inheritance model and placing it on the node/ - Upload the new recipe via:
knife cookbook upload datadog
- Associate the recipes with the desired
roles
, i.e. "role:chef-client" should contain "datadog::dd-handler" and a "role:somethingelse" should start the dd-agent with "datadog::dd-agent". - Wait until chef-client runs on the target node (or trigger chef-client if you're impatient)
We are not making use of data_bags in this recipe at this time, as it is unlikely that you will have more than 1 API key.
- Added
node['datadog']['agent_version']
attribute
- Work-around for COOK-2171
- Fixed typo in jmx section
- Added support for postgres, redis & memcached
dd-agent
- updated to include more platformsdd-handler
- updated to leveragechef_gem
resource if available- Updated copyright for 2012
- Updated syntax for node attribute accessors
- Some syntax styling fixes
- Added agent logging configuration
- Removed extraneous dependencies
- Added automated testing suite
- Updated for CentOS dependencies
- Link to github repository.
dd-handler
- Corrects attribute name.
dd-agent
- Adds an explicit varnish attribute.
dd-agent
- Add varnish support.
dd-agent
- default to using instance IDs as hostnames when running dd-agent on EC2
dd-agent
- Full datadog.conf template using attributes (thanks @drewrothstein)
dd-agent
- Added support for Nagios PerfData and Graphite.
dd-agent
- Added support for RPM installs - Red Hat, CentOS, Scientific, Fedora
- Initial refactoring, including the
dd-agent
cookbook here - Adding chef-handler-datadog to report to the newsfeed
- Added ruby-dev dependency
Author:: Mike Fiedler ([email protected]) Author:: Alexis Le-quoc ([email protected])
Copyright 2012, Datadog, Inc.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.