Documentation ¶
Index ¶
- Variables
- func CollectdListener(c NodeMetricMeasurementChannel)
- func DrawTable(r io.Writer, t *DataTable, w uint, h uint) os.Error
- func FileWriter(c NodeMetricMeasurementChannel)
- func FormatTime(nanoSeconds int64, utc bool, format string) string
- func FormatTimeLocal(nanoSeconds int64) string
- func NodeList(t int64) (r *[]Node, err os.Error)
- func Watch(dir string)
- type ColumnType
- type Configuration
- type DataTable
- type File
- func (f File) Bytes() (header []byte)
- func (f *File) ColumnCount() int64
- func (f File) Columns() []ColumnType
- func (h File) IsRaw() bool
- func (r *File) ReadAggregatedDataTable(m Metric) (t DataTable, e os.Error)
- func (r *File) ReadAggregatedMeasurements() (s Summary, e os.Error)
- func (r *File) ReadMeasurements() (Table, os.Error)
- func (r *File) ReadRawMeasurements() (l *MeasurementList, e os.Error)
- func (f *File) TimeOffset(time int64) int64
- func (r *File) WriteSummary(s Summary) (err os.Error)
- type LineDefinition
- type Measurement
- type MeasurementList
- type Metric
- type Node
- type NodeMetricMeasurement
- type NodeMetricMeasurementChannel
- type Property
- type ResolutionConfig
- type Summary
- type Table
- type TimeSplice
- type TimeSpliceSlice
- type Value
- type ValueSlice
Constants ¶
This section is empty.
Variables ¶
View Source
var Config = Configuration{[]ResolutionConfig{{"5m", 5 * 60 * 1000000000, 24 * 60 * 60 * 1000000000, "2006-01-02-15-04"}, {"1h", 60 * 60 * 1000000000, 24 * 60 * 60 * 1000000000, "2006-01-02"}}}
View Source
var Debug = false
Functions ¶
func CollectdListener ¶
func CollectdListener(c NodeMetricMeasurementChannel)
CollectdListener listens for data sent from collectd, parses it into CollectdMeasurements, and sends those measurements to the channel.
func FileWriter ¶
func FileWriter(c NodeMetricMeasurementChannel)
Filewriter recieves measurements from the channel and writes them to disk using a queue.
func FormatTimeLocal ¶
Types ¶
type ColumnType ¶
type ColumnType struct { StatisticalFunction statisticalFunction ValueType valueType }
type Configuration ¶
type Configuration struct {
Resolutions []ResolutionConfig
}
type DataTable ¶
type DataTable struct { Start int64 End int64 Resolution int64 LineDefinitions []LineDefinition Values []Value }
type File ¶
func CreateFile ¶
func CreateFile(path string, valueType valueType, startTime int64, resolution int64, functions int64) (file *File, err os.Error)
CreateAggFile will open the specified file, returning an error if the file exists
func CreateOrOpenFile ¶
func OpenFile ¶
OpenAggFile will open the specified file, returning an error if the file does not exist.
func (*File) ColumnCount ¶
func (File) Columns ¶
func (f File) Columns() []ColumnType
func (*File) ReadAggregatedDataTable ¶
func (*File) ReadAggregatedMeasurements ¶
func (*File) ReadRawMeasurements ¶
func (r *File) ReadRawMeasurements() (l *MeasurementList, e os.Error)
func (*File) TimeOffset ¶
type LineDefinition ¶
type LineDefinition struct { Node Property StatisticalFunction statisticalFunction ValueType valueType }
func (LineDefinition) Equals ¶
func (d LineDefinition) Equals(n LineDefinition) bool
func (LineDefinition) String ¶
func (d LineDefinition) String() string
type Measurement ¶
type MeasurementList ¶
type MeasurementList []Measurement
func (MeasurementList) Columns ¶
func (l MeasurementList) Columns() []ColumnType
func (MeasurementList) Data ¶
func (l MeasurementList) Data() (d TimeSpliceSlice)
type NodeMetricMeasurement ¶
type NodeMetricMeasurement struct { Node string // todo: should be a Node Metric string // todo: should be a Metric or Property Measurement }
todo: better name please! todo: in the process of renaming, reconsider the interface between collectd and this queue
type NodeMetricMeasurementChannel ¶
type NodeMetricMeasurementChannel chan NodeMetricMeasurement
type ResolutionConfig ¶
type Summary ¶
type Summary struct { ValueType valueType Functions int64 Resolution int64 Intervals map[int64][]Value }
a "summary" is a set of statistical functions applied to some measurements grouped by an interval
func (Summary) Columns ¶
func (s Summary) Columns() []ColumnType
func (Summary) Data ¶
func (s Summary) Data() (d TimeSpliceSlice)
type Table ¶
type Table interface { Data() TimeSpliceSlice Columns() []ColumnType }
type TimeSplice ¶
type TimeSpliceSlice ¶
type TimeSpliceSlice []TimeSplice
func (TimeSpliceSlice) Less ¶
func (s TimeSpliceSlice) Less(i, j int) bool
func (TimeSpliceSlice) Swap ¶
func (s TimeSpliceSlice) Swap(i, j int)
type ValueSlice ¶
type ValueSlice []Value
func (ValueSlice) Less ¶
func (s ValueSlice) Less(i, j int) bool
func (ValueSlice) Swap ¶
func (s ValueSlice) Swap(i, j int)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.