Class: WavefrontCommandWrite

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

Overview

Define the write 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
# File 'lib/wavefront-cli/commands/write.rb', line 10

def _commands
  ['point [-DnV] [-c file] [-P profile] [-E proxy] [-t time] ' \
    '[-p port] [-H host] [-n] [-T tag...] <metric> <value>',
   'file [-DnV] [-c file] [-P profile] [-E proxy] [-H host] ' \
   '[-p port] [-n] [-F format] [-m metric] [-T tag...] <file>']
end

#_optionsObject



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

def _options
  ['-E, --proxy=URI            proxy endpoint',
   '-t, --time=TIME            time of data point (omit to use ' \
   'current time)',
   '-H, --host=STRING          source host', \
   '-p, --port=INT             Wavefront proxy port',
   '-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 concatenated']
end

#descriptionObject



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

def description
  'send data to a Wavefront proxy'
end

#postscriptObject



30
31
32
33
34
# File 'lib/wavefront-cli/commands/write.rb', line 30

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 and 'T' for tags. Put 'T' last.)
end