Skip to content

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
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

Attributes:

Name Type Description
config DockerProbeConfig

The Docker monitoring probe configuration.

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.
  • Docker/HTTP/OS failures are logged via qoa_logger and returned as a JSON error so the probe thread never dies silently (service boundary: log + return JSON error, never crash probe thread).