Source: factory.core/extend.monitor/ObjMonitorLogin.py
Login mixin for Monitor.
| Method | Signature | Description |
|---|---|---|
| collect_logins | collect_logins(limit: int = 5) -> List[Dict[str, str]] |
Return the last limit login entries from the system last command. |
| collect_ssh_logins | collect_ssh_logins(limit: int = 50) -> int |
Detect and persist new SSH login events. |
| record_login_event | record_login_event(username: str, login_type: str = 'web', success: bool = True, ip_address: str = '', user_agent: str = '', session_id: str = '', failure_reason: str = '', provider: str = '', module: str = '') -> None |
Persist a login event to internet_login_event. |
| collect_login_events | collect_login_events(limit: int = 10) -> List[Dict[str, Any]] |
Read recent login events from the DB. |
| collect_login_events_by_user | collect_login_events_by_user(username: str, limit: int = 20) -> List[Dict[str, Any]] |
Read login events for a specific user. |
| get_login_statistics | get_login_statistics(window_hours: int = 24) -> Dict[str, Any] |
Get login event counts for the last N hours. |
| get_active_sessions | get_active_sessions() -> List[Dict[str, Any]] |
Get currently active user sessions. |
| cleanup_login_events | cleanup_login_events(retention_days: int = 90) -> None |
Remove login events older than retention. |