summaryrefslogtreecommitdiff
path: root/tools/josef_nagios_auditor.py
diff options
context:
space:
mode:
Diffstat (limited to 'tools/josef_nagios_auditor.py')
-rwxr-xr-xtools/josef_nagios_auditor.py23
1 files changed, 4 insertions, 19 deletions
diff --git a/tools/josef_nagios_auditor.py b/tools/josef_nagios_auditor.py
index 74cc522..e950c8b 100755
--- a/tools/josef_nagios_auditor.py
+++ b/tools/josef_nagios_auditor.py
@@ -106,24 +106,6 @@ def fetch_all_sth():
errors.append(error_str)
continue
- # Add timing info
- # try:
- # if base_url not in timings:
- # timings[base_url] = {"last":sths[base_url]["timestamp"], "longest":0}
- # else:
- # then = datetime.datetime.fromtimestamp(int(timings[base_url]["last"])/1000)
- # now = datetime.datetime.fromtimestamp(int(sths[base_url]["timestamp"])/1000)
- # tdelta = now - then
-
- # timings[base_url]["last"] = sths[base_url]["timestamp"]
-
- # if tdelta.total_seconds() > timings[base_url]["longest"]:
- # timings[base_url]["longest"] = tdelta.total_seconds()
-
- # except Exception, err:
- # print Exception, err
- # print time.strftime('%H:%M:%S') + "ERROR: Failed to set TIME info for STH"
-
return sths
def verify_progress(url, old, new):
@@ -181,7 +163,10 @@ def verify_inclusion_all(url, old, new):
if old and new:
try:
if old["tree_size"]!= new["tree_size"]:
- entries = get_entries(url, old["tree_size"], new["tree_size"] -1)["entries"]
+ entries = []
+ while len(entries) + old[url]["tree_size"]!= new[url]["tree_size"]:
+ entries = get_entries(url, str(int(old[url]["tree_size"]) + len(entries)), new[url]["tree_size"] -1)["entries"]
+
success = True
for i in entries:
h = get_leaf_hash(base64.b64decode(i["leaf_input"]))