csle_common.consumer_threads package

Submodules

csle_common.consumer_threads.aggregated_host_metrics_thread module

class csle_common.consumer_threads.aggregated_host_metrics_thread.AggregatedHostMetricsThread(host_metrics: csle_collector.host_manager.dao.host_metrics.HostMetrics, machines: List[csle_common.dao.emulation_observation.defender.emulation_defender_machine_observation_state.EmulationDefenderMachineObservationState], sleep_time: int)[source]

Bases: threading.Thread

Thread that polls the Kafka log to get the latest status of the docker statistics for a specific host

get_average_aggregated_host_metrics() csle_collector.host_manager.dao.host_metrics.HostMetrics[source]
Returns

average of the list of aggregated host metrics

run() None[source]

Runs the thread

Returns

None

csle_common.consumer_threads.aggregated_ossec_ids_log_consumer_thread module

class csle_common.consumer_threads.aggregated_ossec_ids_log_consumer_thread.AggregatedOSSECIdsLogConsumerThread(kafka_server_ip: str, kafka_port: int, ossec_ids_alert_counters: csle_collector.ossec_ids_manager.dao.ossec_ids_alert_counters.OSSECIdsAlertCounters, auto_offset_reset: str = 'latest')[source]

Bases: threading.Thread

Thread that polls the OSSEC IDS log to get the latest metrics

get_aggregated_ids_alert_counters() csle_collector.ossec_ids_manager.dao.ossec_ids_alert_counters.OSSECIdsAlertCounters[source]
Returns

aggregated alert counters from the list

run() None[source]

Runs the thread

Returns

None

csle_common.consumer_threads.aggregated_snort_ids_log_consumer_thread module

class csle_common.consumer_threads.aggregated_snort_ids_log_consumer_thread.AggregatedSnortIdsLogConsumerThread(kafka_server_ip: str, kafka_port: int, snort_ids_alert_counters: csle_collector.snort_ids_manager.dao.snort_ids_alert_counters.SnortIdsAlertCounters, auto_offset_reset: str = 'latest')[source]

Bases: threading.Thread

Thread that polls the Snort IDS log to get the latest metrics

get_aggregated_ids_alert_counters() csle_collector.snort_ids_manager.dao.snort_ids_alert_counters.SnortIdsAlertCounters[source]
Returns

aggregated alert counters from the list

run() None[source]

Runs the thread

Returns

None

csle_common.consumer_threads.aggregated_snort_ids_rule_log_consumer_thread module

class csle_common.consumer_threads.aggregated_snort_ids_rule_log_consumer_thread.AggregatedSnortIdsRuleLogConsumerThread(kafka_server_ip: str, kafka_port: int, snort_ids_rule_counters: csle_collector.snort_ids_manager.dao.snort_ids_rule_counters.SnortIdsRuleCounters, auto_offset_reset: str = 'latest')[source]

Bases: threading.Thread

Thread that polls the Snort IDS log to get the latest rule-based metrics

get_aggregated_ids_rule_counters() csle_collector.snort_ids_manager.dao.snort_ids_rule_counters.SnortIdsRuleCounters[source]
Returns

aggregated alert counters from the list

run() None[source]

Runs the thread

Returns

None

csle_common.consumer_threads.attacker_actions_consumer_thread module

class csle_common.consumer_threads.attacker_actions_consumer_thread.AttackerActionsConsumerThread(kafka_server_ip: str, kafka_port: int, attacker_actions: List[csle_common.dao.emulation_action.attacker.emulation_attacker_action.EmulationAttackerAction], auto_offset_reset: str = 'latest')[source]

Bases: threading.Thread

Thread that polls Kafka to get the latest attacker actions

run() None[source]

Runs the thread

Returns

None

csle_common.consumer_threads.avg_host_metrics_thread module

class csle_common.consumer_threads.avg_host_metrics_thread.AvgHostMetricsThread(host_metrics: csle_collector.host_manager.dao.host_metrics.HostMetrics, machines: List[csle_common.dao.emulation_observation.defender.emulation_defender_machine_observation_state.EmulationDefenderMachineObservationState], sleep_time: int)[source]

Bases: threading.Thread

Thread that polls the Kafka log to get the latest status of the docker statistics for a specific host

run() None[source]

Runs the thread

Returns

None

csle_common.consumer_threads.client_population_consumer_thread module

class csle_common.consumer_threads.client_population_consumer_thread.ClientPopulationConsumerThread(kafka_server_ip: str, kafka_port: int, client_population_metrics: csle_collector.client_manager.client_population_metrics.ClientPopulationMetrics, auto_offset_reset: str = 'latest')[source]

Bases: threading.Thread

Thread that polls the Kafka log to get the latest status of the client population

get_average_client_population_metrics() csle_collector.client_manager.client_population_metrics.ClientPopulationMetrics[source]
Returns

average of the list of client population metrics

run() None[source]

Run thread

Returns

None

csle_common.consumer_threads.defender_actions_consumer_thread module

class csle_common.consumer_threads.defender_actions_consumer_thread.DefenderActionsConsumerThread(kafka_server_ip: str, kafka_port: int, defender_actions: List[csle_common.dao.emulation_action.defender.emulation_defender_action.EmulationDefenderAction], auto_offset_reset: str = 'latest')[source]

Bases: threading.Thread

Thread that polls the kafka to get the latest defender actions

run() None[source]

Runs the thread

Returns

None

csle_common.consumer_threads.docker_host_stats_consumer_thread module

class csle_common.consumer_threads.docker_host_stats_consumer_thread.DockerHostStatsConsumerThread(kafka_server_ip: str, kafka_port: int, docker_stats: csle_collector.docker_stats_manager.dao.docker_stats.DockerStats, host_ip: str, auto_offset_reset: str = 'latest')[source]

Bases: threading.Thread

Thread that polls the Kafka log to get the latest status of the docker statistics for a specific host

run() None[source]

Runs the thread

Returns

None

csle_common.consumer_threads.docker_stats_consumer_thread module

class csle_common.consumer_threads.docker_stats_consumer_thread.DockerStatsConsumerThread(kafka_server_ip: str, kafka_port: int, docker_stats: csle_collector.docker_stats_manager.dao.docker_stats.DockerStats, auto_offset_reset: str = 'latest')[source]

Bases: threading.Thread

Thread that polls the Kafka log to get the latest status of the docker statistics

get_average_docker_stats() csle_collector.docker_stats_manager.dao.docker_stats.DockerStats[source]
Returns

the average of the list of docker stats

run() None[source]

Runs the thread

Returns

None

csle_common.consumer_threads.host_metrics_consumer_thread module

class csle_common.consumer_threads.host_metrics_consumer_thread.HostMetricsConsumerThread(host_ip: str, kafka_server_ip: str, kafka_port: int, host_metrics: csle_collector.host_manager.dao.host_metrics.HostMetrics, auto_offset_reset: str = 'latest')[source]

Bases: threading.Thread

Thread that polls Kafka to get the latest metrics for a specific host

run() None[source]

Runs the thread

Returns

None

csle_common.consumer_threads.ossec_ids_log_consumer_thread module

class csle_common.consumer_threads.ossec_ids_log_consumer_thread.OSSECIdsLogConsumerThread(host_ip: str, kafka_server_ip: str, kafka_port: int, ossec_ids_alert_counters: csle_collector.ossec_ids_manager.dao.ossec_ids_alert_counters.OSSECIdsAlertCounters, auto_offset_reset: str = 'latest')[source]

Bases: threading.Thread

Thread that polls the OSSEC IDS log to get the latest metrics

run() None[source]

Runs the thread

Returns

None

csle_common.consumer_threads.snort_ids_log_consumer_thread module

class csle_common.consumer_threads.snort_ids_log_consumer_thread.SnortIdsLogConsumerThread(host_ip: str, kafka_server_ip: str, kafka_port: int, snort_ids_alert_counters: csle_collector.snort_ids_manager.dao.snort_ids_ip_alert_counters.SnortIdsIPAlertCounters, auto_offset_reset: str = 'latest')[source]

Bases: threading.Thread

Thread that polls the Snort IDS log to get the latest metrics

run() None[source]

Runs the thread

Returns

None

Module contents