Feature #364

Enable "downtime" in Foreman

Added by Eric Shamow over 1 year ago. Updated over 1 year ago.

Status:Closed Start:08/23/2010
Priority:Normal Due date:
Assigned to:Eric Shamow % Done:

100%

Category:Reporting
Target version:0.1-6
Backlog: Difficulity:
Votes: 0

Description

Enable a per-host "downtime" that would suppress the sending of error mails. Perhaps hosts in downtime could appear as a separate category in the regular Foreman report that's sent out.

This would allow users to perform maintenance on active Puppet machines without sending out a torrent of false alarms.

enabledowntime.patch - Patch to check host.enabled value before sending mail (684 Bytes) Eric Shamow, 08/23/2010 11:38 pm

20100823181036_add_enabled_to_hosts.rb - Add enabled flag to hosts (189 Bytes) Eric Shamow, 08/23/2010 11:42 pm

displaydowntime.patch - Display enabled flag on host page (593 Bytes) Eric Shamow, 08/23/2010 11:55 pm


Related issues

related to Foreman - Bug #369: Problem with e-mail reports after "downtime" patch applied Closed 08/31/2010

Associated revisions

Revision 5aee72686d733c9be2c75c064a73dc840f2753db
Added by Eric Shamow over 1 year ago

fixes #364 - Enable "downtime" in Foreman
  • Added checkbox for enabling and disabling hosts from edit screen
  • Enabling e-mail reports for hosts in downtime
  • Added dashboard links to disabled hosts
  • Added basic tests

Revision 80b8223d438d5817e3c61ccda24a50fb75a6067b
Added by Ohad Levy over 1 year ago

refs #364, adding default layout to all dashboard actions

History

Updated by Eric Shamow over 1 year ago

Created db migration to generate the field:

class AddEnabledToHosts < ActiveRecord::Migration
def self.up
add_column :hosts, :enabled, :boolean, :default => 1
end

def self.down
remove_column :hosts, :enabled
end
end

Now working on report code to detect that enabled = false. Enabled = true results in message being sent through unchanged.

Updated by Eric Shamow over 1 year ago

Modified report_observer.rb to check flag status. Patch attached.

Updated by Eric Shamow over 1 year ago

DB migration file attached

Updated by Eric Shamow over 1 year ago

Added a line to display enabled/disabled status on host page

Updated by Ohad Levy over 1 year ago

looks good, a few comments:

  1. consider using git, it makes this patching stuff much easier :)
  2. I would think that hosts that are disabled, should not appear in the dashboard - do you agree?
  3. it should be possible to toggle a host (enable / disable) - maybe a minor change in the host edit
  4. maybe it should also be considered to enable / disable multiple hosts at the same time (can be a separate feature request)
  5. filter hosts based on status (e.g. show all hosts which are disabled?)

Updated by Ohad Levy over 1 year ago

  • Category set to Reporting
  • Assigned to set to Eric Shamow
  • Target version set to 0.1-6

Updated by Anonymous over 1 year ago

  • Status changed from New to Ready For Testing
  • % Done changed from 50 to 100

Updated by Ohad Levy over 1 year ago

  • Status changed from Ready For Testing to Closed

Also available in: Atom PDF