CLI commands for monitoring functionality.


flexmeasures.cli.monitor.send_lastseen_monitoring_alert(users: list[User], last_seen_delta: timedelta, alerted_users: bool, account_role: str | None = None, user_role: str | None = None)

Tell monitoring recipients and Sentry about user(s) we haven’t seen in a while.

flexmeasures.cli.monitor.send_task_monitoring_alert(task_name: str, msg: str, latest_run: LatestTaskRun | None = None, custom_msg: str | None = None)

Send any monitoring message per Sentry and per email. Also log an error.