-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add anomaly detector for AS hegemony cone (count of downstream networks) #28
Comments
Hi Romain, While reviewing the enhancement and going through the repository, I think that we need to add logic to compute the number of dependent networks in the def compute_dependent_networks(as_hegemony_values):
# Dictionary to store the count of dependent networks for each AS
dependent_networks_count = {}
# Iterate through AS hegemony values
for as_value in as_hegemony_values:
asn = as_value['asn']
dependent_networks = as_value.get('dependent_networks', [])
# Update the count for each dependent network
for network in dependent_networks:
if network not in dependent_networks_count:
dependent_networks_count[network] = 1
else:
dependent_networks_count[network] += 1
return dependent_networks_count Additionally, creating a new consumer script to consume messages from the topic where the computed results are pushed, and adding a PostgreSQL schema for storing the count requests. |
Hi, A similar code is already in kafka-toolbox/psql/consumers/ASHegemony.py Line 193 in 89649fb
We need to decouple the two functions that this script has, pushing ASHegemony values to Postgres and computing the number of dependent networks. So I think we should start with a new script that reads ASHegemony values from Kafka and store the number of dependent networks back into kafka. |
Okay! On it |
HI Romain, is this issue still open?..I would wanna work on this. |
hey, sorry for the late reply. Yes this is still open. The first step is to move the computation of AS hegemony cone to kafka. That means read the AS hegemony kafka topic, compute AS hegemony cone, and push the results to a new kafka topic |
hi hope you are doing well
Unfortunately, I received the following error related to the connection:
If you have any insights or suggestions on how to resolve this, I would greatly appreciate your help. |
Is your feature request related to a problem? Please describe.
Currently we cannot detect anomalies in the number of dependent networks because these value is computed just before storing it in the database.
Describe the solution you'd like
The text was updated successfully, but these errors were encountered: