Class: WavefrontCommandEvent

Inherits:
WavefrontCommandBase show all
Defined in:
lib/wavefront-cli/commands/event.rb

Overview

Define the event command.

Instance Method Summary collapse

Methods inherited from WavefrontCommandBase

#column_widths, #commands, #common_options, #docopt, #global_options, #opt_row, #options, #sdk_class, #sdk_file, #tag_commands, #word

Instance Method Details

#_commandsObject



10
11
12
13
14
15
16
17
18
19
20
21
# File 'lib/wavefront-cli/commands/event.rb', line 10

def _commands
  ["list #{CMN} [-l] [-f format] [-s start] [-e end] [-L limit] " \
    '[-o offset]',
   "describe #{CMN} [-f format] <id>",
   "create #{CMN} [-d description] [-s time] [-i | -e time] " \
   '[-S severity] [-T type] [-H host...] [-N] <event>',
   "close #{CMN} [<id>]",
   "delete #{CMN} <id>",
   "update #{CMN} <key=value> <id>",
   tag_commands,
   'show [-D]']
end

#_optionsObject



23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# File 'lib/wavefront-cli/commands/event.rb', line 23

def _options
  [common_options,
   '-l, --long                list events in detail',
   '-o, --offset=n            start list from nth event',
   '-L, --limit=COUNT         number of events to list',
   '-s, --start=TIME          time at which event/window begins',
   '-e, --end=TIME            time at which even/window  ends',
   '-S, --severity=SEVERITY   severity of event',
   '-i, --instant             create an instantaneous event',
   '-T, --type=TYPE           type of event',
   '-d, --desc=STRING         description of event',
   '-H, --host=STRING         source to which event applies',
   '-N, --nostate             do not create a local file recording ' \
   'the event',
   '-f, --format=STRING        output format']
end

#descriptionObject



6
7
8
# File 'lib/wavefront-cli/commands/event.rb', line 6

def description
  'open, close, view, and manage events'
end

#postscriptObject



40
41
42
43
# File 'lib/wavefront-cli/commands/event.rb', line 40

def postscript
  "View events in detail using the 'query' command with the " \
    "'events()' function."
end