Method: ATSD::Client#series_csv_insert

Defined in:
lib/atsd/client.rb

#series_csv_insert(entity, data, tags = {}) ⇒ true

Series CSV: Insert

Parameters:

  • entity (String)
  • data (String)

    Payload - CSV containing time column and one or multiple metric columns.

    • Separator must be comma.

    • Time must be specified in Unix milliseconds.

    • Time column must be first, name of the time column could be arbitrary.

  • tags (Hash) (defaults to: {})

    tag=value hash

Returns:

  • (true)

Raises:

See Also:



89
90
91
92
93
94
95
96
97
98
# File 'lib/atsd/client.rb', line 89

def series_csv_insert(entity, data, tags = {})
  request = @connection.build_request(:post) do |req|
    req.url("series/csv/#{CGI.escape(entity)}", tags)
    req.headers["Content-Type"] = 'text/csv'
    req.body = data
  end

  @connection.builder.build_response(@connection, request)
  true
end