Documentation ¶
Index ¶
- func ParseByte(dataItem MetricDataFormat, data []byte) error
- type CeilometerMetric
- func (c *CeilometerMetric) GetInterval() float64
- func (c *CeilometerMetric) GetItemKey() string
- func (c *CeilometerMetric) GetKey() string
- func (c *CeilometerMetric) GetLabels() map[string]string
- func (c *CeilometerMetric) GetMetricDesc(index int) string
- func (c *CeilometerMetric) GetMetricName(index int) string
- func (c *CeilometerMetric) GetName() string
- func (c *CeilometerMetric) ISNew() bool
- func (c *CeilometerMetric) ParseInputByte(data []byte) error
- func (c *CeilometerMetric) ParseInputJSON(json string) ([]MetricDataFormat, error)
- func (c *CeilometerMetric) SetData(data MetricDataFormat)
- func (c *CeilometerMetric) SetNew(new bool)
- type CollectdMetric
- func (c *CollectdMetric) DSName(index int) string
- func (c *CollectdMetric) GetInterval() float64
- func (c CollectdMetric) GetItemKey() string
- func (c CollectdMetric) GetKey() string
- func (c CollectdMetric) GetLabels() map[string]string
- func (c CollectdMetric) GetMetricDesc(index int) string
- func (c CollectdMetric) GetMetricName(index int) string
- func (c CollectdMetric) GetName() string
- func (c *CollectdMetric) ISNew() bool
- func (c *CollectdMetric) ParseInputByte(data []byte) error
- func (c *CollectdMetric) ParseInputJSON(jsonString string) ([]MetricDataFormat, error)
- func (c *CollectdMetric) SetData(data MetricDataFormat)
- func (c *CollectdMetric) SetNew(new bool)
- type MetricDataFormat
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ParseByte ¶
func ParseByte(dataItem MetricDataFormat, data []byte) error
ParseByte parse incoming data
Types ¶
type CeilometerMetric ¶
CeilometerMetric struct represents metric data formated and sent by Ceilometer
func (*CeilometerMetric) GetInterval ¶
func (c *CeilometerMetric) GetInterval() float64
GetInterval ...
func (*CeilometerMetric) GetLabels ¶
func (c *CeilometerMetric) GetLabels() map[string]string
GetLabels ...
func (*CeilometerMetric) GetMetricDesc ¶
func (c *CeilometerMetric) GetMetricDesc(index int) string
GetMetricDesc ...
func (*CeilometerMetric) GetMetricName ¶
func (c *CeilometerMetric) GetMetricName(index int) string
GetMetricName ...
func (*CeilometerMetric) ParseInputByte ¶
func (c *CeilometerMetric) ParseInputByte(data []byte) error
ParseInputByte ...
func (*CeilometerMetric) ParseInputJSON ¶
func (c *CeilometerMetric) ParseInputJSON(json string) ([]MetricDataFormat, error)
ParseInputJSON ...
func (*CeilometerMetric) SetData ¶
func (c *CeilometerMetric) SetData(data MetricDataFormat)
SetData ...
type CollectdMetric ¶
type CollectdMetric struct { Values []float64 `json:"values"` Dstypes []string `json:"dstypes"` Dsnames []string `json:"dsnames"` Time cdtime.Time `json:"time"` Interval float64 `json:"interval"` Host string `json:"host"` Plugin string `json:"plugin"` PluginInstance string `json:"plugin_instance"` Type string `json:"type"` TypeInstance string `json:"type_instance"` // contains filtered or unexported fields }
CollectdMetric struct represents metric data formated and sent by collectd
func (*CollectdMetric) DSName ¶
func (c *CollectdMetric) DSName(index int) string
DSName newName converts one data source of a value list to a string representation.
func (CollectdMetric) GetLabels ¶
func (c CollectdMetric) GetLabels() map[string]string
GetLabels ...
func (CollectdMetric) GetMetricDesc ¶
func (c CollectdMetric) GetMetricDesc(index int) string
GetMetricDesc newDesc converts one data source of a value list to a Prometheus description.
func (CollectdMetric) GetMetricName ¶
func (c CollectdMetric) GetMetricName(index int) string
GetMetricName ...
func (CollectdMetric) GetName ¶
func (c CollectdMetric) GetName() string
GetName implement interface
func (*CollectdMetric) ParseInputByte ¶
func (c *CollectdMetric) ParseInputByte(data []byte) error
ParseInputByte ... TODO(mmagr): probably unify interface with ParseInputJSON
func (*CollectdMetric) ParseInputJSON ¶
func (c *CollectdMetric) ParseInputJSON(jsonString string) ([]MetricDataFormat, error)
ParseInputJSON ...
func (*CollectdMetric) SetData ¶
func (c *CollectdMetric) SetData(data MetricDataFormat)
SetData ...
type MetricDataFormat ¶
type MetricDataFormat interface { GetName() string SetData(data MetricDataFormat) ParseInputJSON(json string) ([]MetricDataFormat, error) GetKey() string GetItemKey() string ParseInputByte(data []byte) error GetInterval() float64 SetNew(new bool) ISNew() bool }
MetricDataFormat ...
func NewFromDataSource ¶
func NewFromDataSource(source saconfig.DataSource) MetricDataFormat
NewFromDataSource creates empty DataType according to given DataSource