On Monday, January 6, 2014 7:09:01 PM UTC-6,
rsreen...@gopivotal.com wrote:
Hi
I am trying to wrap my head around how best to implement the following functionality:
- Get information about puppet agent runs as soon as they complete
- Some kind of a callback mechanism would be ideal
Calling back to whom? Seriously, I'm not just being picky. I know well what a callback is in general, but I don't understand what you mean by that in this context. That leaves me uncertain of the characteristics of your ideal solution.
Could this be done by creating an "exported" resource?
No. Exported resources could conceivably be used to provide information about catalog compilation, but they have no visibility into details or completion status of agent runs.
Or could it be achieved using MCollective?
Only if you are using MCollective to perform agent runs (in non-daemon mode) in the first place. If you are running the agent in daemon mode or via an ordinary scheduler (e.g. cron) then how would MCollective have any clue?
Any pointers around this is appreciated.
Puppet's built-in reporting mechanism might serve your purpose, as Aurélien suggested. Alternatively, if you run via a scheduler then you could put a wrapper script around the agent invocation that sends whatever information you like, by whatever means you like.
John