Check only the latest shard for host data

pull/4208/head
nathan haugo 2018-08-14 09:49:13 -07:00
parent ff2ce4f8d5
commit c397e65556
1 changed files with 2 additions and 2 deletions

View File

@ -20,7 +20,7 @@ export const getCpuAndLoadForHosts = (
SELECT mean("Percent_Processor_Time") FROM \":db:\".\":rp:\".\"win_cpu\" WHERE time > now() - 10m GROUP BY host; SELECT mean("Percent_Processor_Time") FROM \":db:\".\":rp:\".\"win_cpu\" WHERE time > now() - 10m GROUP BY host;
SELECT mean("Processor_Queue_Length") FROM \":db:\".\":rp:\".\"win_system\" WHERE time > now() - 10s GROUP BY host; SELECT mean("Processor_Queue_Length") FROM \":db:\".\":rp:\".\"win_system\" WHERE time > now() - 10s GROUP BY host;
SELECT non_negative_derivative(mean("System_Up_Time")) AS winDeltaUptime FROM \":db:\".\":rp:\".\"win_system\" WHERE time > now() - ${telegrafSystemInterval} * 10 GROUP BY host, time(${telegrafSystemInterval}) fill(0); SELECT non_negative_derivative(mean("System_Up_Time")) AS winDeltaUptime FROM \":db:\".\":rp:\".\"win_system\" WHERE time > now() - ${telegrafSystemInterval} * 10 GROUP BY host, time(${telegrafSystemInterval}) fill(0);
SHOW TAG VALUES WITH KEY = "host";`, SHOW TAG VALUES WITH KEY = "host" where time > now() - 10m;`,
tempVars tempVars
) )
@ -184,7 +184,7 @@ export const getAppsForHosts = (proxyLink, hosts, appLayouts, telegrafDB) => {
return proxy({ return proxy({
source: proxyLink, source: proxyLink,
query: `show series from /${measurements}/`, query: `show series from /${measurements}/ where time > now() - 10m`,
db: telegrafDB, db: telegrafDB,
}).then(resp => { }).then(resp => {
const newHosts = Object.assign({}, hosts) const newHosts = Object.assign({}, hosts)