Categories: None [Edit]

chef-gelf

https://rubygems.org/gems/chef-gelf
https://github.com/jellybob/chef-gelf
= DESCRIPTION: Provides a Chef handler which can report run status, including any changes that were made, to a Graylog2 server. In the case of failed runs a backtrace will be included in the details reported. = REQUIREMENTS: * A Graylog2 server running somewhere. = USAGE: This example makes of the chef_handler cookbook, place some thing like this in cookbooks/chef_handler/recipes/gelf.rb and add it to your run list. It also assumes your Graylog2 server has set the attribute rsyslog_server to true. log_server = search(:node, "rsyslog_server:true").first if log_server include_recipe "chef_handler::default" gem_package "chef-gelf" do action :nothing end.run_action(:install) # Make sure the newly installed Gem is loaded. Gem.clear_paths require 'chef/gelf' chef_handler "Chef::GELF::Handler" do source "chef/gelf" arguments({ :server => log_server['fqdn'] }) supports :exception => true, :report => true end.run_action(:enable) end Arguments take the form of an options hash, with the following options: * :server - The server to send messages to. * :port (12201) - The port to send on. * :facility (chef-client) - The facility to report under. * :host (node.fqdn) - The host to report messages as coming from. * :blacklist ({}) - A hash of cookbooks, resources and actions to ignore in the change list. = BLACKLISTING: Some resources report themselves as having updated on every run even if nothing changed, or are just things you don't care about. To reduce the amount of noise in your logs these can be ignored by providing a blacklist. In this example we don't want to be told about the GELF handler being activated: chef_handler "Chef::GELF::Handler" do source "chef/gelf" arguments({ :server => log_server['fqdn'], :blacklist => { "chef_handler" => { "chef_handler" => [ "nothing", "enable" ] } } }) supports :exception...

Total

Ranking: 61,104 of 180,459
Downloads: 14,590

Daily

Ranking: 136,377 of 180,454
Downloads: 2

Depended by

RankDownloadsName

Depends on

RankDownloadsName
1,17724,484,879chef
1,63513,014,651gelf

Owners

#GravatarHandle
1iconJonWood