BOSWatch/includes/alarmHandler.py
2015-05-25 10:28:35 +02:00

25 lines
697 B
Python

#!/usr/bin/python
# -*- coding: cp1252 -*-
import logging
from includes import globals # Global variables
def processAlarm(typ,freq,data):
logging.debug("[ ALARM ]")
for pluginName, plugin in globals.pluginList.items():
#if enabled use RegEx-Filter
if globals.config.getint("BOSWatch","useRegExFilter"):
from includes import filter
if filter.checkFilters(data,typ,pluginName):
logging.debug("call Plugin: %s", pluginName)
plugin.run(typ,freq,data)
logging.debug("return from: %s", pluginName)
else:
logging.debug("call Plugin: %s", pluginName)
plugin.run(typ,freq,data)
logging.debug("return from: %s", pluginName)
logging.debug("[END ALARM]")