csle_collector.docker_stats_manager.threads package

Submodules

csle_collector.docker_stats_manager.threads.docker_stats_thread module

class csle_collector.docker_stats_manager.threads.docker_stats_thread.DockerStatsThread(container_names_and_ips: List[docker_stats_manager_pb2.ContainerIp], emulation: str, execution_first_ip_octet: int, kafka_ip: str, stats_queue_maxsize: int, time_step_len_seconds: int, kafka_port: int)[source]

Bases: threading.Thread

Thread that collects performance statistics of Docker containers

compute_averages() Tuple[csle_collector.docker_stats_manager.dao.docker_stats.DockerStats, Dict[str, csle_collector.docker_stats_manager.dao.docker_stats.DockerStats]][source]

Compute averages and aggregates of the list of metrics :return: the average and aggregate metrics

get_ip(container_name: str) str[source]

Gets the ip of a given container name

Parameters

container_name – the name of the container

Returns

the ip of the container

run() None[source]

Main loop of the thread

Returns

None

Module contents