X-Git-Url: https://wannabe.guru.org/gitweb/?a=blobdiff_plain;f=health_renderer.py;h=63f923fe74e04b6c7274c76edd8061b1bdfbefd9;hb=d6990436e08a57ce211b10058dc61fb223cb94ec;hp=55e4cf937d25aca755fa6264cc561bd06fc7baf2;hpb=4b1f3d8a8b278ca6d62f461ea80c8ea21080c301;p=kiosk.git diff --git a/health_renderer.py b/health_renderer.py index 55e4cf9..63f923f 100644 --- a/health_renderer.py +++ b/health_renderer.py @@ -17,7 +17,15 @@ class periodic_health_renderer(renderer.debuggable_abstaining_renderer): days = constants.seconds_per_day hours = constants.seconds_per_hour mins = constants.seconds_per_minute + minutes = mins limits = { + timestamps + 'last_http_probe_wannabe_house' : mins * 10, + timestamps + 'last_http_probe_meerkat_cabin' : mins * 10, + timestamps + 'last_http_probe_dns_house' : mins * 10, + timestamps + 'last_http_probe_rpi_cabin' : mins * 10, + timestamps + 'last_http_probe_rpi_house' : mins * 10, + timestamps + 'last_http_probe_therm_house' : mins * 10, + timestamps + 'last_rsnapshot_hourly' : hours * 24, timestamps + 'last_rsnapshot_daily' : days * 3, timestamps + 'last_rsnapshot_weekly' : days * 14, @@ -29,17 +37,22 @@ class periodic_health_renderer(renderer.debuggable_abstaining_renderer): timestamps + 'last_zfssnapshot_monthly' : days * 70, timestamps + 'last_zfssnapshot_cleanup' : hours * 24, - timestamps + 'last_disk_selftest_short' : days * 14, - timestamps + 'last_disk_selftest_long' : days * 31, timestamps + 'last_zfs_scrub' : days * 9, - timestamps + 'last_zfs_scrub_backup' : days * 9, + timestamps + 'last_backup_zfs_scrub' : days * 9, + timestamps + 'last_cabin_zfs_scrub' : days * 9, timestamps + 'last_zfsxfer_backup.house' : hours * 36, timestamps + 'last_zfsxfer_ski.dyn.guru.org' : days * 7, timestamps + 'last_photos_sync' : hours * 8, - timestamps + 'last_disk_selftest_backup_short': days * 14, - timestamps + 'last_disk_selftest_backup_long' : days * 31, + timestamps + 'last_disk_selftest_short' : days * 14, + timestamps + 'last_disk_selftest_long' : days * 31, + timestamps + 'last_backup_disk_selftest_short': days * 14, + timestamps + 'last_backup_disk_selftest_long' : days * 31, + timestamps + 'last_cabin_disk_selftest_short' : days * 14, + timestamps + 'last_cabin_disk_selftest_long' : days * 31, + + timestamps + 'last_cabin_rpi_ping' : mins * 10, timestamps + 'last_healthy_wifi' : mins * 10, timestamps + 'last_healthy_network' : mins * 10, timestamps + 'last_scott_sync' : days * 2, @@ -134,4 +147,5 @@ class periodic_health_renderer(renderer.debuggable_abstaining_renderer): """) -#test = periodic_health_renderer({"Test", 123}) +test = periodic_health_renderer({"Test", 123}) +test.periodic_render("Test")