Tools / Apache HertzBeat Interview Questions
How do you develop a custom collector for a new protocol?
Building a real custom collector (as opposed to a YML template on an existing protocol) means implementing new Java code against HertzBeat's collector architecture.
- Implement the protocol logic by extending
AbstractCollect, the base class for protocol-specific collection. - Wire it into the CollectDataDispatch mechanism so the collector entry point can route jobs to it.
- Write unit tests against mock client implementations, then integration tests against a real endpoint if one is available.
- Verify the collector is discovered via SPI loading (or the PluginRunner, if built as a plugin).
- Write and validate a matching YML template against the manager module.
- Create a monitor of the new type in the HertzBeat UI as an end-to-end verification.
More Related questions...