-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 > The base of the code is something like: > > require "puppet" > require "yaml" > require "find" > Puppet[:config] = "/etc/puppet/puppet.conf" > Puppet.parse_config > Puppet[:name] = "puppetmasterd" > Puppet::Node::Facts.terminus_class = :yaml > File.find("/var/puppet/reports") do | report | > next if FileTest.directory?(report) > thisreport = open(report) { |fh| YAML::load(fh) } > print "Host: " + thisreport.host > reporttime = File.stat(report).mtime.to_i # seconds since epoch... > thisreport.logs.each do |log| > # Whatever you want to find out about each message... > end > File.unlink(report) # If you don't need them anymore... > end
would be nice to have such a working example in ext/ cheers pete -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkscrloACgkQbwltcAfKi3/LiACfQXDDbclJkGlofQxYUkvw09me 9A0AoI/IHHoBJhEiCZKkLlecvdwd1cgb =MuV0 -----END PGP SIGNATURE----- -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-us...@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.