Dear community, I configure puppet dashboard on my server, in order to make it work I had to activate reports from clients. The thing is that my folder /var/lib/puppet/reports/ is now 1.6 Go large. Is there any mechanism available to auto delete old files ? Or should I configured my own script to clean up old reports ? Thanks in advance, Regards, Hugo -- 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 07/21/2011 03:14 AM, Hugo Deprez wrote:> > Is there any mechanism available to auto delete old files ? > Or should I configured my own script to clean up old reports ?I''m doing this: class puppet::clean_reports { cron { "puppet clean reports": command => ''cd /var/lib/puppet/reports && find . -type f -name \*.yaml -mtime +7 -print0 | xargs -0 -n50 /bin/rm -f'', user => root, hour => 21, minute => 22, weekday => 0, } } If there''s a better way I''d love to hear it. -- vagn -- 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 07/21/2011 08:08 AM, vagn scott wrote:> On 07/21/2011 03:14 AM, Hugo Deprez wrote: >> >> Is there any mechanism available to auto delete old files ? >> Or should I configured my own script to clean up old reports ? > > I''m doing this: > > class puppet::clean_reports { > > cron { "puppet clean reports": > command => ''cd /var/lib/puppet/reports && find . -type f > -name \*.yaml -mtime +7 -print0 | xargs -0 -n50 /bin/rm -f'', > user => root, > hour => 21, > minute => 22, > weekday => 0, > } > } > > If there''s a better way I''d love to hear it.Thinking about this some more, if you need the reports for dashboard to work, then any cleanup script should leave the latest report from any server, so that, even if the server has not checked in for a while it won''t disappear. Thanks for the question. Clearly I need to revisit this. -- vagn -- 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 07/21/2011 08:52 AM, vagn scott wrote:> Thinking about this some more, if you need the reports for dashboard > to work, > then any cleanup script should leave the latest report from any server, > so that, even if the server has not checked in for a while it won''t > disappear. > > Thanks for the question. Clearly I need to revisit this. >So, here is a script that ought to do the job. Not heavily tested yet. Please let me know if you have problems with it. --vagn #! /bin/sh # puppet-reports-stalker # vagn scott, 21-jul-2011 days="+7" # more than 7 days old for d in `find /var/lib/puppet/reports -mindepth 1 -maxdepth 1 -type d` do find $d -type f -name \*.yaml -mtime $days | sort -r | tail -n +2 | xargs -n50 /bin/rm -f done exit 0 And the updated class. class puppet::clean_reports { file { ''/usr/local/bin/puppet-reports-stalker'': source => ''puppet:///modules/puppet/puppet-reports-stalker'', before => Cron[ ''puppet clean reports'' ], mode => 755, owner => root, group => root, } cron { ''puppet clean reports'': command => ''/usr/local/bin/puppet-reports-stalker'', user => root, hour => 21, minute => 22, weekday => 0, } } -- 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.
Excellent fix to a perplexing problem. Thanks! On Thursday, July 21, 2011 8:50:32 AM UTC-5, vagn wrote:> > On 07/21/2011 08:52 AM, vagn scott wrote: > > Thinking about this some more, if you need the reports for dashboard > > to work, > > then any cleanup script should leave the latest report from any server, > > so that, even if the server has not checked in for a while it won''t > > disappear. > > > > Thanks for the question. Clearly I need to revisit this. > > > > So, here is a script that ought to do the job. Not heavily tested yet. > Please let me know if you have problems with it. --vagn > > #! /bin/sh > # puppet-reports-stalker > # vagn scott, 21-jul-2011 > > days="+7" # more than 7 days old > > for d in `find /var/lib/puppet/reports -mindepth 1 -maxdepth 1 -type d` > do > find $d -type f -name \*.yaml -mtime $days | > sort -r | > tail -n +2 | > xargs -n50 /bin/rm -f > done > > exit 0 > > > And the updated class. > > class puppet::clean_reports { > > file { ''/usr/local/bin/puppet-reports-stalker'': > source => > ''puppet:///modules/puppet/puppet-reports-stalker'', > before => Cron[ ''puppet clean reports'' ], > mode => 755, > owner => root, > group => root, > } > > cron { ''puppet clean reports'': > command => ''/usr/local/bin/puppet-reports-stalker'', > user => root, > hour => 21, > minute => 22, > weekday => 0, > } > } > > >-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/g5uMpBkZnvMJ. 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 Thursday, July 21, 2011 8:50:32 AM UTC-5, vagn wrote: > find $d -type f -name \*.yaml -mtime $days | > sort -r | > tail -n +2 | > xargs -n50 /bin/rm -fAll this is really better than…? find $d -type f -name \*.yaml -mtime $days -exec rm -f {} \; -- Jo Rhett Net Consonance : net philanthropy to improve open source and internet projects. -- 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.
Great solution. Simple, effective. Thanks. On Thursday, 21 July 2011 14:50:32 UTC+1, vagn wrote:> > On 07/21/2011 08:52 AM, vagn scott wrote: > > Thinking about this some more, if you need the reports for dashboard > > to work, > > then any cleanup script should leave the latest report from any server, > > so that, even if the server has not checked in for a while it won''t > > disappear. > > > > Thanks for the question. Clearly I need to revisit this. > > > > So, here is a script that ought to do the job. Not heavily tested yet. > Please let me know if you have problems with it. --vagn > > #! /bin/sh > # puppet-reports-stalker > # vagn scott, 21-jul-2011 > > days="+7" # more than 7 days old > > for d in `find /var/lib/puppet/reports -mindepth 1 -maxdepth 1 -type d` > do > find $d -type f -name \*.yaml -mtime $days | > sort -r | > tail -n +2 | > xargs -n50 /bin/rm -f > done > > exit 0 > > > And the updated class. > > class puppet::clean_reports { > > file { ''/usr/local/bin/puppet-reports-stalker'': > source => > ''puppet:///modules/puppet/puppet-reports-stalker'', > before => Cron[ ''puppet clean reports'' ], > mode => 755, > owner => root, > group => root, > } > > cron { ''puppet clean reports'': > command => ''/usr/local/bin/puppet-reports-stalker'', > user => root, > hour => 21, > minute => 22, > weekday => 0, > } > } > > >-- 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+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
How about logrotate ? On Jan 30, 2013, at 11:53 AM, Andrew Sinclair wrote:> Great solution. Simple, effective. Thanks. > > On Thursday, 21 July 2011 14:50:32 UTC+1, vagn wrote: > On 07/21/2011 08:52 AM, vagn scott wrote: > > Thinking about this some more, if you need the reports for dashboard > > to work, > > then any cleanup script should leave the latest report from any server, > > so that, even if the server has not checked in for a while it won''t > > disappear. > > > > Thanks for the question. Clearly I need to revisit this. > > > So, here is a script that ought to do the job. Not heavily tested yet. > Please let me know if you have problems with it. --vagn > > #! /bin/sh > # puppet-reports-stalker > # vagn scott, 21-jul-2011 > > days="+7" # more than 7 days old > > for d in `find /var/lib/puppet/reports -mindepth 1 -maxdepth 1 -type d` > do > find $d -type f -name \*.yaml -mtime $days | > sort -r | > tail -n +2 | > xargs -n50 /bin/rm -f > done > > exit 0 > > > And the updated class. > > class puppet::clean_reports { > > file { ''/usr/local/bin/puppet-reports-stalker'': > source => ''puppet:///modules/puppet/puppet-reports-stalker'', > before => Cron[ ''puppet clean reports'' ], > mode => 755, > owner => root, > group => root, > } > > cron { ''puppet clean reports'': > command => ''/usr/local/bin/puppet-reports-stalker'', > user => root, > hour => 21, > minute => 22, > weekday => 0, > } > } > > > > > > > > > > > > > > -- > 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+unsubscribe@googlegroups.com. > To post to this group, send email to puppet-users@googlegroups.com. > Visit this group at http://groups.google.com/group/puppet-users?hl=en. > 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+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
I take back my suggestion. LogRotate is not built to handle many little log files with different names. I found out the hard way - I tried to make it work :( The script by vagn will do the trick. Another suggestion: put a variable in the line "tail -n +2” in place of the “2” for how-many-files-to-keep+1 -- “2” only keeps one file. Other folks may want to keep more. On Jan 31, 2013, at 10:23 PM, Dan White wrote:> How about logrotate ? > > On Jan 30, 2013, at 11:53 AM, Andrew Sinclair wrote: > >> Great solution. Simple, effective. Thanks. >> >> On Thursday, 21 July 2011 14:50:32 UTC+1, vagn wrote: >> On 07/21/2011 08:52 AM, vagn scott wrote: >> > Thinking about this some more, if you need the reports for dashboard >> > to work, >> > then any cleanup script should leave the latest report from any server, >> > so that, even if the server has not checked in for a while it won''t >> > disappear. >> > >> > Thanks for the question. Clearly I need to revisit this. >> > >> So, here is a script that ought to do the job. Not heavily tested yet. >> Please let me know if you have problems with it. --vagn >> >> #! /bin/sh >> # puppet-reports-stalker >> # vagn scott, 21-jul-2011 >> >> days="+7" # more than 7 days old >> >> for d in `find /var/lib/puppet/reports -mindepth 1 -maxdepth 1 -type d` >> do >> find $d -type f -name \*.yaml -mtime $days | >> sort -r | >> tail -n +2 | >> xargs -n50 /bin/rm -f >> done >> >> exit 0 >> >> >> And the updated class. >> >> class puppet::clean_reports { >> >> file { ''/usr/local/bin/puppet-reports-stalker'': >> source => ''puppet:///modules/puppet/puppet-reports-stalker'', >> before => Cron[ ''puppet clean reports'' ], >> mode => 755, >> owner => root, >> group => root, >> } >> >> cron { ''puppet clean reports'': >> command => ''/usr/local/bin/puppet-reports-stalker'', >> user => root, >> hour => 21, >> minute => 22, >> weekday => 0, >> } >> } >> >> >> >> >> >> >> >> >> >> >> >> >> >> -- >> 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+unsubscribe@googlegroups.com. >> To post to this group, send email to puppet-users@googlegroups.com. >> Visit this group at http://groups.google.com/group/puppet-users?hl=en. >> 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+unsubscribe@googlegroups.com. > To post to this group, send email to puppet-users@googlegroups.com. > Visit this group at http://groups.google.com/group/puppet-users?hl=en. > 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+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
tmpwatch is also a good approach: http://linux.about.com/library/cmd/blcmdl8_tmpwatch.htm. Probably requires less scripting, and its already on most distros, probably cleaning your /tmp directories already. On Sat, Feb 2, 2013 at 6:07 PM, Dan White <ygor@comcast.net> wrote:> I take back my suggestion. > LogRotate is not built to handle many little log files with different names. > I found out the hard way - I tried to make it work :( > > The script by vagn will do the trick. > > Another suggestion: put a variable in the line "tail -n +2” in place of the > “2” for how-many-files-to-keep+1 -- “2” only keeps one file. Other folks > may want to keep more. > > On Jan 31, 2013, at 10:23 PM, Dan White wrote: > > How about logrotate ? > > On Jan 30, 2013, at 11:53 AM, Andrew Sinclair wrote: > > Great solution. Simple, effective. Thanks. > > On Thursday, 21 July 2011 14:50:32 UTC+1, vagn wrote: >> >> On 07/21/2011 08:52 AM, vagn scott wrote: >> > Thinking about this some more, if you need the reports for dashboard >> > to work, >> > then any cleanup script should leave the latest report from any server, >> > so that, even if the server has not checked in for a while it won''t >> > disappear. >> > >> > Thanks for the question. Clearly I need to revisit this. >> > >> >> So, here is a script that ought to do the job. Not heavily tested yet. >> Please let me know if you have problems with it. --vagn >> >> #! /bin/sh >> # puppet-reports-stalker >> # vagn scott, 21-jul-2011 >> >> days="+7" # more than 7 days old >> >> for d in `find /var/lib/puppet/reports -mindepth 1 -maxdepth 1 -type d` >> do >> find $d -type f -name \*.yaml -mtime $days | >> sort -r | >> tail -n +2 | >> xargs -n50 /bin/rm -f >> done >> >> exit 0 >> >> >> And the updated class. >> >> class puppet::clean_reports { >> >> file { ''/usr/local/bin/puppet-reports-stalker'': >> source => >> ''puppet:///modules/puppet/puppet-reports-stalker'', >> before => Cron[ ''puppet clean reports'' ], >> mode => 755, >> owner => root, >> group => root, >> } >> >> cron { ''puppet clean reports'': >> command => ''/usr/local/bin/puppet-reports-stalker'', >> user => root, >> hour => 21, >> minute => 22, >> weekday => 0, >> } >> } >> >> >> >> >> >> >> >> >> >> >> > > -- > 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+unsubscribe@googlegroups.com. > To post to this group, send email to puppet-users@googlegroups.com. > Visit this group at http://groups.google.com/group/puppet-users?hl=en. > 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+unsubscribe@googlegroups.com. > To post to this group, send email to puppet-users@googlegroups.com. > Visit this group at http://groups.google.com/group/puppet-users?hl=en. > 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+unsubscribe@googlegroups.com. > To post to this group, send email to puppet-users@googlegroups.com. > Visit this group at http://groups.google.com/group/puppet-users?hl=en. > 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+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
tmpwatch/tmpreaper (for Ubuntu) is first thing I though about too - but the vagn has a good point about better keeping the latest report from each server, which justifies using his script. On Sunday, 3 February 2013 04:17:30 UTC+11, Ken Barber wrote:> > tmpwatch is also a good approach: > http://linux.about.com/library/cmd/blcmdl8_tmpwatch.htm. Probably > requires less scripting, and its already on most distros, probably > cleaning your /tmp directories already. > > On Sat, Feb 2, 2013 at 6:07 PM, Dan White <yg...@comcast.net <javascript:>> > wrote: > > I take back my suggestion. > > LogRotate is not built to handle many little log files with different > names. > > I found out the hard way - I tried to make it work :( > > > > The script by vagn will do the trick. > > > > Another suggestion: put a variable in the line "tail -n +2” in place of > the > > “2” for how-many-files-to-keep+1 -- “2” only keeps one file. Other > folks > > may want to keep more. > > > > On Jan 31, 2013, at 10:23 PM, Dan White wrote: > > > > How about logrotate ? > > > > On Jan 30, 2013, at 11:53 AM, Andrew Sinclair wrote: > > > > Great solution. Simple, effective. Thanks. > > > > On Thursday, 21 July 2011 14:50:32 UTC+1, vagn wrote: > >> > >> On 07/21/2011 08:52 AM, vagn scott wrote: > >> > Thinking about this some more, if you need the reports for dashboard > >> > to work, > >> > then any cleanup script should leave the latest report from any > server, > >> > so that, even if the server has not checked in for a while it won''t > >> > disappear. > >> > > >> > Thanks for the question. Clearly I need to revisit this. > >> > > >> > >> So, here is a script that ought to do the job. Not heavily tested yet. > >> Please let me know if you have problems with it. --vagn > >> > >> #! /bin/sh > >> # puppet-reports-stalker > >> # vagn scott, 21-jul-2011 > >> > >> days="+7" # more than 7 days old > >> > >> for d in `find /var/lib/puppet/reports -mindepth 1 -maxdepth 1 -type d` > >> do > >> find $d -type f -name \*.yaml -mtime $days | > >> sort -r | > >> tail -n +2 | > >> xargs -n50 /bin/rm -f > >> done > >> > >> exit 0 > >> > >> > >> And the updated class. > >> > >> class puppet::clean_reports { > >> > >> file { ''/usr/local/bin/puppet-reports-stalker'': > >> source => > >> ''puppet:///modules/puppet/puppet-reports-stalker'', > >> before => Cron[ ''puppet clean reports'' ], > >> mode => 755, > >> owner => root, > >> group => root, > >> } > >> > >> cron { ''puppet clean reports'': > >> command => ''/usr/local/bin/puppet-reports-stalker'', > >> user => root, > >> hour => 21, > >> minute => 22, > >> weekday => 0, > >> } > >> } > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > >> > > > > -- > > 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...@googlegroups.com <javascript:>. > > To post to this group, send email to puppet...@googlegroups.com<javascript:>. > > > Visit this group at http://groups.google.com/group/puppet-users?hl=en. > > 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...@googlegroups.com <javascript:>. > > To post to this group, send email to puppet...@googlegroups.com<javascript:>. > > > Visit this group at http://groups.google.com/group/puppet-users?hl=en. > > 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...@googlegroups.com <javascript:>. > > To post to this group, send email to puppet...@googlegroups.com<javascript:>. > > > Visit this group at http://groups.google.com/group/puppet-users?hl=en. > > 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+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
On 02/02/2013 06:17 PM, Ken Barber wrote:> tmpwatch is also a good approach: > http://linux.about.com/library/cmd/blcmdl8_tmpwatch.htm. Probably > requires less scripting, and its already on most distros, probably > cleaning your /tmp directories already.What about ''tidy'' resource? We use that, with 1 day retention and puppet runs on master every 30 min. So basically in worst case scenario we have 24h29min of reports. -- Jakov Sosic www.srce.unizg.hr -- 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+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.
Using tidy to clean up logs, this is pretty self-explanatory, so I wont bother explaining :) case $hostname { /^puppet$/: { tidy { ''puppet::reports'': path => ''/var/lib/puppet/reports'', matches => ''*'', age => ''14d'', backup => false, recurse => true, rmdirs => true, type => ''ctime'', } # notify { "debug: tidy command should run now": } } } Ciao, Andrew. -- 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+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.
OK, but the reports live on the puppetmaster. How do you get a list of hostnames to apply to this resource definition ? On Sep 10, 2013, at 10:12 PM, Andrew wrote:> Using tidy to clean up logs, this is pretty self-explanatory, so I wont bother explaining :) > > case $hostname { > /^puppet$/: { > tidy { ''puppet::reports'': > path => ''/var/lib/puppet/reports'', > matches => ''*'', > age => ''14d'', > backup => false, > recurse => true, > rmdirs => true, > type => ''ctime'', > } > # notify { "debug: tidy command should run now": } > } > } > > > > Ciao, > Andrew. > > > -- > 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+unsubscribe@googlegroups.com. > To post to this group, send email to puppet-users@googlegroups.com. > Visit this group at http://groups.google.com/group/puppet-users. > 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+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.
hi dan, it applies only to any server with a shortform dnsname == puppet. the facter variable $hostname matches the puppet master server name. alternatively, remove the case statement, put it in it''s own class and apply that class specifically to your puppetmaster server. Andrew On Thu, Sep 12, 2013 at 7:22 AM, Dan White <ygor@comcast.net> wrote:> OK, but the reports live on the puppetmaster. How do you get a list of > hostnames to apply to this resource definition ? > > On Sep 10, 2013, at 10:12 PM, Andrew wrote: > > Using tidy to clean up logs, this is pretty self-explanatory, so I wont > bother explaining :) > > case $hostname { > /^puppet$/: { > tidy { ''puppet::reports'': > path => ''/var/lib/puppet/reports'', > matches => ''*'', > age => ''14d'', > backup => false, > recurse => true, > rmdirs => true, > type => ''ctime'', > } > # notify { "debug: tidy command should run now": } > } > } > > > Ciao, > Andrew. > > -- > 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+unsubscribe@googlegroups.com. > > To post to this group, send email to puppet-users@googlegroups.com. > Visit this group at http://groups.google.com/group/puppet-users. > For more options, visit https://groups.google.com/groups/opt_out. > > > -- > You received this message because you are subscribed to a topic in the > Google Groups "Puppet Users" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/puppet-users/q8vWDr3bn4Q/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > puppet-users+unsubscribe@googlegroups.com. > To post to this group, send email to puppet-users@googlegroups.com. > Visit this group at http://groups.google.com/group/puppet-users. > 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+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.
That makes sense. Thanks. “Sometimes I think the surest sign that intelligent life exists elsewhere in the universe is that none of it has tried to contact us.” Bill Waterson (Calvin & Hobbes) ----- Original Message ----- From: "Andrew G" <andrewgray1965@gmail.com> To: puppet-users@googlegroups.com Sent: Thursday, September 12, 2013 1:28:26 AM Subject: Re: [Puppet Users] Purge puppet''s reports hi dan, it applies only to any server with a shortform dnsname == puppet. the facter variable $hostname matches the puppet master server name. alternatively, remove the case statement, put it in it''s own class and apply that class specifically to your puppetmaster server. Andrew On Thu, Sep 12, 2013 at 7:22 AM, Dan White < ygor@comcast.net > wrote: OK, but the reports live on the puppetmaster. How do you get a list of hostnames to apply to this resource definition ? On Sep 10, 2013, at 10:12 PM, Andrew wrote: <blockquote> Using tidy to clean up logs, this is pretty self-explanatory, so I wont bother explaining :) case $hostname { /^puppet$/: { tidy { ''puppet::reports'': path => ''/var/lib/puppet/reports'', matches => ''*'', age => ''14d'', backup => false, recurse => true, rmdirs => true, type => ''ctime'', } # notify { "debug: tidy command should run now": } } } Ciao, Andrew. -- 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+unsubscribe@googlegroups.com . To post to this group, send email to puppet-users@googlegroups.com . Visit this group at http://groups.google.com/group/puppet-users . For more options, visit https://groups.google.com/groups/opt_out . -- You received this message because you are subscribed to a topic in the Google Groups "Puppet Users" group. To unsubscribe from this topic, visit https://groups.google.com/d/topic/puppet-users/q8vWDr3bn4Q/unsubscribe . To unsubscribe from this group and all its topics, send an email to puppet-users+unsubscribe@googlegroups.com . To post to this group, send email to puppet-users@googlegroups.com . Visit this group at http://groups.google.com/group/puppet-users . For more options, visit https://groups.google.com/groups/opt_out . </blockquote> -- 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+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users . 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+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.
Be aware that this will create a file resource/checksum for EVERY file in that directory and may cause a heavy load on your system if you have a lot of reports. Trevor On Tue, Sep 10, 2013 at 10:12 PM, Andrew <andrewgray1965@gmail.com> wrote:> Using tidy to clean up logs, this is pretty self-explanatory, so I wont > bother explaining :) > > case $hostname { > /^puppet$/: { > tidy { ''puppet::reports'': > path => ''/var/lib/puppet/reports'', > matches => ''*'', > age => ''14d'', > backup => false, > recurse => true, > rmdirs => true, > type => ''ctime'', > } > # notify { "debug: tidy command should run now": } > } > } > > > Ciao, > Andrew. > > -- > 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+unsubscribe@googlegroups.com. > To post to this group, send email to puppet-users@googlegroups.com. > Visit this group at http://groups.google.com/group/puppet-users. > For more options, visit https://groups.google.com/groups/opt_out. >-- Trevor Vaughan Vice President, Onyx Point, Inc (410) 541-6699 tvaughan@onyxpoint.com -- This account not approved for unencrypted proprietary information -- -- 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+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.
One thing I found after manually deleting gb''s of reports was that they still exists in dashboard but failed to load when you click on them. Don''t forget to run the command suggested in http://docs.puppetlabs.com/dashboard/manual/1.2/maintaining.html Josh -- 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+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.