----- Original Message ----- > From: "David Portabella" <david.portabe...@gmail.com> > To: puppet-users@googlegroups.com > Sent: Tuesday, November 26, 2013 4:54:03 PM > Subject: [Puppet Users] get a *structured* version of the puppet agent output > > > > puppet agent --verbose shows a verbose output of the changes done by > puppet, such as: > > notice: > /Stage[main]/Logstash::Config/Logstash::Configdir[agent]/File[/etc/logstash/agent/config]/owner: > owner changed 'root' to 'logstash' > notice: /Stage[main]/Varnish/Service[varnish]/ensure: ensure changed > 'stopped' to 'running' > > I'd need to make some analysis about these changes, but it is not trivial > to correctly parse this output.
The same data is in the reports, a bit better there. >> require 'puppet' >> YAML.load_file("/var/lib/puppet/state/last_run_report.yaml").logs.first => #<Puppet::Util::Log:0x7f2e3dcbcc68 @source="Puppet", @level=:notice, @message="Finished catalog run in 0.18 seconds", @time=Thu Nov 21 16:38:42 +0000 2013, @tags=["notice"]> > is there an option to get an structured version of this output (such as in > xml or yaml)? > so that I can make queries such as: > - list all the files that have changed > - list all the services that changed from stopped to running. > ... > > yes, i can use sed and the like as a temporal workaround, but I'd need to > have a robust approach. > > option1: maybe there is a tool that correctly parses this output? > option2: or maybe there is a "puppet agent" equivalent command that > directly produces a structured output? > > otherwise, how much time would it required to implement option2 (i am a > software developer, and a puppet-user (not currently a puppet-developer)? > > Regards, > David > > -- > 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+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/puppet-users/7e4a2aa2-2bd2-4311-81c2-8f7e4bd12a5b%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+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/puppet-users/465611968.409.1385485068417.JavaMail.zimbra%40devco.net. For more options, visit https://groups.google.com/groups/opt_out.