]> git.ipfire.org Git - ipfire.org.git/commitdiff
mirrors: Stop emailing Michael if a mirror is down
authorMichael Tremer <michael.tremer@ipfire.org>
Tue, 4 Feb 2020 11:22:20 +0000 (11:22 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Tue, 4 Feb 2020 11:22:20 +0000 (11:22 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/backend/mirrors.py
src/crontab/ipfire

index 599dc453af5851114055d99029d7d04785c61262..27691dc2accd82633b75f9f7391bbcd05fd43211 100644 (file)
@@ -236,27 +236,27 @@ class Mirror(Object):
                        response = await http.fetch(self.url + ".timestamp",
                                headers={ "Pragma" : "no-cache" })
                except tornado.httpclient.HTTPError as e:
-                       logging.error("Error getting timestamp from %s: %s" % (self.hostname, e))
+                       logging.warning("Error getting timestamp from %s: %s" % (self.hostname, e))
                        self.set_state("DOWN")
                        return False
 
                except ssl.SSLError as e:
-                       logging.error("SSL error when getting timestamp from %s: %s" % (self.hostname, e))
+                       logging.warning("SSL error when getting timestamp from %s: %s" % (self.hostname, e))
                        self.set_state("DOWN")
                        return False
 
                except tornado.iostream.StreamClosedError as e:
-                       logging.error("Connection closed unexpectedly for %s: %s" % (self.hostname, e))
+                       logging.warning("Connection closed unexpectedly for %s: %s" % (self.hostname, e))
                        self.set_state("DOWN")
                        return False
 
                except OSError as e:
-                       logging.error("Could not connect to %s: %s" % (self.hostname, e))
+                       logging.warning("Could not connect to %s: %s" % (self.hostname, e))
                        self.set_state("DOWN")
                        return False
 
                if response.error:
-                       logging.debug("Error getting timestamp from %s" % self.hostname)
+                       logging.warning("Error getting timestamp from %s" % self.hostname)
                        self.set_state("DOWN")
                        return
 
index 9bb97240f216025591c1ffaef2d52cceb2347ea1..4122f187ae79f1c03d06480725e6ca871dc269e9 100644 (file)
@@ -19,7 +19,7 @@ SHELL=/bin/bash
 30 * * * *     nobody  ipfire.org cleanup
 
 # Check mirrors once every 30 min
-*/30 * * * *   nobody  ipfire.org check-mirrors
+*/30 * * * *   nobody  ipfire.org --logging=error check-mirrors
 
 # Tweet once a week
 0 8 * * *      nobody  sleep ${RANDOM} && ipfire.org tweet