class NetuitiveD::IngestMetric

Attributes

aggregate[RW]
id[RW]
name[RW]
tags[RW]
type[RW]
unit[RW]

Public Class Methods

new(id, name, unit, type, tags, aggregate) click to toggle source
# File lib/netuitived/ingest_metric.rb, line 4
def initialize(id, name, unit, type, tags, aggregate)
  @id = id
  @name = name
  @unit = unit
  @type = type
  @tags = tags
  @aggregate = aggregate
end

Public Instance Methods

to_json(_options = {}) click to toggle source
# File lib/netuitived/ingest_metric.rb, line 13
def to_json(_options = {})
  { 'id' => @id,
    'name' => @name,
    'unit' => @unit,
    'type' => @type,
    'tags' => @tags }.to_json
end