Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { Addr string // The meta query limit for series returned Limit int Retentions []Retention Filters []string Normalize bool HardTS int64 }
Client object holds general config about how queries should be performed
func (Client) FindMetrics ¶
FindMetrics discovers all metrics that OpenTSDB knows about (given a filter) e.g. /api/suggest?type=metrics&q=system&max=100000
func (Client) FindSeries ¶
FindSeries discovers all series associated with a metric e.g. /api/search/lookup?m=system.load5&limit=1000000
type Config ¶
type Config struct { Addr string Limit int Offset int64 HardTS int64 Retentions []string Filters []string Normalize bool MsecsTime bool }
Config contains fields required for Client configuration
type Expression ¶
type Expression struct { Time timeObj `json:"time"` Filters []filterObj `json:"filters"` Metrics []metricObj `json:"metrics"` // this just needs to be an empty object, so the value doesn't matter Expressions []int `json:"expressions"` Outputs []outputObj `json:"outputs"` }
Expression objects format our data queries
All of the following structs are to build a OpenTSDB expression object
type ExpressionOutput ¶
type ExpressionOutput struct { Outputs []qoObj `json:"outputs"` Query interface{} `json:"query"` }
ExpressionOutput contains results from actual data queries
type Meta ¶
type Meta struct { //tsuid string Metric string `json:"metric"` Tags map[string]string `json:"tags"` }
Meta A meta object about a metric only contain the tags/etc. and no data
type MetaResults ¶
MetaResults contains return data from search series lookup queries
type Retention ¶
type Retention struct { /* OpenTSDB has two levels of aggregation, First, we aggregate any un-mentioned tags into the last result Second, we aggregate into buckets over time To simulate this with config, we have FirstOrder (e.g. sum/avg/max/etc.) SecondOrder (e.g. sum/avg/max/etc.) AggTime (e.g. 1m/10m/1d/etc.) This will build into m=<FirstOrder>:<AggTime>-<SecondOrder>-none: Or an example: m=sum:1m-avg-none */ FirstOrder string SecondOrder string AggTime string // The actual ranges will will attempt to query (as offsets from now) QueryRanges []TimeRange }
Retention objects contain meta data about what to query for our run
type RetentionMeta ¶
RetentionMeta objects exist to pass smaller subsets (only one retention range) of a full Retention object around