Skip to content

Added timeperiods for Monitors#1939

Open
steven-geo wants to merge 6 commits into
jamesoff:developfrom
steven-geo:develop
Open

Added timeperiods for Monitors#1939
steven-geo wants to merge 6 commits into
jamesoff:developfrom
steven-geo:develop

Conversation

@steven-geo

Copy link
Copy Markdown
  • Added time periods for Monitors - following same methodology as alerters. This is now the MAINT (Maintenance) Status.
  • When in maintenance the last_result shows the time configuration for the monitor.
  • Allow Days of week to be entered as text (Mon-Sun, Monday to Sunday) as well as numerical. (Monitors and Alerters)
  • HTML Template updated to show monitors in maintenance in bd_primary colour type, and count at top of screen.
  • Updated Documentation
  • Add Time Testing to Monitors (test_monitor.py)
  • Incremented version to 1.15.1

Co-authored-by: steven <steven.github@geoclay.net>
Co-authored-by: steven <steven.github@geoclay.net>
* Fix tls_expiry monitor showing as OLD
* Updated age column to show age of any 'old' status objects as well as remote

Co-authored-by: steven <steven.github@geoclay.net>
* Added time periods for Monitors - following same methodology as alerters. This is now the MAINT (Maintenance) Status.
* When in maintenance the last_result shows the time configuration for the monitor.
* Allow Days of week to be entered as text (Mon-Sun, Monday to Sunday) as well as numerical. (Monitors and Alerters)
* HTML Template updated to show monitors in maintenance in bd_primary colour type, and count at top of screen.
* Updated Documentation
* Add Time Testing to Monitors (test_monitor.py)
* Incremented version to 1.15.1
@steven-geo

Copy link
Copy Markdown
Author

Looks like tests may have failed due to transient DNS and other issues, can we re-run and try again. linting, env-test and unit-test pass locally on python 3.13.

@jamesoff

jamesoff commented Jul 2, 2026

Copy link
Copy Markdown
Owner

Yes, the 3rd party I pointed the TLS smoke tests at rate-limits them (which is fair). I've re-run the failing ones and will look properly later :)

@steven-geo

Copy link
Copy Markdown
Author

Different Error this time. Looks like it got passed the DNS errors on the first run.
Looks like the new Class needs to be imported to the logger/network.py. I need to test with make network-test first. I'll do another PR shortly.

REF: ERROR (simplemonitor.logger-network) Failed to send network data: Object of type MonitorTimeFilter is not JSON serializable

@jamesoff

jamesoff commented Jul 2, 2026

Copy link
Copy Markdown
Owner

Seeing an actual issue now when it tries to serialise the time filter thing for a remote instance (not dug in to the code yet, sorry for the imprecise summary):

https://github.com/jamesoff/simplemonitor/actions/runs/28559325374/job/84757087993?pr=1939#step:13:79

* Added time periods for Monitors - following same methodology as alerters. This is now the MAINT (Maintenance) Status.
* When in maintenance the last_result shows the time configuration for the monitor.
* Allow Days of week to be entered as text (Mon-Sun, Monday to Sunday) as well as numerical. (Monitors and Alerters)
* HTML Template updated to show monitors in maintenance in bd_primary colour type, and count at top of screen.
* Updated Documentation
* Add Time Testing to Monitors (test_monitor.py)
* Incremented version to 1.15.1

import arrow

from ..Monitors.monitor import MonitorTimeFilter
@codecov

codecov Bot commented Jul 2, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 63.46154% with 38 lines in your changes missing coverage. Please review.
✅ Project coverage is 68.92%. Comparing base (b7569a3) to head (38729ea).
⚠️ Report is 25 commits behind head on develop.

Files with missing lines Patch % Lines
simplemonitor/Monitors/monitor.py 64.63% 29 Missing ⚠️
simplemonitor/Alerters/alerter.py 45.45% 6 Missing ⚠️
simplemonitor/Loggers/file.py 57.14% 3 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1939      +/-   ##
===========================================
- Coverage    69.93%   68.92%   -1.02%     
===========================================
  Files           49       50       +1     
  Lines         4690     4923     +233     
===========================================
+ Hits          3280     3393     +113     
- Misses        1410     1530     +120     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@steven-geo

Copy link
Copy Markdown
Author

Serialization resolved. Will work through codecov stuff tomorrow (late here). I think the Windows 3.11 test is still failing with a DNS issue though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants