questdb

package
v0.0.0-...-091dc79 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 14, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseGenerator

type BaseGenerator struct {
}

BaseGenerator contains settings specific for QuestDB

func (*BaseGenerator) GenerateEmptyQuery

func (g *BaseGenerator) GenerateEmptyQuery() query.Query

GenerateEmptyQuery returns an empty query.QuestDB.

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 QuestDB-specific queries for all the devops query types.

func (*Devops) GroupByOrderByLimit

func (d *Devops) GroupByOrderByLimit(qi query.Query)

GroupByOrderByLimit populates a query.Query that has a time WHERE clause, that groups by a truncated date, orders by that date, and takes a limit:

Queries: groupby-orderby-limit

func (*Devops) GroupByTime

func (d *Devops) GroupByTime(qi query.Query, nHosts, numMetrics int, timeRange time.Duration)

GroupByTime selects the MAX for metrics under 'cpu', per minute for N random hosts

Resultsets: single-groupby-1-1-12 single-groupby-1-1-1 single-groupby-1-8-1 single-groupby-5-1-12 single-groupby-5-1-1 single-groupby-5-8-1

func (*Devops) GroupByTimeAndPrimaryTag

func (d *Devops) GroupByTimeAndPrimaryTag(qi query.Query, numMetrics int)

GroupByTimeAndPrimaryTag selects the AVG of metrics in the group `cpu` per device per hour for a day

Queries: double-groupby-1 double-groupby-5 double-groupby-all

func (*Devops) HighCPUForHosts

func (d *Devops) HighCPUForHosts(qi query.Query, nHosts int)

HighCPUForHosts populates a query that gets CPU metrics when the CPU has high usage between a time period for a number of hosts (if 0, it will search all hosts)

Queries: high-cpu-1 high-cpu-all

func (*Devops) LastPointPerHost

func (d *Devops) LastPointPerHost(qi query.Query)

LastPointPerHost finds the last row for every host in the dataset

Queries: lastpoint

func (*Devops) MaxAllCPU

func (d *Devops) MaxAllCPU(qi query.Query, nHosts int)

MaxAllCPU selects the MAX of all metrics under 'cpu' per hour for N random hosts

Queries: cpu-max-all-1 cpu-max-all-8

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL