Adjective: Comparative form of nerdy: more nerdy.

The foreman out of sync duration.

The default out of sync duration is the puppet run duration + 5 minutes, as we run the puppet default it makes it 35 minutes. This however means that there are ~15 out of sync hosts at any time that just haven’t ran in an hour which isn’t a huge problem for us.

I wanted to change the out of sync duration to 90 minutes, so if they have missed three runs we would get notified.

My solution is as follows, and is a bit of a hack.


scope :out_of_sync, lambda { |*args| {:conditions => ["last_report < ? and enabled != ?", (args.first || (Setting[:puppet_interval] + 60).minutes.ago), false]} }


<%= searchable_links _('Out of sync hosts'),
                         "last_report < \"#{Setting[:puppet_interval] + 60} minutes ago\" and status.enabled = true",


def out_of_sync
  merge_search_filter("last_report < \"#{Setting[:puppet_interval] + 60} minutes ago\" and status.enabled = true")
  index _("Hosts which didn't run puppet in the last %s") % (view_context.time_ago_in_words((Setting[:puppet_interval]+60).minutes.ago))


Leave a Reply

Your email address will not be published. Required fields are marked *