backend.globaleaks.anomaly

Module Contents

Classes

Alarm

Functions

get_disk_anomaly_conditions(free_workdir_bytes, total_workdir_bytes)
generate_admin_alert_mail(session, tid, alert)
save_anomalies(session)
check_anomalies()
backend.globaleaks.anomaly.ANOMALY_MAP[source]
backend.globaleaks.anomaly.get_disk_anomaly_conditions(free_workdir_bytes, total_workdir_bytes)[source]
backend.globaleaks.anomaly.generate_admin_alert_mail(session, tid, alert)[source]
backend.globaleaks.anomaly.save_anomalies(session)[source]
class backend.globaleaks.anomaly.Alarm(state)[source]

Bases: object

check_tenant_anomalies(self, tid)[source]

This function update the Alarm level.

check_disk_anomalies(self)[source]

Here in Alarm is written the threshold to say if we’re in disk alarm or not. Therefore the function “report” the amount of free space and the evaluation + alarm shift is performed here.

workingdir: is performed a percentage check (at least 1% and an absolute comparison)

“unusable node” threshold: happen when the space is really shitty. https://github.com/globaleaks/GlobaLeaks/issues/297 https://github.com/globaleaks/GlobaLeaks/issues/872

backend.globaleaks.anomaly.check_anomalies()[source]