LogDNA Chef Handler
Description
A Chef Handler that sends logs from each client run to LogDNA.
Installation and Usage
- Using
chef-gem:chef_gem chef-handler-logdna; - Recommended: Create and run a recipe using chef_handler cookbook by OpsCode: ```ruby include_recipe "chef_handler"
Install LogDNA Chef Handler:
chef_gem "chef-handler-logdna"
Load the gem here:
require 'chef/handler/logdna'
Activate the handler:
chef_handler "Chef::Handler::LogDNA" do
source "chef/handler/logdna"
action :nothing
arguments :logdna_key => "
* Or you can use this in your recipe by adding the following snippet of code to your recipe:
```ruby
chef_handler "Chef::Handler::LogDNA" do
source "<PATH TO LOGDNA CHEF HANDLER>"
action :nothing
arguments :logdna_key => "<LOGDNA_INGESTION_KEY>"
end.run_action(:enable)