Project

General

Profile

Feature #364

Enable "downtime" in Foreman

Added by Eric Shamow almost 12 years ago. Updated almost 12 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Reporting
Target version:
Difficulty:
Triaged:
No
Bugzilla link:
Pull request:
Fixed in Releases:
Found in Releases:

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 enabledowntime.patch 684 Bytes Patch to check host.enabled value before sending mail Eric Shamow, 08/23/2010 11:38 PM
20100823181036_add_enabled_to_hosts.rb 20100823181036_add_enabled_to_hosts.rb 189 Bytes Add enabled flag to hosts Eric Shamow, 08/23/2010 11:42 PM
displaydowntime.patch displaydowntime.patch 593 Bytes Display enabled flag on host page Eric Shamow, 08/23/2010 11:55 PM

Related issues

Related to Foreman - Bug #369: Problem with e-mail reports after "downtime" patch appliedClosed2010-08-31

Associated revisions

Revision 5aee7268 (diff)
Added by Eric Shamow almost 12 years 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 80b8223d (diff)
Added by Ohad Levy almost 12 years ago

refs #364, adding default layout to all dashboard actions

History

#1 Updated by Eric Shamow almost 12 years 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.

#2 Updated by Eric Shamow almost 12 years ago

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

#4 Updated by Eric Shamow almost 12 years ago

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

#5 Updated by Ohad Levy almost 12 years 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?)

#6 Updated by Ohad Levy almost 12 years ago

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

#7 Updated by Anonymous almost 12 years ago

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

#8 Updated by Ohad Levy almost 12 years ago

  • Status changed from Ready For Testing to Closed

Also available in: Atom PDF