docker_monitoring_probe
qoa4ml.probes.docker_monitoring_probe
¶
Classes¶
DockerMonitoringProbe
¶
DockerMonitoringProbe is responsible for monitoring Docker containers and creating reports.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
|
DockerProbeConfig
|
Configuration settings for the Docker monitoring probe. |
required |
|
BaseConnector
|
Connector to send the report data. |
required |
|
ClientInfo
|
Information about the client. |
required |
Attributes:
Name | Type | Description |
---|---|---|
config |
DockerProbeConfig
|
The Docker monitoring probe configuration. |
obs_service_url |
str
|
The URL of the observation service, if registration is required. |
docker_client |
DockerClient
|
The Docker client for communicating with Docker API. |
Methods:
Name | Description |
---|---|
create_report |
Create a report based on Docker container statistics. |
Functions¶
__init__(config, connector, client_info)
¶
Initialize an instance of DockerMonitoringProbe.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
config
¶ |
DockerProbeConfig
|
Configuration settings for the Docker monitoring probe. |
required |
connector
¶ |
BaseConnector
|
Connector to send the report data. |
required |
client_info
¶ |
ClientInfo
|
Information about the client. |
required |
create_report()
¶
Create a report based on Docker container statistics.
Returns:
Type | Description |
---|---|
str
|
JSON-encoded report containing Docker container statistics. |
Notes
- This method collects statistics for the specified Docker containers.
- If the report dictionary is empty, it adds a 2-second delay to prevent fast looping.
- In case of a RuntimeError, an error message is returned in a JSON format.