A long-lived project that still receives updates
This Handler will report the events and metrics for a chef-client run to Datadog.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Development

>= 12.7
>= 0
>= 0
>= 0
>= 0
~> 2.5
>= 3.0

Runtime

~> 1.45.0
 Project Readme

chef-handler-datadog

An Exception and Report Handler for Chef.

Gem Version Build Status

Using chef-handler-datadog

This can be installed by using the dd-handler recipe from the datadog cookbook.

run_list 'foo::bar', 'datadog::dd-handler'

Windows support

The chef handler does work on Microsoft Windows however limitations with SSL + Ruby on Windows require extra setup. One solution is to set the SSL_CERT_FILE environmental variable to the one that chef uses on the machine to fix this issue. Here is how chef fixes the issue.

# Setup the certs for ruby in windows
env 'SSL_CERT_FILE' do
  action :create
  value "C:\\opscode\\chef\\embedded\\ssl\\certs\\cacert.pem"
end

The Datadog Docs on Chef has detailed instructions.

Compatibility

This handler is tested against the following Chef Infra Client and Ruby version combinations:

Chef Version Supported Ruby Versions
Chef 12 2.4
Chef 13 2.4, 2.5
Chef 14 2.5, 2.6
Chef 15 2.5, 2.6, 2.7
Chef 16 2.6, 2.7
Chef 17 2.7, 3.0, 3.1, 3.2, 3.3
Chef 18 3.1, 3.2, 3.3

Note: Chef Infra Client packages include their own embedded Ruby runtime. The versions listed above reflect the Ruby versions that are compatible with each Chef version. For production use, it's recommended to use the Ruby version bundled with your Chef Infra Client installation.

Contributing to chef-handler-datadog

See CONTRIBUTING.md

Copyright

Copyright (c) 2012-2025 Datadog, Inc. See LICENSE.txt for further details.