Source: factory.core/extend.monitor/ObjMonitorCommand.py
Command mixin for Monitor.
| Method | Signature | Description |
|---|---|---|
| record_command | record_command(username: str, command: str, command_source: str = 'history', working_dir: str = '', exit_code: Optional[int] = None, ip_address: str = '', module: str = '') -> None |
Persist a command log entry. |
| collect_command_activity | collect_command_activity() -> int |
Detect and persist new command activity. |
| collect_command_log | collect_command_log(limit: int = 20) -> List[Dict[str, Any]] |
Read recent command log entries. |
| collect_command_log_by_user | collect_command_log_by_user(username: str, limit: int = 50) -> List[Dict[str, Any]] |
Read command log for a specific user. |
| get_command_statistics | get_command_statistics(window_hours: int = 24) -> Dict[str, Any] |
Aggregate command counts. |
| cleanup_command_log | cleanup_command_log(retention_days: int = 90) -> None |
Remove command log entries older than |
| collect_cron_events | collect_cron_events(limit: int = 200) -> int |
Parse syslog for cron executions. |
| read_cron_events | read_cron_events(limit: int = 20) -> List[Dict[str, Any]] |
Read recent cron events. |