Skip to content
Snippets Groups Projects
Commit 046d1ce8 authored by David Schmitz's avatar David Schmitz
Browse files

feature/generic_mitigation_stats: refactor for support of generic mitigations...

feature/generic_mitigation_stats: refactor for support of generic mitigations statistics supporting different router platforms using diffrent stat collection technologies
parent b797a526
Branches
No related tags found
No related merge requests found
...@@ -437,7 +437,7 @@ def mitigation_stats_poll_statistics(): ...@@ -437,7 +437,7 @@ def mitigation_stats_poll_statistics():
pid = os.getpid() pid = os.getpid()
logger.info("mitigation_stats_poll_statistics(): in child process (pid="+str(pid)+", ppid="+str(ppid)+")") logger.info("mitigation_stats_poll_statistics(): in child process (pid="+str(pid)+", ppid="+str(ppid)+")")
try: try:
mitigation_stats_collector_specific.poll_snmp_statistics() mitigation_stats_collector_specific.poll_mitigation_statistics()
except Exception as e: except Exception as e:
logger.error("mitigation_stats_poll_statistics(): exception occured in snmp poll (pid="+str(pid)+", ppid="+str(ppid)+"): "+str(e)) logger.error("mitigation_stats_poll_statistics(): exception occured in snmp poll (pid="+str(pid)+", ppid="+str(ppid)+"): "+str(e))
mitigation_stats_lock_remove() mitigation_stats_lock_remove()
......
...@@ -6,8 +6,10 @@ ...@@ -6,8 +6,10 @@
from django.conf import settings from django.conf import settings
if hasattr(settings, "MITIGATION_STATISTIC_COLLECTOR_SPECIFIC_CLASS") and settings.PROXY_CLASS == "mitigation_stats_collector_specific_junos_snmp": if hasattr(settings, "MITIGATION_STATISTIC_COLLECTOR_SPECIFIC_CLASS") and settings.PROXY_CLASS == "mitigation_stats_collector_specific_junos_snmp":
from utils import mitigation_stats_collector_specific_junos_snmp as mitigation_stats_collector_specific from utils import mitigation_stats_collector_specific_junos_snmp as mitigation_stats_collector_specific_class
mitigation_stats_collector_specific = mitigation_stats_collector_specific_class.MitigationStatisticCollectorSpecific_JunosSnmp()
else: # default is junos_snmp for compatibility else: # default is junos_snmp for compatibility
from utils import mitigation_stats_collector_specific_junos_snmp as mitigation_stats_collector_specific from utils import mitigation_stats_collector_specific_junos_snmp as mitigation_stats_collector_specific_class
mitigation_stats_collector_specific = mitigation_stats_collector_specific_class.MitigationStatisticCollectorSpecific_JunosSnmp()
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment