add resource agent lifecycle event

@mmeisinger please review.