summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Ritter <tom@ritter.vg>2016-12-28 14:24:27 -0500
committerTom Ritter <tom@ritter.vg>2016-12-28 14:24:27 -0500
commit50111ca74eaa5b14253814a9aa39e35b40480935 (patch)
tree31a74cdea63ab08566a33c3a31604b9f4aa708cb
parent18aabef729c950dbed52163908ffeeb48e0e56a9 (diff)
Update Metrics Checker to new version
-rwxr-xr-xsamplejobs/MetricsChecker.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/samplejobs/MetricsChecker.py b/samplejobs/MetricsChecker.py
index 1d29a81..762e46f 100755
--- a/samplejobs/MetricsChecker.py
+++ b/samplejobs/MetricsChecker.py
@@ -17,10 +17,11 @@ class MetricsChecker(JobBase.JobBase):
def execute(self):
body = ""
ys = datetime.date.today() - datetime.timedelta(hours=24)
- url = "https://example.com/out/relay-descriptors/consensus/" + str(ys.year) + "/" + str(ys.month).zfill(2) + "/" + str(ys.day).zfill(2) + "/"
+ url = "https://collector.ritter.vg/recent/relay-descriptors/consensuses/"
try:
r = requests.get(url)
- if "12-00-00-consensus" in r.content:
+ this_consensus = str(ys.year) + "-" + str(ys.month).zfill(2) + "-" + str(ys.day).zfill(2) + "-12-00-00-consensus"
+ if this_consensus in r.content:
pass
else:
body = "Could not find 12-00-00-consensus in the body:\n\n" + r.content
@@ -35,3 +36,4 @@ class MetricsChecker(JobBase.JobBase):
return True
def onFailure(self):
return self.sendEmail("tor metrics is broken?", self.logdetails)
+