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? -- 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+unsubscribe@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.
Deepak Giridharagopal
2013-Nov-04 18:22 UTC
Re: [Puppet Users] PuppetDB - notify Puppetmaster
On Nov 4, 2013, at 1:47 AM, Steven Jonthen <coffeejunkeysteve@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+unsubscribe@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+unsubscribe@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.
Ok thanks! -- 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+unsubscribe@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/36dfb8e5-606f-432d-b054-86c1cfbd2c99%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
You could also use exported resources, and simply do this on all clients: @@exec { "/bin/command-to-run-on-mater": tag => "master" } and then collect on the master: Exec <<| tag = ''master'' |>> -- 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+unsubscribe@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/9579cdfd-1e1d-4b69-8cb2-c004944a2756%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.