Tools / Apache HertzBeat Interview Questions
How does HertzBeat's plugin mechanism work for custom collectors?
HertzBeat uses a Java SPI-style plugin loading mechanism: a PluginRunner component scans for plugin implementations and loads them automatically at startup, without requiring changes to the core codebase.
To add one, a developer implements the collector logic (extending the project's abstract collection classes), registers it so the service loader can discover it, and validates it against a YML template through the manager module. The PluginRunner then detects and loads the new plugin the next time the service starts, making it available as a monitor type just like a built-in protocol.
More Related questions...