Hello,

I'd like to know the best way to collect new/incoming Fact values for a 
node and compare it to old/previous values (i.e. from a node making a 
puppet run). My thinking is that the new values need to be intercepted 
before they are stuffed into PuppetDB (or 
/var/lib/puppet/yaml/facts/<node>.yaml), but I don't know where the 
appropriate place for that would be. I'm thinking the options -- all of 
which may not work -- are:

1. In Puppetmaster code somewhere, i.e. before it sends it to the Fact 
storage backend.
2. In PuppetDB code, i.e. the function "Replace facts", before the new 
facts get stuffed into the database.
3. In a custom server function

I like Option 3 the best since it is simple and does not involve hunting 
around in the Puppet code base, but it also seems like it won't work: 
wouldn't the 'lookupvar' function commonly used in server functions 
retrieve the new Fact value that just got stored from the in-progress 
Puppet run?

By the way, I'm wanting to build a monitoring tool around Facter that 
provides email alerts (and maybe a fancy web frontend for alerts/events) 
when certain user-definable fact value changes occur. If there's already a 
good tool out there that does this, I might be saved a bit of work. :)

Thanks,
Kent

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Developers" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/puppet-dev/-/8H5TYx-NP1wJ.
To post to this group, send email to puppet-dev@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-dev+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-dev?hl=en.

Reply via email to