|
|
@ -228,6 +228,7 @@ local makeTable = function(web, hosts) |
|
|
|
if nil == v.Active then active = 'nil' else active = v.Active end |
|
|
|
web:write(" <tr style='background-color:dimgrey'><th>" .. k .. "</th> ") |
|
|
|
end |
|
|
|
local inRR = "<font color='green'><b>✅</b></font>" |
|
|
|
local ftp = "<font color='grey'><b>skip</b></font>" |
|
|
|
local http = status(hosts, k, results, "http") |
|
|
|
local https = status(hosts, k, results, "https") |
|
|
@ -246,6 +247,14 @@ local makeTable = function(web, hosts) |
|
|
|
if nil == rate then rate = '' end |
|
|
|
|
|
|
|
-- DNS-RR test. |
|
|
|
-- if nil == http: find('OK') then inRR = "<font color='red'>❌</font>" end |
|
|
|
-- if nil == https: find('OK') then inRR = "<font color='red'>❌</font>" end |
|
|
|
-- if nil == protocol: find('OK') then inRR = "<font color='red'>❌</font>" end |
|
|
|
-- if nil == redirects: find('OK') then inRR = "<font color='red'>❌</font>" end |
|
|
|
-- if nil == sanity: find('OK') then inRR = "<font color='red'>❌</font>" end |
|
|
|
-- if nil == integrity: find('OK') then inRR = "<font color='red'>❌</font>" end |
|
|
|
-- if nil == updated: find('OK') then inRR = "<font color='red'>❌</font>" end |
|
|
|
|
|
|
|
if (APT.options.roundRobin.value ~= k) and (nil ~= hosts[APT.options.roundRobin.value]) then |
|
|
|
if 0 == max then |
|
|
|
spd = '<td></td><td></td>' |
|
|
@ -294,6 +303,7 @@ local makeTable = function(web, hosts) |
|
|
|
-- TODO - try to account for this better, this is just a quick hack. |
|
|
|
end |
|
|
|
week = '<td> ' .. percentUp .. '% up</td><td> ' .. percentUpdated .. '% updated</td>' |
|
|
|
-- if ('100.00' ~= percentUp) or ('100.00' ~= percentUpdated) then inRR = "<font color='red'>❌</font>" end |
|
|
|
end |
|
|
|
|
|
|
|
web:write("<td>" .. ftp .. " </td><td>" .. http .. " </td><td>" .. https .. " </td><td>" .. rsync .. " </td><td>" .. dns .. |
|
|
@ -338,44 +348,48 @@ local makeIPlist = function(hosts) |
|
|
|
if type(w) == "table" then |
|
|
|
n[l] = {} |
|
|
|
for i, u in pairs(w) do |
|
|
|
local inRR = "" |
|
|
|
local lc = logCount(k, i) |
|
|
|
if (APT.testing("IPv6") and ("AAAA" == u)) or ("A" == u) then |
|
|
|
local inRR = "" |
|
|
|
local lc = logCount(k, i) |
|
|
|
if checkRR then |
|
|
|
-- If there where errors, warnings, or timeouts, then it'll have that wrapped in font tags. |
|
|
|
inRR = "<font color='green'><b>✅</b></font>" |
|
|
|
if nil ~= lc:find("<font color='") then |
|
|
|
inRR = "<font color='red'>❌</font>" |
|
|
|
if nil ~= RRbfile then |
|
|
|
local f, e = RRbfile:write(i, '\n') |
|
|
|
if f == nil then C("writing DNS-RR_bad.txt file - " .. e) end |
|
|
|
end |
|
|
|
elseif nil ~= RRgfile then |
|
|
|
local f, e = RRgfile:write(i, '\n') |
|
|
|
if f == nil then C("writing DNS-RR_good.txt file - " .. e) end |
|
|
|
end |
|
|
|
end |
|
|
|
local log = '[<a href="' .. adr .. k .. '_' .. i .. '">graphs</a>] ' |
|
|
|
if "" == log then n[l][i] = u else n[l][log .. inRR .. ' ' .. revDNS(hosts, k, i) .. ' ' .. lc] = u end |
|
|
|
end |
|
|
|
end |
|
|
|
else |
|
|
|
if (APT.testing("IPv6") and ("AAAA" == w)) or ("A" == w) then |
|
|
|
local inRR = "" |
|
|
|
local lc = logCount(k, l) |
|
|
|
if checkRR then |
|
|
|
-- If there where errors, warnings, or timeouts, then it'll have that wrapped in font tags. |
|
|
|
inRR = "<font color='green'><b>✅</b></font>" |
|
|
|
if nil ~= lc:find("<font color='") then |
|
|
|
inRR = "<font color='red'>❌</font>" |
|
|
|
if nil ~= RRbfile then |
|
|
|
local f, e = RRbfile:write(i, '\n') |
|
|
|
local f, e = RRbfile:write(l, '\n') |
|
|
|
if f == nil then C("writing DNS-RR_bad.txt file - " .. e) end |
|
|
|
end |
|
|
|
elseif nil ~= RRgfile then |
|
|
|
local f, e = RRgfile:write(i, '\n') |
|
|
|
local f, e = RRgfile:write(l, '\n') |
|
|
|
if f == nil then C("writing DNS-RR_good.txt file - " .. e) end |
|
|
|
end |
|
|
|
end |
|
|
|
local log = '[<a href="' .. adr .. k .. '_' .. i .. '">graphs</a>] ' |
|
|
|
if "" == log then n[l][i] = u else n[l][log .. inRR .. ' ' .. revDNS(hosts, k, i) .. ' ' .. lc] = u end |
|
|
|
end |
|
|
|
else |
|
|
|
local inRR = "" |
|
|
|
local lc = logCount(k, l) |
|
|
|
if checkRR then |
|
|
|
-- If there where errors, warnings, or timeouts, then it'll have that wrapped in font tags. |
|
|
|
inRR = "<font color='green'><b>✅</b></font>" |
|
|
|
if nil ~= lc:find("<font color='") then |
|
|
|
inRR = "<font color='red'>❌</font>" |
|
|
|
if nil ~= RRbfile then |
|
|
|
local f, e = RRbfile:write(l, '\n') |
|
|
|
if f == nil then C("writing DNS-RR_bad.txt file - " .. e) end |
|
|
|
end |
|
|
|
elseif nil ~= RRgfile then |
|
|
|
local f, e = RRgfile:write(l, '\n') |
|
|
|
if f == nil then C("writing DNS-RR_good.txt file - " .. e) end |
|
|
|
end |
|
|
|
local log = '[<a href="' .. adr .. k .. '_' .. l .. '">graphs</a>] ' |
|
|
|
if "" == log then n[l] = w else n[log .. inRR .. ' ' .. revDNS(hosts, k, l) .. ' ' .. lc] = w end |
|
|
|
end |
|
|
|
local log = '[<a href="' .. adr .. k .. '_' .. l .. '">graphs</a>] ' |
|
|
|
if "" == log then n[l] = w else n[log .. inRR .. ' ' .. revDNS(hosts, k, l) .. ' ' .. lc] = w end |
|
|
|
end |
|
|
|
end |
|
|
|
end |
|
|
|