Class: WavefrontCommandReport

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

Overview

Define the report command.

Instance Method Summary collapse

Methods inherited from WavefrontCommandBase

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

Instance Method Details

#_commandsObject



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

def _commands
  ["point #{CMN} [-s time] [-H host] [-T tag...] [-iq] <metric> <value>",
   "file #{CMN} [-H host] [-F format] [-m metric] [-T tag...] " \
   '[-iq] <file>']
end

#_optionsObject



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

def _options
  [common_options,
   '-s, --time=TIME            time of data point (omit to use ' \
   'current time)',
   '-H, --host=STRING          source host', \
   '-T, --tag=TAG              point tag in key=value form',
   '-F, --infileformat=STRING  format of input file or stdin',
   '-m, --metric=STRING        the metric path to which contents of ' \
   'a file will be assigned. If the file contains a metric name, ' \
   'the two will be dot-concatenated, with this value first',
   '-i, --delta                increment metric by given value',
   "-q, --quiet                don't report the points sent summary " \
   '(unless there were errors)']
end

#descriptionObject



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

def description
  'send data directly to Wavefront'
end

#postscriptObject



31
32
33
34
35
36
# File 'lib/wavefront-cli/commands/report.rb', line 31

def postscript
  'Files are whitespace separated, and fields can be defined ' \
  "with the '-F' option.  Use 't' for timestamp, 'm' for metric " \
  "name, 'v' for value, 's' for source, and 'T' for tags. Put 'T' " \
  'last.'.cmd_fold(TW, 0)
end