I'm trying to write a command parser plugin for my ZenPack and am running into some trouble. When it tries to load the plugin I get the following error message in zenhub.log:
ERROR zen.CommandConfig: Could not load ZenPacks.My.ZenPack.parsers.MyPlugin plugin
The code behind this message is in Products/ZenHub/services/CommandConfig.py, and is as follows:
ploader = getParserLoader(dmd, parserName)
if ploader is None:
return MonitoringManager.getInstance().getPluginLoader(dmd.ZenPackManager.packs(), modPath)
However, duplicating that in zendmd it seems to work (i.e., it does not return None):
>>> MonitoringManager.getInstance().getPluginLoader(dmd.ZenPackManager.packs(), 'ZenPacks.My.ZenPack.parsers.MyPlugin')
<Products.DataCollector.Plugins.PluginLoader instance at 0xc012d4c>
Does the parser directory contain an __init__.py?
It does. It seems the problem was zenhub had not restarted properly; I think our daemon management software got confused when I bypassed it and restarted zenhub from the command line.