Documentation ¶
Index ¶
- type BaseGenerator
- type Devops
- func (d *Devops) GroupByOrderByLimit(qi query.Query)
- func (d *Devops) GroupByTime(qq query.Query, nHosts, numMetrics int, timeRange time.Duration)
- func (d *Devops) GroupByTimeAndPrimaryTag(qq query.Query, numMetrics int)
- func (d *Devops) HighCPUForHosts(qi query.Query, nHosts int)
- func (d *Devops) LastPointPerHost(qq query.Query)
- func (d *Devops) MaxAllCPU(qq query.Query, nHosts int, duration time.Duration)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseGenerator ¶
type BaseGenerator struct{}
func (*BaseGenerator) GenerateEmptyQuery ¶
func (g *BaseGenerator) GenerateEmptyQuery() query.Query
GenerateEmptyQuery returns an empty query.HTTP.
func (*BaseGenerator) NewDevops ¶
func (g *BaseGenerator) NewDevops(start, end time.Time, scale int) (utils.QueryGenerator, error)
NewDevops creates a new devops use case query generator.
type Devops ¶
type Devops struct { *BaseGenerator *devops.Core }
Devops produces PromQL queries for all the devops query types.
func (*Devops) GroupByOrderByLimit ¶
func (*Devops) GroupByTime ¶
GroupByTime selects the MAX for numMetrics metrics under 'cpu' per minute for nhosts hosts, e.g. in pseudo-PromQL: max(
max_over_time( {__name__=~"metric1|metric2...|metricN",hostname=~"hostname1|hostname2...|hostnameN"}[1m] )
) by (__name__)
func (*Devops) GroupByTimeAndPrimaryTag ¶
GroupByTimeAndPrimaryTag selects the AVG of numMetrics metrics under 'cpu' per device per hour for a day, e.g. in pseudo-PromQL:
avg(
avg_over_time( {__name__=~"metric1|metric2...|metricN"}[1h] )
) by (__name__, hostname)
Resultsets: double-groupby-1 double-groupby-5 double-groupby-all
func (*Devops) LastPointPerHost ¶
Click to show internal directories.
Click to hide internal directories.