BOSWatch/includes/alarmHandler.py

22 lines
686 B
Python
Raw Normal View History

#!/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)
2015-05-22 21:27:46 +02:00
logging.debug("[END ALARM]")