We should implement a Prometheus endpoint to export the data from the state store. Namely, the moving average of the various IPs seen, as well as which have crossed the threshold (if any). For example, we might call the metric anomaly_score and have one label, namely the IP, and the resulting value is the anomaly score. We might have a metric anomaly_score_crossed_threshold, which has one label, namely the IP, and the resulting value is a 0 for not crossing and 1 for crossing.
We should implement a Prometheus endpoint to export the data from the state store. Namely, the moving average of the various IPs seen, as well as which have crossed the threshold (if any). For example, we might call the metric
anomaly_score
and have one label, namely the IP, and the resulting value is the anomaly score. We might have a metricanomaly_score_crossed_threshold
, which has one label, namely the IP, and the resulting value is a 0 for not crossing and 1 for crossing.The client is here
https://github.com/prometheus/client_python
Please also add any dependencies to
requirements.txt