Documentation ¶
Index ¶
- type Devops
- func (d *Devops) GenerateEmptyQuery() 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(qq query.Query, nHosts int)
- func (d *Devops) MaxAllCPU(qq query.Query, nHosts int)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Devops ¶
Devops produces Influx-specific queries for all the devops query types.
func (*Devops) GenerateEmptyQuery ¶
GenerateEmptyQuery returns an empty query.HTTP
func (*Devops) GroupByTime ¶
GroupByTime selects the MAX for numMetrics metrics under 'cpu' for nhosts hosts, e.g.: max(max_over_time({__name__=~"metric1|metric2...|metricN",hostname=~"hostname1|hostname2...|hostnameN"})) by (__name__)
func (*Devops) GroupByTimeAndPrimaryTag ¶
GroupByTimeAndPrimaryTag selects the AVG of numMetrics metrics under 'cpu' per device per hour for a day, e.g. in psuedo-SQL:
avg(avg_over_time({__name__=~"metric1|metric2...|metricN"})) by (__name__, hostname)
func (*Devops) HighCPUForHosts ¶
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), e.g.:
max(max_over_time(cpu_usage_user{hostname=~"hostname1|hostname2...|hostnameN"})) by (hostname) > 90