I''m trying to find a programmatic way to determine if the result of a puppetrun was ok. Rather than scraping /var/log/messages, is there another way to determine that a puppet run completed with errors and how long it took to run? Is that state maintained on the client''s disk somewhere? Doug. -- 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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
On Mon, Sep 27, 2010 at 4:50 PM, Douglas Garstang <doug.garstang@gmail.com> wrote:> I''m trying to find a programmatic way to determine if the result of a > puppetrun was ok. Rather than scraping /var/log/messages, is there another > way to determine that a puppet run completed with errors and how long it > took to run? Is that state maintained on the client''s disk somewhere?What version of Puppet? How are you running the agent? out of cron? or as a daemon? If you''re running it out of cron, there''s a —detailed-exitcodes argument you can use to determine the client state. Have you looked at dumping a report at the end of your run and whether that reports the info you want?> Doug. > > -- > 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+unsubscribe@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/puppet-users?hl=en. >-- nigel -- 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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
On Mon, Sep 27, 2010 at 4:58 PM, Nigel Kersten <nigelk@google.com> wrote:> On Mon, Sep 27, 2010 at 4:50 PM, Douglas Garstang > <doug.garstang@gmail.com> wrote: > > I''m trying to find a programmatic way to determine if the result of a > > puppetrun was ok. Rather than scraping /var/log/messages, is there > another > > way to determine that a puppet run completed with errors and how long it > > took to run? Is that state maintained on the client''s disk somewhere? > > What version of Puppet? >Nigel, 2.6.1.> > How are you running the agent? out of cron? or as a daemon? > >Agent is running as a daemon. I''m running puppetrun --host=<host> on the puppetmaster.> If you''re running it out of cron, there''s a —detailed-exitcodes > argument you can use to determine the client state. > > Have you looked at dumping a report at the end of your run and whether > that reports the info you want? > > > Not yet... can I do that if I use puppetrun on the puppetmaster?Doug -- 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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
On Mon, Sep 27, 2010 at 5:09 PM, Douglas Garstang <doug.garstang@gmail.com> wrote:> On Mon, Sep 27, 2010 at 4:58 PM, Nigel Kersten <nigelk@google.com> wrote: >> >> On Mon, Sep 27, 2010 at 4:50 PM, Douglas Garstang >> <doug.garstang@gmail.com> wrote: >> > I''m trying to find a programmatic way to determine if the result of a >> > puppetrun was ok. Rather than scraping /var/log/messages, is there >> > another >> > way to determine that a puppet run completed with errors and how long it >> > took to run? Is that state maintained on the client''s disk somewhere? >> >> What version of Puppet? > > Nigel, > 2.6.1. > >> >> How are you running the agent? out of cron? or as a daemon? >> > > Agent is running as a daemon. I''m running puppetrun --host=<host> on the > puppetmaster. > >> >> If you''re running it out of cron, there''s a —detailed-exitcodes >> argument you can use to determine the client state. >> >> Have you looked at dumping a report at the end of your run and whether >> that reports the info you want? >> >> > Not yet... can I do that if I use puppetrun on the puppetmaster?I''m not much of an expert in puppetrun as we don''t use it here. What''s the end goal? Do you want centralized reports that you can analyze? or you just want to know whether the run had errors with ad-hoc puppetruns ?> Doug > > -- > 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+unsubscribe@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/puppet-users?hl=en. >-- nigel -- 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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
On Mon, Sep 27, 2010 at 5:17 PM, Nigel Kersten <nigelk@google.com> wrote:> On Mon, Sep 27, 2010 at 5:09 PM, Douglas Garstang > <doug.garstang@gmail.com> wrote: > > On Mon, Sep 27, 2010 at 4:58 PM, Nigel Kersten <nigelk@google.com> > wrote: > >> > >> On Mon, Sep 27, 2010 at 4:50 PM, Douglas Garstang > >> <doug.garstang@gmail.com> wrote: > >> > I''m trying to find a programmatic way to determine if the result of a > >> > puppetrun was ok. Rather than scraping /var/log/messages, is there > >> > another > >> > way to determine that a puppet run completed with errors and how long > it > >> > took to run? Is that state maintained on the client''s disk somewhere? > >> > >> What version of Puppet? > > > > Nigel, > > 2.6.1. > > > >> > >> How are you running the agent? out of cron? or as a daemon? > >> > > > > Agent is running as a daemon. I''m running puppetrun --host=<host> on the > > puppetmaster. > > > >> > >> If you''re running it out of cron, there''s a —detailed-exitcodes > >> argument you can use to determine the client state. > >> > >> Have you looked at dumping a report at the end of your run and whether > >> that reports the info you want? > >> > >> > > Not yet... can I do that if I use puppetrun on the puppetmaster? > > I''m not much of an expert in puppetrun as we don''t use it here. > > What''s the end goal? Do you want centralized reports that you can > analyze? or you just want to know whether the run had errors with > ad-hoc puppetruns ? > >Nigel, the end goal is to not have to not have to log into the client every time I run puppet to see if puppet applied the updates correctly. I must be doing it a few hundred times a day and it''s getting a bit old. Doug. -- 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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
On Mon, Sep 27, 2010 at 5:22 PM, Douglas Garstang <doug.garstang@gmail.com> wrote:> On Mon, Sep 27, 2010 at 5:17 PM, Nigel Kersten <nigelk@google.com> wrote: >> >> On Mon, Sep 27, 2010 at 5:09 PM, Douglas Garstang >> <doug.garstang@gmail.com> wrote: >> > On Mon, Sep 27, 2010 at 4:58 PM, Nigel Kersten <nigelk@google.com> >> > wrote: >> >> >> >> On Mon, Sep 27, 2010 at 4:50 PM, Douglas Garstang >> >> <doug.garstang@gmail.com> wrote: >> >> > I''m trying to find a programmatic way to determine if the result of a >> >> > puppetrun was ok. Rather than scraping /var/log/messages, is there >> >> > another >> >> > way to determine that a puppet run completed with errors and how long >> >> > it >> >> > took to run? Is that state maintained on the client''s disk somewhere? >> >> >> >> What version of Puppet? >> > >> > Nigel, >> > 2.6.1. >> > >> >> >> >> How are you running the agent? out of cron? or as a daemon? >> >> >> > >> > Agent is running as a daemon. I''m running puppetrun --host=<host> on the >> > puppetmaster. >> > >> >> >> >> If you''re running it out of cron, there''s a —detailed-exitcodes >> >> argument you can use to determine the client state. >> >> >> >> Have you looked at dumping a report at the end of your run and whether >> >> that reports the info you want? >> >> >> >> >> > Not yet... can I do that if I use puppetrun on the puppetmaster? >> >> I''m not much of an expert in puppetrun as we don''t use it here. >> >> What''s the end goal? Do you want centralized reports that you can >> analyze? or you just want to know whether the run had errors with >> ad-hoc puppetruns ? >> > > Nigel, the end goal is to not have to not have to log into the client every > time I run puppet to see if puppet applied the updates correctly. I must be > doing it a few hundred times a day and it''s getting a bit old. > Doug.It really sounds like you want to set up centralized reporting. http://docs.puppetlabs.com/guides/reporting.html You may or may not find it easier to set up Puppet Dashboard or Foreman to give you a visual view of the reports, or you may simply wish to do some simple scans of the report yaml files on the reportserver for errors. -- 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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
On Mon, Sep 27, 2010 at 5:22 PM, Douglas Garstang <doug.garstang@gmail.com>wrote:> On Mon, Sep 27, 2010 at 5:17 PM, Nigel Kersten <nigelk@google.com> wrote: > >> On Mon, Sep 27, 2010 at 5:09 PM, Douglas Garstang >> <doug.garstang@gmail.com> wrote: >> > On Mon, Sep 27, 2010 at 4:58 PM, Nigel Kersten <nigelk@google.com> >> wrote: >> >> >> >> On Mon, Sep 27, 2010 at 4:50 PM, Douglas Garstang >> >> <doug.garstang@gmail.com> wrote: >> >> > I''m trying to find a programmatic way to determine if the result of a >> >> > puppetrun was ok. Rather than scraping /var/log/messages, is there >> >> > another >> >> > way to determine that a puppet run completed with errors and how long >> it >> >> > took to run? Is that state maintained on the client''s disk somewhere? >> >> >> >> What version of Puppet? >> > >> > Nigel, >> > 2.6.1. >> > >> >> >> >> How are you running the agent? out of cron? or as a daemon? >> >> >> > >> > Agent is running as a daemon. I''m running puppetrun --host=<host> on the >> > puppetmaster. >> > >> >> >> >> If you''re running it out of cron, there''s a —detailed-exitcodes >> >> argument you can use to determine the client state. >> >> >> >> Have you looked at dumping a report at the end of your run and whether >> >> that reports the info you want? >> >> >> >> >> > Not yet... can I do that if I use puppetrun on the puppetmaster? >> >> I''m not much of an expert in puppetrun as we don''t use it here. >> >> What''s the end goal? Do you want centralized reports that you can >> analyze? or you just want to know whether the run had errors with >> ad-hoc puppetruns ? >> >> > Nigel, the end goal is to not have to not have to log into the client every > time I run puppet to see if puppet applied the updates correctly. I must be > doing it a few hundred times a day and it''s getting a bit old. > > Doug. > >Just tried to use reports for the first time, and I''m getting this on the puppetmaster for the first run of each node: Sep 28 00:28:28 s_sys@prov01.pax.livegamer.com puppet-master[13116]: (/File[/var/lib/puppet/reports/name02.den.livegamer.com]/ensure) change from absent to directory failed: Failed to set owner to ''0'': Operation not permitted - /var/lib/puppet/reports/name02.den.livegamer.com Sep 28 00:28:28 s_sys@prov01.pax.livegamer.com puppet-master[13116]: Report store failed: Got 1 failure(s) while initializing: change from absent to directory failed: Failed to set owner to ''0'': Operation not permitted - /var/lib/puppet/reports/name02.den.livegamer.com Dunno what that''s all about... Doug. -- 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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
On Mon, Sep 27, 2010 at 5:29 PM, Nigel Kersten <nigelk@google.com> wrote:> On Mon, Sep 27, 2010 at 5:22 PM, Douglas Garstang > <doug.garstang@gmail.com> wrote: > > On Mon, Sep 27, 2010 at 5:17 PM, Nigel Kersten <nigelk@google.com> > wrote: > >> > >> On Mon, Sep 27, 2010 at 5:09 PM, Douglas Garstang > >> <doug.garstang@gmail.com> wrote: > >> > On Mon, Sep 27, 2010 at 4:58 PM, Nigel Kersten <nigelk@google.com> > >> > wrote: > >> >> > >> >> On Mon, Sep 27, 2010 at 4:50 PM, Douglas Garstang > >> >> <doug.garstang@gmail.com> wrote: > >> >> > I''m trying to find a programmatic way to determine if the result of > a > >> >> > puppetrun was ok. Rather than scraping /var/log/messages, is there > >> >> > another > >> >> > way to determine that a puppet run completed with errors and how > long > >> >> > it > >> >> > took to run? Is that state maintained on the client''s disk > somewhere? > >> >> > >> >> What version of Puppet? > >> > > >> > Nigel, > >> > 2.6.1. > >> > > >> >> > >> >> How are you running the agent? out of cron? or as a daemon? > >> >> > >> > > >> > Agent is running as a daemon. I''m running puppetrun --host=<host> on > the > >> > puppetmaster. > >> > > >> >> > >> >> If you''re running it out of cron, there''s a —detailed-exitcodes > >> >> argument you can use to determine the client state. > >> >> > >> >> Have you looked at dumping a report at the end of your run and > whether > >> >> that reports the info you want? > >> >> > >> >> > >> > Not yet... can I do that if I use puppetrun on the puppetmaster? > >> > >> I''m not much of an expert in puppetrun as we don''t use it here. > >> > >> What''s the end goal? Do you want centralized reports that you can > >> analyze? or you just want to know whether the run had errors with > >> ad-hoc puppetruns ? > >> > > > > Nigel, the end goal is to not have to not have to log into the client > every > > time I run puppet to see if puppet applied the updates correctly. I must > be > > doing it a few hundred times a day and it''s getting a bit old. > > Doug. > > It really sounds like you want to set up centralized reporting. > > http://docs.puppetlabs.com/guides/reporting.html > > You may or may not find it easier to set up Puppet Dashboard or > Foreman to give you a visual view of the reports, or you may simply > wish to do some simple scans of the report yaml files on the > reportserver for errors. > >Nigel, having just done a quick run through of the reporting for the first time, I''ll just stick with the yaml files. They should provide what I need. It''s a bit hard to automate a GUI. Doug. -- 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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
On Mon, Sep 27, 2010 at 5:34 PM, Douglas Garstang <doug.garstang@gmail.com> wrote:> Just tried to use reports for the first time, and I''m getting this on the > puppetmaster for the first run of each node: > Sep 28 00:28:28 s_sys@prov01.pax.livegamer.com puppet-master[13116]: > (/File[/var/lib/puppet/reports/name02.den.livegamer.com]/ensure) change from > absent to directory failed: Failed to set owner to ''0'': Operation not > permitted - /var/lib/puppet/reports/name02.den.livegamer.com > Sep 28 00:28:28 s_sys@prov01.pax.livegamer.com puppet-master[13116]: Report > store failed: Got 1 failure(s) while initializing: change from absent to > directory failed: Failed to set owner to ''0'': Operation not permitted - > /var/lib/puppet/reports/name02.den.livegamer.com > Dunno what that''s all about...Sounds like it''s worth reporting as a bug if you''re sure you''ve followed the docs. I agree about hand-parsing the yaml files in a cron job or something. In many cases that''s sufficient. -- 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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
On Tue, Sep 28, 2010 at 2:35 AM, Douglas Garstang <doug.garstang@gmail.com>wrote:> Nigel, having just done a quick run through of the reporting for the first > time, I''ll just stick with the yaml files. They should provide what I need. > It''s a bit hard to automate a GUI. >What does that mean? which kind of automation are you looking for? -- 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+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.