Restores partial 5min aggregations

This commit is contained in:
Simone Mainardi 2017-03-23 23:52:27 +01:00
parent 796d503c89
commit 10f80539a7
2 changed files with 45 additions and 40 deletions

View file

@ -42,7 +42,7 @@ end
-- Each host is passed to the callback with some more information.
function callback_utils.foreachHost(ifname, verbose, callback, deadline)
local hostbase
interface.select(ifname)
-- Get all hosts with reduced information, not only the local ones.
@ -83,8 +83,8 @@ function callback_utils.foreachHost(ifname, verbose, callback, deadline)
else
hostbase = nil
end
if callback(hostname--[[name of the host]], host--[[hostinfo]], hoststats, hostbase--[[base RRD host directory]], verbose) == false then
if callback(hostname, host--[[hostinfo]], hostbase--[[base RRD host directory]], verbose) == false then
return false
end
end
@ -97,7 +97,9 @@ end
-- Creates RRD with local hosts activity.
-- This is designed to be used as the *callback* parameter of callback_utils.foreachHost
function callback_utils.saveLocalHostsActivity(hostname, host, hoststats, hostbase, verbose)
-- TODO: host is not used so it is useless to call this function through a callback that
-- retrieves it via getHostInfo every time
function callback_utils.saveLocalHostsActivity(hostname, host--[[hostinfo]], hostbase, verbose)
if host.localhost then
local actStats = interface.getHostActivity(hostname)
if actStats then