API reference¶
PyLookylooMonitoring¶
- class pylookyloomonitoring.PyLookylooMonitoring(root_url: str, useragent: str | None = None, *, proxies: dict[str, str] | None = None)¶
- changes(uuid: str) dict[str, Any]¶
Get the changes for a specific monitored capture.
- Parameters:
uuid – the UUID we want to get the changes
- collections() list[str]¶
Get all the collections
- expired(collection: str | None = None) list[dict[str, Any]]¶
Get the list of the capture we’re not monitoring anymore.
- Parameters:
collection – Filter by collection
- get_apikey(username: str, password: str) dict[str, str]¶
Get the API key for the given user.
- init_apikey(username: str | None = None, password: str | None = None, apikey: str | None = None) None¶
Init the API key for the current session. All the requests against the monitoring instance after this call will be authenticated.
- instance_settings() MonitoringInstanceSettings¶
Get the settings of the monitoring instance.
- property is_up: bool¶
Test if the given instance is accessible
- monitor(*, monitor_capture_settings: MonitorCaptureSettings | dict[str, Any] | None = None) str¶
- monitor(*, capture_settings: LookylooCaptureSettings | dict[str, Any] | None = None, frequency: str | None = None, expire_at: datetime | str | int | float | None = None, never_expire: bool = False, collection: str | None = None, compare_settings: CompareSettings | dict[str, Any] | None = None, notification: NotificationSettings | dict[str, Any] | None = None) str
Add a new capture to monitor.
- Parameters:
capture_settings – The settings of the capture
frequency – The frequency of the monitoring
expire_at – When the monitoring should expire.
never_expire – If True, the capture will never expire.
collection – The collection the monitored capture is part of.
compare_settings – The comparison settings.
notification – The notification settings.
- monitored(collection: str | None = None) list[dict[str, Any]]¶
Get the list of what is currently monitored.
- Parameters:
collection – Filter by collection
- redis_up() dict[str, Any]¶
Check if redis is up and running
- settings_monitor(uuid: str) MonitorCaptureSettings¶
Get the settings of a specific monitoring.
- Parameters:
uuid – The UUID we want the settings of.
- start_monitor(uuid: str) bool | dict[str, str]¶
(re)Start monitoring a specific capture
- Parameters:
uuid – the UUID we want to (re)start to monitor
- stop_monitor(uuid: str) bool | dict[str, str]¶
Stop monitoring a specific capture
- Parameters:
uuid – the UUID we want to expire