Feature #364
closed
Enable "downtime" in Foreman
Added by Eric Shamow over 14 years ago.
Updated about 14 years ago.
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.
Files
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.
Modified report_observer.rb to check flag status. Patch attached.
DB migration file attached
Added a line to display enabled/disabled status on host page
looks good, a few comments:
- consider using git, it makes this patching stuff much easier :)
- I would think that hosts that are disabled, should not appear in the dashboard - do you agree?
- it should be possible to toggle a host (enable / disable) - maybe a minor change in the host edit
- maybe it should also be considered to enable / disable multiple hosts at the same time (can be a separate feature request)
- filter hosts based on status (e.g. show all hosts which are disabled?)
- Category set to Reporting
- Assignee set to Eric Shamow
- Target version set to 0.1-6
- Status changed from New to Ready For Testing
- % Done changed from 50 to 100
- Status changed from Ready For Testing to Closed
Also available in: Atom
PDF