On Nov 4, 2013, at 1:47 AM, Steven Jonthen <coffeejunkeyst...@gmail.com> wrote:

> Hi guys,
> 
> I want the Puppetmaster to be notified if an agent has put new data into the 
> PuppetDB, which is installed on the puppetmaster. After each incoming new 
> data for PuppetDB I want to execute a command on the Puppetmaster.
> 
> How can I do that?

There is currently no ping-back or event subscription mechanism in PuppetDB to 
allow you to register a callback that gets invoked upon changes in the 
underlying data. This would not be hard to add (especially as there's already a 
MQ active inside of PuppetDB), but it doesn't exist yet. Please file a feature 
request! :)

In the meantime, you could implement this via polling the "nodes" endpoint:

http://docs.puppetlabs.com/puppetdb/1.5/api/query/v3/nodes.html

That will return to you metadata about all your active nodes, such as when they 
last received a catalog or new facts or a new report. You could use that to 
determine when to invoke an external command or not.

deepak

> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to puppet-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/puppet-users/416428c1-f816-4f98-8e98-678bfe9bcac0%40googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/9519939E-0F37-497E-8909-EC2498D3B931%40puppetlabs.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to