aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/apt-panopticommon.lua
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--apt-panopticommon.lua14
1 files changed, 10 insertions, 4 deletions
diff --git a/apt-panopticommon.lua b/apt-panopticommon.lua
index ca952d3..c03f817 100644
--- a/apt-panopticommon.lua
+++ b/apt-panopticommon.lua
@@ -4,7 +4,7 @@ local APT = {}
4APT.rrd = require 'rrd' 4APT.rrd = require 'rrd'
5 5
6APT.protocols = {"ftp", "http", "https", "rsync"} 6APT.protocols = {"ftp", "http", "https", "rsync"}
7APT.tests = {'raw', 'Integrity', 'Protocol', 'Updated', 'URLSanity', 'Speed'} 7APT.tests = {'raw', 'Integrity', 'Protocol', 'Redirects', 'Updated', 'URLSanity', 'Speed'}
8APT.releases = {"jessie", "ascii", "beowulf", "ceres"} 8APT.releases = {"jessie", "ascii", "beowulf", "ceres"}
9APT.subRels = {'backports', 'proposed-updates', 'security', 'updates'} 9APT.subRels = {'backports', 'proposed-updates', 'security', 'updates'}
10APT.notExist = 10APT.notExist =
@@ -65,6 +65,7 @@ APT.options =
65-- "rsync", 65-- "rsync",
66 "DNSRR", 66 "DNSRR",
67 "Protocol", 67 "Protocol",
68 "Redirects",
68 "URLSanity", 69 "URLSanity",
69 "Integrity", 70 "Integrity",
70 "Updated", 71 "Updated",
@@ -697,6 +698,9 @@ local DSIt = 'DS:IntegrityTimeouts:GAUGE:' .. hb .. ':0:U'
697local DSPe = 'DS:ProtocolErrors:GAUGE:' .. hb .. ':0:U' 698local DSPe = 'DS:ProtocolErrors:GAUGE:' .. hb .. ':0:U'
698local DSPw = 'DS:ProtocolWarnings:GAUGE:' .. hb .. ':0:U' 699local DSPw = 'DS:ProtocolWarnings:GAUGE:' .. hb .. ':0:U'
699local DSPt = 'DS:ProtocolTimeouts:GAUGE:' .. hb .. ':0:U' 700local DSPt = 'DS:ProtocolTimeouts:GAUGE:' .. hb .. ':0:U'
701local DSRe = 'DS:RedirectsErrors:GAUGE:' .. hb .. ':0:U'
702local DSRw = 'DS:RedirectsWarnings:GAUGE:' .. hb .. ':0:U'
703local DSRt = 'DS:RedirectsTimeouts:GAUGE:' .. hb .. ':0:U'
700local DSUe = 'DS:UpdatedErrors:GAUGE:' .. hb .. ':0:U' 704local DSUe = 'DS:UpdatedErrors:GAUGE:' .. hb .. ':0:U'
701local DSUw = 'DS:UpdatedWarnings:GAUGE:' .. hb .. ':0:U' 705local DSUw = 'DS:UpdatedWarnings:GAUGE:' .. hb .. ':0:U'
702local DSUt = 'DS:UpdatedTimeouts:GAUGE:' .. hb .. ':0:U' 706local DSUt = 'DS:UpdatedTimeouts:GAUGE:' .. hb .. ':0:U'
@@ -735,10 +739,11 @@ APT.createRRD = function(host, ip, o)
735 os.execute( 'mkdir -p rrd/' .. host .. '/' .. p:upper()) 739 os.execute( 'mkdir -p rrd/' .. host .. '/' .. p:upper())
736 if not APT.checkFile('rrd/' .. host .. '/' .. p:upper() .. '/Tests.rrd') then 740 if not APT.checkFile('rrd/' .. host .. '/' .. p:upper() .. '/Tests.rrd') then
737 D('Creating ' .. 'rrd/' .. host .. '/' .. p:upper() .. '/Tests.rrd') 741 D('Creating ' .. 'rrd/' .. host .. '/' .. p:upper() .. '/Tests.rrd')
738 APT.rrd.create( 'rrd/' .. host .. '/' .. p:upper() .. '/Tests.rrd', '--start', start, '--step', step, DSIe, DSIw, DSIt, DSPe, DSPw, DSPt, DSUe, DSUw, DSUt, DSSe, DSSw, DSSt, 742 APT.rrd.create( 'rrd/' .. host .. '/' .. p:upper() .. '/Tests.rrd', '--start', start, '--step', step,
743 DSIe, DSIw, DSIt, DSPe, DSPw, DSPt, DSRe, DSRw, DSRt, DSUe, DSUw, DSUt, DSSe, DSSw, DSSt,
739 RRAc0, RRAc1, RRAc2, RRAl0, RRAc3, RRAc4, RRAc5, RRAl1, RRAc6, RRAc7, RRAc8, RRAl2, RRAc9, RRAc10, RRAc11, RRAl3, RRAc12, RRAc13, RRAc14, RRAl4) 744 RRAc0, RRAc1, RRAc2, RRAl0, RRAc3, RRAc4, RRAc5, RRAl1, RRAc6, RRAc7, RRAc8, RRAl2, RRAc9, RRAc10, RRAc11, RRAl3, RRAc12, RRAc13, RRAc14, RRAl4)
740 -- Start them at 0 so the average has something to work on. 745 -- Start them at 0 so the average has something to work on.
741 APT.rrd.update( 'rrd/' .. host .. '/' .. p:upper() .. '/Tests.rrd', (APT.now - 600) .. ':0:0:0:0:0:0:0:0:0:0:0:0') 746 APT.rrd.update( 'rrd/' .. host .. '/' .. p:upper() .. '/Tests.rrd', (APT.now - 600) .. ':0:0:0:0:0:0:0:0:0:0:0:0:0:0:0')
742 end 747 end
743 end 748 end
744 os.execute( 'mkdir -p rrd/' .. host .. '/Speed') 749 os.execute( 'mkdir -p rrd/' .. host .. '/Speed')
@@ -757,10 +762,11 @@ APT.updateRRD = function(results, host, ip)
757 APT.rrd.update('rrd/' .. host .. '/' .. p:upper() .. '/Tests.rrd', APT.now .. ':' .. 762 APT.rrd.update('rrd/' .. host .. '/' .. p:upper() .. '/Tests.rrd', APT.now .. ':' ..
758 results[p]['Integrity'].errors .. ':' .. results[p]['Integrity'].warnings .. ':' .. results[p]['Integrity'].timeouts .. ':' .. 763 results[p]['Integrity'].errors .. ':' .. results[p]['Integrity'].warnings .. ':' .. results[p]['Integrity'].timeouts .. ':' ..
759 results[p]['Protocol'].errors .. ':' .. results[p]['Protocol'].warnings .. ':' .. results[p]['Protocol'].timeouts .. ':' .. 764 results[p]['Protocol'].errors .. ':' .. results[p]['Protocol'].warnings .. ':' .. results[p]['Protocol'].timeouts .. ':' ..
765 results[p]['Redirects'].errors .. ':' .. results[p]['Redirects'].warnings .. ':' .. results[p]['Redirects'].timeouts .. ':' ..
760 results[p]['Updated'].errors .. ':' .. results[p]['Updated'].warnings .. ':' .. results[p]['Updated'].timeouts .. ':' .. 766 results[p]['Updated'].errors .. ':' .. results[p]['Updated'].warnings .. ':' .. results[p]['Updated'].timeouts .. ':' ..
761 results[p]['URLSanity'].errors .. ':' .. results[p]['URLSanity'].warnings .. ':' .. results[p]['URLSanity'].timeouts) 767 results[p]['URLSanity'].errors .. ':' .. results[p]['URLSanity'].warnings .. ':' .. results[p]['URLSanity'].timeouts)
762 else 768 else
763 APT.rrd.update('rrd/' .. host .. '/' .. p:upper() .. '/Tests.rrd', APT.now .. ':U:U:U:U:U:U:U:U:U:U:U:U') 769 APT.rrd.update('rrd/' .. host .. '/' .. p:upper() .. '/Tests.rrd', APT.now .. ':U:U:U:U:U:U:U:U:U:U:U:U:U:U:U')
764 end 770 end
765 end 771 end
766 if nil ~= results.speed then 772 if nil ~= results.speed then