Jira (PDB-29) Notification hooks

4 views
Skip to first unread message

Eric Zounes (JIRA)

unread,
Oct 13, 2015, 8:16:07 PM10/13/15
to puppe...@googlegroups.com
Eric Zounes commented on New Feature PDB-29
 
Re: Notification hooks

I would also like to see events emitted based on all the various actions available through the command API:
https://docs.puppetlabs.com/puppetdb/3.1/api/command/v1/commands.html

For example, every time a catalog is created, replaced, or deactivated emit an event with the result of this command.

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v6.4.11#64026-sha1:78f6ec4)
Atlassian logo

Kenneth Barber (JIRA)

unread,
Oct 14, 2015, 9:16:03 AM10/14/15
to puppe...@googlegroups.com
Kenneth Barber commented on New Feature PDB-29
 
Re: Notification hooks

I'm curious - Eric Zounes what are you going to use this data for mate?

Eric Zounes (JIRA)

unread,
Oct 14, 2015, 12:52:04 PM10/14/15
to puppe...@googlegroups.com
Eric Zounes commented on New Feature PDB-29
 
Re: Notification hooks

Kenneth Barber - The main use case I had in mind was basically using the event stream as a way to do life cycle management in external systems that have some awareness of Puppet nodes. For example, I could write integration for a monitoring system that updates immediately after a new catalog appears for a node. It could also remove service checks and host monitoring for deactivated nodes. Another example would be to remove system metrics for nodes that are decommissioned.

I recently had a long discussion with the engineers from Netways (the company that wrote Icinga2) and they've been thinking about doing some deeper Puppet integration by fetching configuration data directly from PuppetDB. With an event stream, they could fetch or remove data any time a node is added/deactivated instead of doing some kind of long poll on all the PuppetDB data. This would mean that a node i could be monitored almost immediately after Puppet runs for the first time. They've already done similar work with other inventory/cmdb systems, but I think it would be really compelling to do this here. An event stream would aid with this type of work.

Let me know if you have any further questions about Icinga2 or other use cases. I'm sure some other people on SysOps have other use cases.

Daniel Dreier (JIRA)

unread,
Oct 14, 2015, 1:05:10 PM10/14/15
to puppe...@googlegroups.com
Daniel Dreier commented on New Feature PDB-29
 
Re: Notification hooks

Another use case for this will be direct puppet – right now they don't have an answer (as far as I can tell) for the issue of exported resources, puppetdbquery, etc getting changed. For example, if I have a load balancer and web nodes getting classified using facts / ENC, and I bring up a new web node, it'll export a load balancer backend resource but if the load balancer is using direct puppet it will never notice because the code didn't change. Notification hooks in puppetdb would provide the basic capability needed to make that work.

If I understand the plans correctly I don't think that they're targeting that capability in the first release, but I suspect that there will be urgent demand for it once it goes into production because it will break a large number of workflows that depend on exported resources.

Klavs Klavsen (JIRA)

unread,
Mar 12, 2016, 1:14:03 AM3/12/16
to puppe...@googlegroups.com
Klavs Klavsen commented on New Feature PDB-29
 
Re: Notification hooks

One use-case IMHO - would be to collect data from runs. We currently trigger this collection from puppetdb, by way of our clients running puppet agent - curl'ing to a REST service (once agent run has send in report), which then pulls the latest report numbers (and hence lets puppetdb do the report parsing) - so we can save successes, failure etc. numbers - and do alerting and graphing of the state of our servers.

It actually allowed us to produce great graphs - highlighting servers that have "continous changes".. alert on massive failure (10+ servers within certain timeframe) in icinga/nagios etc.

This message was sent by Atlassian JIRA (v6.4.12#64027-sha1:e3691cc)
Atlassian logo

Zee Alexander (JIRA)

unread,
Jul 6, 2016, 4:09:17 PM7/6/16
to puppe...@googlegroups.com
Zee Alexander commented on New Feature PDB-29
 
Re: Notification hooks

I'd like to have the ability to write something akin to a report processor - e.g. real time processing of Puppet data, without having to use Ruby.

Currently, I've got no choice but to poll PuppetDB over and over if I want to do that. Native report processors are real time, which is nice, but you loose all the goodness PDB gives you (automatic queuing, retrying failed reports, and all that stuff I'd rather not reimplement again for every report processor I write in Ruby).

Of course we can use the store report processor, but now the reports are stored on disk on the particular master they happen to run against, which creates its own set of problems. (Do I rsync them? Put them on a network share? Stream them all to a db myself...oh wait that's PuppetDB).

I do think we've got a sort of chicken-and-the-egg thing here, which is that if we had it, customers would use it, but since we don't, it doesn't even occur to them.

Basically it'd be great to be able to tell a customer: Yes you can get real time data about what Puppet is doing, and you can get it with Perl if you want to.

This message was sent by Atlassian JIRA (v6.4.13#64028-sha1:b7939e9)
Atlassian logo

Daniele Sluijters (JIRA)

unread,
Jul 6, 2016, 4:24:20 PM7/6/16
to puppe...@googlegroups.com
Daniele Sluijters commented on New Feature PDB-29
 
Re: Notification hooks

I've thought a bit about this and yes, being able to get events from PuppetDB would be nice. However, writing a report processor is very little code depending on what you want to do. All it would really take is just putting the report on an event bus of some sort and then you can do the processing anywhere you want. The retry logic would be a bit more work as you'd need to submit it to some kind of process that takes care of this for you. Honestly though, I've solved this before with a simple cron job.

Claudia Petty (Jira)

unread,
Jun 21, 2023, 10:57:09 AM6/21/23
to puppe...@googlegroups.com
Claudia Petty updated an issue
 
PuppetDB / New Feature PDB-29
Notification hooks
Change By: Claudia Petty
Labels: new-feature puppetdb
This message was sent by Atlassian Jira (v8.20.21#820021-sha1:38274c8)
Atlassian logo
Reply all
Reply to author
Forward
0 new messages