- From: Adam Jacob <
>
- To:
- Subject: [chef] Re: chef-client & exceptions
- Date: Mon, 12 Apr 2010 11:40:27 -0700
On Mon, Apr 12, 2010 at 9:25 AM, John Merrells
<
>
wrote
>
Does chef integrate with any exception notification services... like
>
hoptoad?
>
>
As I'm writing new recipes I make mistakes that cause chef-client's to barf
>
and I only find out about it by going and looking at the log. It'd be nice
>
if the
>
exception could be forwarded to me the same way that my application level
>
code does it.
>
>
How are you folks dealing with this issue?
It doesn't as of yet, although we have plans to support this. If you
want hoptoad support right now, this will do it:
$ gem install toadhopper
Then change /usr/bin/chef-client to this:
require 'rubygems'
version = ">= 0"
if ARGV.first =~ /^_(.*)_$/ and Gem::Version.correct? $1 then
version = $1
ARGV.shift
end
begin
gem 'chef', version
load Gem.bin_path('chef', 'chef-client', version)
rescue => e
require 'toadhopper'
Toadhopper("YOURAPIKEY").post!(e)
raise
end
And viola, Toad-hoppered Chef.
Adam
--
Opscode, Inc.
Adam Jacob, CTO
T: (206) 508-7449 E:
Archive powered by MHonArc 2.6.16.