class Object

Constants

CHECK_PATTERN_FRAGMENT
ENTITY_PATTERN_FRAGMENT

To see the state of the redis databases before and after, e.g. (using nodejs ‘npm install redis-dump -g’)

be ruby bin/flapjack migrate to_v2 --source=redis://127.0.0.1/7 --destination=redis://127.0.0.1/8
redis-dump -d 7 >~/Desktop/dump7.txt && redis-dump -d 8 >~/Desktop/dump8.txt

 Not migrated:
    current alertable/rollup status (these should reset on app start)
    notifications/alerts (see note above)
ID_PATTERN_FRAGMENT
TAG_PATTERN_FRAGMENT

Public Instance Methods

common_arguments(cmd_type, gli_cmd) click to toggle source
# File lib/flapjack/cli/maintenance.rb, line 276
def common_arguments(cmd_type, gli_cmd)

  if [:show, :delete, :create].include?(cmd_type)
    gli_cmd.flag ['check', :c],
      :desc => 'The check for the maintenance window to occur on. This can ' +
        'be a string, or a Ruby regex of the form \'http*\' or \'[[:lower:]]\'',
      :required => :create.eql?(cmd_type)

    gli_cmd.flag ['reason', :r],
      :desc => 'The reason for the maintenance window to occur. This can ' +
        'be a string, or a Ruby regex of the form \'Downtime for *\' or ' +
        '\'[[:lower:]]\''

    gli_cmd.flag ['start', 'started', 'starting', :s],
      :desc => 'The start time for the maintenance window. This should ' +
               'be prefixed with "more than", "less than", "on", "before", ' +
               'or "after", or of the form "between T1 and T2"',
      :must_match => /^(?:more than|less than|on|before|after|between)\s+.+$/

    gli_cmd.flag ['duration', :d],
      :desc => 'The total duration of the maintenance window. This should ' +
               'be prefixed with "more than", "less than", or "equal to", ' +
               'or of the form "between M and N hours". This should be an ' +
               ' interval',
      :must_match => /^(?:more than|less than|equal to|between)\s+.+$/
  end

  if [:show, :delete].include?(cmd_type)
    gli_cmd.flag ['finish', 'finished', 'finishing', 'remain', 'remained', 'remaining', 'end', :f],
      :desc => 'The finishing time for the maintenance window. This should ' +
               'prefixed with "more than", "less than", "on", "before", or ' +
               '"after", or of the form "between T1 and T2"' ,
      :must_match => /^(?:more than|less than|on|before|after|between)\s+.+$/

    gli_cmd.flag ['state', :st],
      :desc => 'The state that the check is currently in',
      :must_match => %w(ok warning critical unknown)
  end

  if [:show, :delete, :create].include?(cmd_type)
    gli_cmd.flag ['type', :t],
      :desc          => 'The type of maintenance scheduled',
      :required      => true,
      :default_value => 'scheduled',
      :must_match    => %w(scheduled unscheduled)
  end

end