- From: Adam Jacob <
>
- To:
- Subject: [chef] Re: Life cycle of a chef run
- Date: Thu, 22 Oct 2009 09:35:50 -0700
On Wed, Oct 21, 2009 at 2:56 PM, Tim Uckun
<
>
wrote:
>
Is there a way to wrap some code around the chef run?
Not yet - we have an open Feature Proposal that has some examples of
how you can get this functionality today, though:
http://wiki.opscode.com/display/chef/After+hooks
>
I have two specific goals.
>
>
1. Catch exceptions and email them to me.
>
>
2. Send some data to my monitoring service after the run (if nothing
>
else just the fact that the run took place and went OK but I would
>
like to include other data from ohai).
In both these cases, you'll want to have a recipe that is at the tail
end of your run. Have it walk the collection (like in the example in
the After+Hooks) and go nuts. Stick it in a ruby block and inspect
whether each resource is "updated" to get end-of-run information about
what happened.
Improving this kind of reporting is definitely on them map.
Adam
--
Opscode, Inc.
Adam Jacob, CTO
T: (206) 508-7449 E:
Archive powered by MHonArc 2.6.16.