Browse Source

v3.2.13

Sql bugs
pull/98/head
Aidaho12 6 years ago
parent
commit
f653687b97
  1. 6
      app/sql.py

6
app/sql.py

@ -889,6 +889,12 @@ def select_table_metrics(uuid):
where servers.metrics = 1 and
metr.date <= now() and metr.date >= DATE_ADD(NOW(),INTERVAL -24 HOUR)
group by servers.ip) as avg_cur_24h,
(select servers.ip,round(avg(metr.curr_con+metr.cur_ssl_con), 1) as avg_cur_3d from servers
left join metrics as metr on metr.serv = servers.ip
where servers.metrics = 1 and
metr.date <= now() and metr.date >= DATE_ADD(NOW(),INTERVAL -3 DAY)
group by servers.ip ) as avg_cur_3d,
(select servers.ip,max(metr.curr_con) as max_con_1h from servers
left join metrics as metr on metr.serv = servers.ip

Loading…
Cancel
Save