You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
influxql:=fmt.Sprintf("SELECT %s, date_trunc('minute', ts) from cpu where %s and ts >= '%s' and ts < '%s' group by date_trunc('minute', ts)", strings.Join(selectClauses, ", "), whereHosts, interval.StartString(), interval.EndString())
62
+
influxql:=fmt.Sprintf("SELECT %s, date_trunc('minute', greptime_timestamp) from cpu where %s and greptime_timestamp >= '%s' and greptime_timestamp < '%s' group by date_trunc('minute', greptime_timestamp)", strings.Join(selectClauses, ", "), whereHosts, interval.StartString(), interval.EndString())
influxql:=fmt.Sprintf(`SELECT max(usage_user), date_trunc('minute', ts) from cpu %s group by date_trunc('minute', ts) order by date_trunc('minute', ts) desc limit 5`, where)
77
+
influxql:=fmt.Sprintf(`SELECT max(usage_user), date_trunc('minute', greptime_timestamp) from cpu %s group by date_trunc('minute', greptime_timestamp) order by date_trunc('minute', greptime_timestamp) desc limit 5`, where)
influxql:=fmt.Sprintf("SELECT %s, date_trunc('hour', ts) from cpu where ts >= '%s' and ts < '%s' group by date_trunc('hour', ts),hostname", strings.Join(selectClauses, ", "), interval.StartString(), interval.EndString())
96
+
influxql:=fmt.Sprintf("SELECT %s, date_trunc('hour', greptime_timestamp) from cpu where greptime_timestamp >= '%s' and greptime_timestamp < '%s' group by date_trunc('hour', greptime_timestamp),hostname", strings.Join(selectClauses, ", "), interval.StartString(), interval.EndString())
influxql:=fmt.Sprintf("SELECT %s, date_trunc('hour', ts) from cpu where %s and ts >= '%s' and ts < '%s' group by date_trunc('hour', ts)", strings.Join(selectClauses, ","), whereHosts, interval.StartString(), interval.EndString())
114
+
influxql:=fmt.Sprintf("SELECT %s, date_trunc('hour', greptime_timestamp) from cpu where %s and greptime_timestamp >= '%s' and greptime_timestamp < '%s' group by date_trunc('hour', greptime_timestamp)", strings.Join(selectClauses, ","), whereHosts, interval.StartString(), interval.EndString())
influxql:="select last_value(hostname order by ts), last_value(region order by ts), last_value(datacenter order by ts), last_value(rack order by ts), last_value(os order by ts), last_value(arch order by ts), last_value(team order by ts), last_value(service order by ts), last_value(service_version order by ts), last_value(service_environment order by ts), last_value(usage_user order by ts), last_value(usage_system order by ts), last_value(usage_idle order by ts), last_value(usage_nice order by ts), last_value(usage_iowait order by ts), last_value(usage_irq order by ts), last_value(usage_softirq order by ts), last_value(usage_steal order by ts), last_value(usage_guest order by ts), last_value(usage_guest_nice order by ts) from cpu group by hostname"
122
+
influxql:="select last_value(hostname order by greptime_timestamp), last_value(region order by greptime_timestamp), last_value(datacenter order by greptime_timestamp), last_value(rack order by greptime_timestamp), last_value(os order by greptime_timestamp), last_value(arch order by greptime_timestamp), last_value(team order by greptime_timestamp), last_value(service order by greptime_timestamp), last_value(service_version order by greptime_timestamp), last_value(service_environment order by greptime_timestamp), last_value(usage_user order by greptime_timestamp), last_value(usage_system order by greptime_timestamp), last_value(usage_idle order by greptime_timestamp), last_value(usage_nice order by greptime_timestamp), last_value(usage_iowait order by greptime_timestamp), last_value(usage_irq order by greptime_timestamp), last_value(usage_softirq order by greptime_timestamp), last_value(usage_steal order by greptime_timestamp), last_value(usage_guest order by greptime_timestamp), last_value(usage_guest_nice order by greptime_timestamp) from cpu group by hostname"
influxql:=fmt.Sprintf("SELECT * from cpu where usage_user > 90.0 %s and ts >= '%s' and ts < '%s'", hostWhereClause, interval.StartString(), interval.EndString())
147
+
influxql:=fmt.Sprintf("SELECT * from cpu where usage_user > 90.0 %s and greptime_timestamp >= '%s' and greptime_timestamp < '%s'", hostWhereClause, interval.StartString(), interval.EndString())
0 commit comments