It's not ideal but this could very easily be achieved by with Zabbix. With Zabbix you can have a check, running for example every 30 seconds, that runs a checksum on a specific file. Then a trigger that is activated if the last known checksum varies from the current checksum, here's an example from one of the default templates, "{Template - Linux Servers:vfs.file.cksum[/etc/passwd].diff(0)}>0". Then create an action for that trigger. Actions can initiate remote commands, which you specify to be a manual run of puppet. This can get extremely resource intensive, and really isn't ideal.
In my environment I personally don't use Zabbix for this but rather OSSEC to get email notifications upon changes of key files. - Trey On Apr 7, 1:10 am, John Chris Richards <john.chris.richa...@gmail.com> wrote: > Hi Nan > > First of all thanks for your answer > > > Are you trying to trigger a puppet run when a particular file changes? > > Yes, this is what I exactly want to do. For example, if a user changes > /etc/hosts file (via vim for instance), it will be corrupted until the next > run. What if I don't want to wait until the next run? > > Thanks again. > > 2011/4/7 Nan Liu <n...@puppetlabs.com> > > > > > > > > > On Wed, Apr 6, 2011 at 2:50 PM, John Chris Richards > > <john.chris.richa...@gmail.com> wrote: > > > Hi all > > > > Firstly, I am new in configuration management and all I know about > > > watching files is that client checks a file's check sum every t hour > > > and if a change has occurred then it gets the file from the server. > > > > I wonder that if a user changes a file, does the puppet client wait > > > end of the time (t) or is there way to say client if a change occurs > > > in a specific file then make an immediate pull? I mean, I don't want > > > to wait until the time is up. Is there a way to make this in puppet? > > > Puppet agent runs periodically to enforce the catalog, it can replace > > the file if it detects any changes, but it doesn't monitor the file to > > trigger runs. I suppose you can run puppet continuously (not > > recommended), but perhaps if you give some insight on what you are > > trying to accomplish would give us a better idea how to achieve it > > with puppet. Are you trying to trigger a puppet run when a particular > > file changes? Are you trying to monitor several files? > > > Thanks, > > > Nan -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.