2015-05-22 21:32:37 +02:00
|
|
|
#!/usr/bin/python
|
|
|
|
|
# -*- coding: cp1252 -*-
|
|
|
|
|
|
|
|
|
|
import logging
|
|
|
|
|
|
|
|
|
|
from includes import globals # Global variables
|
|
|
|
|
|
|
|
|
|
def processAlarm(typ,freq,data):
|
|
|
|
|
logging.debug("[ ALARM ]")
|
2015-05-23 09:34:48 +02:00
|
|
|
for pluginName, plugin in globals.pluginList.items():
|
2015-05-25 10:28:35 +02:00
|
|
|
|
2015-05-24 21:24:26 +02:00
|
|
|
#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)
|
2015-05-25 10:28:35 +02:00
|
|
|
|
2015-05-24 21:24:26 +02:00
|
|
|
else:
|
2015-05-23 09:34:48 +02:00
|
|
|
logging.debug("call Plugin: %s", pluginName)
|
|
|
|
|
plugin.run(typ,freq,data)
|
|
|
|
|
logging.debug("return from: %s", pluginName)
|
2015-05-25 10:28:35 +02:00
|
|
|
|
2015-05-22 21:27:46 +02:00
|
|
|
logging.debug("[END ALARM]")
|