Class: WavefrontCommandDerivedmetric

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

Overview

Define the derivedmetric command.

Instance Method Summary collapse

Methods inherited from WavefrontCommandBase

#acl_commands, #commands, #common_options, #docopt, #global_options, #opt_row, #option_column_width, #options, #postscript, #tag_commands, #word

Instance Method Details

#_commandsObject



18
19
20
21
22
23
24
25
26
27
28
29
30
# File 'lib/wavefront-cli/commands/derivedmetric.rb', line 18

def _commands
  ["list #{CMN} [-al] [-O fields] [-o offset] [-L limit]",
   "describe #{CMN} [-v version] <id>",
   "create #{CMN} [-d description] [-T tag...] [-b] [-i interval] " \
   '[-r range] <name> <query>',
   "import #{CMN} <file>",
   "update #{CMN} <key=value> <id>",
   "delete #{CMN} <id>",
   "undelete #{CMN} <id>",
   "history #{CMN} [-o offset] [-L limit] <id>",
   "search #{CMN} [-al] [-o offset] [-L limit] <condition>...",
   tag_commands]
end

#_optionsObject



32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# File 'lib/wavefront-cli/commands/derivedmetric.rb', line 32

def _options
  [common_options,
   '-l, --long              list derived metrics in detail',
   '-a, --all               list all derived metrics',
   '-o, --offset=n          start list from nth derived metrics or ' \
                            'revision',
   '-O, --fields=F1,F2,...  only show given fields',
   '-L, --limit=COUNT       number of derived metrics or revisions to ' \
                            'list',
   '-v, --version=INTEGER   version of derived metrics',
   '-b, --obsolete          include obsolete metrics',
   '-T, --ctag=STRING       add customer tag',
   '-d, --desc=STRING       additional information about query',
   '-i, --interval=INTEGER  execute query every n minutes [default: 1]',
   '-r, --range=INTEGER     include results in the last n minutes ' \
                            '[default: 5]',
   '-f, --format=STRING   output format']
end

#descriptionObject



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

def description
  'view and manage derived metrics'
end

#sdk_classObject



14
15
16
# File 'lib/wavefront-cli/commands/derivedmetric.rb', line 14

def sdk_class
  'DerivedMetric'
end

#sdk_fileObject



10
11
12
# File 'lib/wavefront-cli/commands/derivedmetric.rb', line 10

def sdk_file
  'derivedmetric'
end