Handler Reference¶
Handlers are used to extend the system's functionality by implementing custom functions. They are Python modules with implemented functions. In the system, they are represented as function pointers, such as noc.main.handlers.default_handlers.empty_handler
. The actual functions are registered in the system using the import string as a pointer to the function. For example, there is a default handler in the system located at main/handlers/default.py
. When called, it prints the passed arguments.
List of Available Handlers¶
Name | Interface | Trigger | Settings |
---|---|---|---|
Config Filter | Allow Config Filter | Config scan | Managed Object |
Config Diff Filter | Allow Config Diff Filter | Config scan | Managed Object |
Config Validation | Allow Config Validation | Config scan | Managed Object |
Address Resolver | Allow Address Resolver | Discovery scan | Managed Object Profile |
Housekeeper | Allow Housekeeping | HK scan | Managed Object Profile |
DS Filter | Allow DS Filter | Datastream scan | DS Filter |
Iface Description | Allow Iface Description | ifDesc scan | Managed Object Profile |
Examples¶
You can check a handler through ./noc shell
:
from noc.core.mongo.connection import connect
from noc.core.handler import get_handler
connect()
h = get_handler(<handler_path>)
h()
Dumping Variables¶
This handler prints the provided arguments.
def empty_handler(*args, **kwargs):
print("[empty_handler] Arguments", args, kwargs)