Puppet Agent Callback

68 views
Skip to first unread message

rsreen...@gopivotal.com

unread,
Jan 7, 2014, 1:09:01 AM1/7/14
to puppet...@googlegroups.com
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
Could this be done by creating an "exported" resource? Or could it be achieved using MCollective?
Any pointers around this is appreciated.


- Ranga

DEGREMONT Aurelien

unread,
Jan 7, 2014, 10:10:35 AM1/7/14
to puppet...@googlegroups.com, rsreen...@gopivotal.com
You can try to use the "report" feature.
Puppet will sent a detailled report with a lot of information about what it has done.
This could be sent in various ways depending on your tuning. You can implement a callback thanks to this.


Aurélien

jcbollinger

unread,
Jan 7, 2014, 2:44:14 PM1/7/14
to puppet...@googlegroups.com


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

rsreen...@gopivotal.com

unread,
Jan 7, 2014, 5:50:45 PM1/7/14
to puppet...@googlegroups.com, rsreen...@gopivotal.com
Thanks Aurélien. Could you point me to some documentation around this?

rsreen...@gopivotal.com

unread,
Jan 7, 2014, 6:00:29 PM1/7/14
to puppet...@googlegroups.com
Thanks for the response. I shall look into the scheduler.


- Ranga
Reply all
Reply to author
Forward
0 new messages