Tools / Apache HertzBeat Interview Questions
1. What is Apache HertzBeat?
Apache HertzBeat is an AI-powered, agentless, real-time observability platform under the Apache Software Foundation. It unifies metrics collection, log collection, centralized alerting, and notification into one system instead of requiring several tools stitched together. The project began as an ...
2. What are the key features of Apache HertzBeat?
A handful of capabilities are what usually come up when this is asked in an interview, since they are what set HertzBeat apart from a bare Prometheus setup. Agentless collection — connects over HTTP, JMX, SSH, SNMP, JDBC, and more without installing software on targets. YML template-driven ...
3. What is the purpose of HertzBeat's agentless architecture?
The purpose is to remove the operational burden of installing, upgrading, and securing a monitoring agent on every single host, container, or device that needs to be watched. Instead of an agent, HertzBeat connects directly to the target using a standard protocol it already exposes — HTTP f...
4. What are the core modules of HertzBeat?
HertzBeat is a multi-module Maven project, and knowing the module breakdown is a good way to show you understand its architecture, not just its UI. Module Responsibility hertzbeat-manager Job scheduling, control, and the web API hertzbeat-collector Distributed metrics collection (basic, kafka, mo...
5. What is a monitor in HertzBeat?
A monitor is the fundamental object in HertzBeat that represents one target system plus the policy for pulling telemetry from it. It ties together a protocol type, connection details (host, port, credentials), a collection interval, and the metric groups defined by that monitor type's YML templat...
6. What protocols does HertzBeat support for collection?
HertzBeat's collector-basic module ships with support for the general-purpose protocols most systems already expose: HTTP/HTTPS , JMX , SSH , SNMP , JDBC , and the Prometheus exposition format . Beyond that, dedicated collector sub-modules add support for protocols or clients that need proprietar...
7. What is the default login for a new HertzBeat install?
A freshly deployed HertzBeat instance uses the default account admin with password hertzbeat , accessible on port 1157 of the host it's running on. This credential, along with all other user accounts, roles, and permissions, is governed by the sureness.yml configuration file, so the first thing m...
8. How do you install HertzBeat using Docker?
The fastest path is a single Docker command that starts the all-in-one server image: docker run -d -p 1157 :1157 -p 1158 :1158 \ --name hertzbeat apache/hertzbeat Port 1157 serves the web UI and API, while 1158 is used for collector communication. Once the container is running, browse to http://l...
9. What is the YML template system in HertzBeat?
The YML template system is what lets HertzBeat support a new monitoring type without writing any code . A template is a YML file that declares the protocol to use, the connection parameters it needs, and the metric groups and fields to collect. When a template is imported through the web UI, Hert...
10. What notification channels does HertzBeat support?
HertzBeat can dispatch alert notifications through more than ten channels: Email , Discord , Slack , Telegram , DingTalk , WeChat , FeiShu , Webhook , SMS , and ServerChan . Each channel is configured once as a reusable notification receiver, and threshold rules reference one or more receivers al...
11. What is a threshold rule in HertzBeat?
A threshold rule is the policy object that decides whether collected metric data should trigger an alarm. You pick a metric object (for example, a website monitor's response-time field), write a trigger expression, and set the alarm level, notification template, and which monitors the rule applie...
12. What is the purpose of status pages in HertzBeat?
Status pages let you publish a simplified, public-facing view of a service's current health — up, degraded, or down — without exposing the full monitoring dashboard or any internal metrics detail to outside viewers. They're built directly from existing monitors, so as a monitored serv...
13. Define a collector in HertzBeat?
A collector is the lightweight module that actually performs data collection tasks handed to it by the manager. It executes the protocol-specific logic for a monitor — opening an SSH session, querying JMX, polling SNMP — and reports the resulting metrics back. Collectors can run in pu...
14. What is the license of Apache HertzBeat?
Apache HertzBeat is distributed under the Apache License, Version 2.0 , the same permissive license used across virtually all Apache Software Foundation projects. That means it can be used, modified, and redistributed — including in commercial products — without royalty, as long as li...
15. List the categories of systems HertzBeat can monitor?
HertzBeat's templates span most layers of a typical infrastructure stack: Application services — HTTP/HTTPS APIs, websites, SSL certificates, SpringBoot apps. Databases — MySQL, PostgreSQL, Oracle, and others via JDBC. Caches — Redis and similar in-memory stores. Operating syste...
16. What is sureness.yml used for?
sureness.yml is HertzBeat's unified authentication and authorization configuration file. It's where user accounts, their passwords, roles, and the specific permissions attached to each role are defined. Because access control is centralized in this one file rather than scattered across a database...
17. Describe HertzBeat's history and origin?
HertzBeat was first open-sourced in the Dromara community in January 2022 under the name TanCloud/HertzBeat, and spent roughly two years growing there as one of Dromara's more popular projects. On April 5, 2024 , HertzBeat was donated into the Apache Incubator after an Apache Software Foundation ...
18. What is HertzBeat AI?
HertzBeat AI refers to the AI-powered capabilities delivered through the hertzbeat-ai module, layered on top of the core monitoring platform. It adds intelligent interactions and automated analysis over the metrics, logs, and alerts HertzBeat already collects. The most notable piece is a built-in...
19. Why is HertzBeat considered agentless compared to Zabbix?
Zabbix's most complete data collection relies on installing the Zabbix Agent on each monitored host to gather low-level OS and application metrics; HertzBeat instead connects outward using protocols the target already exposes. Zabbix HertzBeat Agent installed and maintained on each host for full ...
20. How does HertzBeat differ from the Prometheus and Grafana stack?
Prometheus and Grafana is a modular stack: Prometheus scrapes metrics (often via separately deployed exporters), stores them, and evaluates alert rules, while Grafana handles visualization and Alertmanager handles notification routing. HertzBeat bundles equivalent functionality into one deployabl...
21. How do you add a custom monitoring type in HertzBeat?
Adding a brand-new monitoring type is a configuration task, not a coding one, thanks to the YML template system. Identify the protocol the target speaks (HTTP, JMX, SSH, SNMP, JDBC, or Prometheus format). Write a YML template defining the connection parameters and the metric groups/fields to pull...
22. How does the collector cluster handle failover?
When a collector in the cluster goes offline, the manager detects it and automatically reassigns its in-flight and scheduled tasks to other available collectors, so monitoring continuity isn't lost while one node is down. When the collector comes back online, it doesn't simply resume its old task...
23. What is the difference between real-time and scheduled thresholds?
Both are threshold rule types, but they evaluate on different triggers, which makes them suited to different scenarios. Real-time threshold Scheduled threshold Fires the instant new monitoring data is collected. Evaluated periodically over a defined time window. Best for high-urgency, instantaneo...
24. How does public collector mode differ from private cloud-edge mode?
Public mode puts a collector into a shared pool that serves any monitor reachable from the main network the manager operates on — tasks are distributed across these collectors purely for scale and load balancing. Private mode is used for cloud-edge collaboration: the collector is deployed i...
25. When should you use a time-series database with HertzBeat?
A time-series database (TSDB) is technically optional in HertzBeat, but you should configure one for any deployment beyond a quick evaluation. Without one, HertzBeat only retains the last hour of historical data , which makes trend charts and long-term dashboards useless. HertzBeat supports sever...
26. What happens when a HertzBeat collector goes offline?
The manager continuously tracks collector heartbeats, so an offline collector is detected quickly rather than silently. Once detected, all of that collector's assigned monitoring tasks are automatically redistributed to the remaining healthy collectors in the cluster. This means monitored targets...
27. How do you configure alert notification templates?
Start under Alerting, where a notification receiver is defined for a specific channel (Email, Slack, Webhook, etc.) with its connection details, such as an SMTP server or a bot token. Create the receiver for the desired channel. Optionally customize the notification template text, which supports ...
28. What is the difference between HertzBeat and Nagios?
Nagios is a long-established monitoring system built around plugin scripts executed on a schedule, often paired with NRPE agents on remote hosts for deeper checks; HertzBeat is a newer, web-first, agentless platform built around YML templates. Nagios HertzBeat Checks are shell/Perl/Python plugin ...
29. How can you optimize HertzBeat for large-scale monitoring?
Scaling HertzBeat well is mostly about spreading load correctly and picking the right storage backend, rather than any single silver-bullet setting. Scale the collector cluster horizontally so consistent hashing spreads jobs across more nodes instead of overloading a few. Run a production-grade T...
30. How do you troubleshoot a monitor showing no data?
Work outward from the monitor itself toward the infrastructure around it, rather than guessing. Check the monitor's status in the UI — is it marked unreachable, and what error message is shown? Verify connectivity and credentials — can the collector actually reach the target's protoco...
31. Why does HertzBeat use consistent hashing for job assignment?
Consistent hashing lets the manager assign monitoring jobs across the collector cluster so that when a collector is added or removed, only a small proportion of jobs need to move to a different node — not the entire job set. With a naive hashing scheme (like a plain modulo over collector co...
32. What is the difference between the warehouse's real-time and history store?
The hertzbeat-warehouse module keeps two distinct tiers of storage rather than a single store, because dashboards and trend charts need different access patterns. Real-time store History store Holds only the latest snapshot per metric. Holds the full time-series of past values. Optimized for fast...
33. How do you integrate HertzBeat with existing Prometheus exporters?
Because HertzBeat is Prometheus-compatible, you don't need to retire exporters you already run — create a monitor using HertzBeat's Prometheus-type template and point it at the exporter's metrics endpoint (typically something like /metrics on a given host and port). HertzBeat then scrapes t...
34. When would you choose VictoriaMetrics vs IoTDB for HertzBeat?
Both are supported HertzBeat storage backends, but they fit different situations. VictoriaMetrics Apache IoTDB HertzBeat's own documented default recommendation. Strong fit if you already run IoT/industrial time-series workloads. PromQL-compatible, simple operationally. Purpose-built for very hig...
35. How do multi-expression threshold alarms work in HertzBeat?
Multi-expression alarms go beyond a single metric-vs-threshold comparison by combining multiple metrics with logical operators — AND , OR , and UNLESS — inside one expression, evaluated using PromQL or SQL syntax. Under the hood, the expression is parsed with an ANTLR v4 grammar , whi...
36. Explain the internal working of HertzBeat's data collection pipeline?
The pipeline is a producer/consumer flow: the manager schedules a job, a collector executes it, and the resulting data fans out to multiple independent consumers over an internal message queue rather than being written directly to one destination. flowchart LR A[Manager schedules job] --> B[Colle...
37. Explain the execution flow from monitor creation to alert notification?
This end-to-end flow is a good one to walk through out loud in an interview, since it touches nearly every module in the system. sequenceDiagram participant U as User (Angular Web UI) participant M as Manager participant C as Collector participant Q as Internal Queue participant W as Warehouse pa...
38. Explain the lifecycle of a collection job in a collector cluster?
A job's lifecycle spans creation, ongoing execution, and possible reassignment, all coordinated by the manager rather than the collector deciding anything on its own. flowchart TD A[Job created when monitor is saved] --> B[Manager assigns job via consistent hashing] B --> C[Collector executes job...
39. 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 co...
40. What is the difference between collector-basic and protocol-specific collector modules?
HertzBeat splits collector code by dependency weight, not just by feature, and this shows up directly in the module layout. hertzbeat-collector-basic Protocol-specific modules (kafka, mongodb, nebulagraph...) Protocols with no proprietary client dependencies (HTTP, JMX, SSH, SNMP, JDBC). Bundle a...
41. 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 Collec...
42. Explain the internal working of the alert reduction pipeline?
After a threshold expression evaluates to a firing state, the alert doesn't go straight to a notification channel — it first passes through a reduction pipeline that decides whether it should actually be surfaced. flowchart LR A[Expression evaluates to firing] --> B[Inhibition check] B --> ...
43. How does HertzBeat achieve high-performance cluster scaling?
Scaling comes from several architectural decisions working together rather than one single mechanism. Horizontal collector scaling — new collector nodes join the pool and immediately start taking a share of jobs. Consistent hashing — job assignment spreads load evenly and minimizes re...
44. Why does HertzBeat use Netty for manager-collector communication?
The hertzbeat-remoting module builds manager-collector communication on Netty , a high-performance asynchronous networking framework, rather than plain blocking HTTP request/response calls. Netty gives HertzBeat persistent, bidirectional connections between the manager and each collector, so task...
45. How do you design a HertzBeat cloud-edge topology for isolated networks?
The pattern is to keep one central manager reachable across your networks, and deploy a private-mode collector inside each isolated segment rather than trying to open inbound access to every individual host. Deploy the central HertzBeat manager somewhere reachable by all edge networks (e.g., a sh...
46. How does HertzBeat's built-in MCP Server work for AI agent integration?
The hertzbeat-ai module ships a built-in MCP (Model Context Protocol) Server , which exposes HertzBeat's monitoring data and certain actions as a set of standardized tools that an MCP-compatible AI agent can call directly, instead of the agent needing a bespoke integration for HertzBeat's API. In...
47. Explain the internal working of HertzBeat's ANTLR-based alert expression grammar?
Multi-expression threshold alarms need to parse complex boolean logic across PromQL- and SQL-style syntax reliably, which is fragile to do with regular expressions or hand-rolled string parsing. HertzBeat instead defines an ANTLR v4 grammar for this expression language. ANTLR generates a parser f...
48. How does HertzBeat's OpenTelemetry integration work for logs and traces?
The hertzbeat-otel module acts as an OTLP (OpenTelemetry Protocol) receiver , letting applications that are already instrumented with OpenTelemetry SDKs ship their logs and traces straight into HertzBeat, alongside the metrics HertzBeat pulls itself. This matters because pull-based agentless coll...
49. Which is better for mixed cloud-native and legacy environments: HertzBeat or Zabbix?
Neither tool is a strict upgrade over the other; the right pick depends on what the environment actually needs. HertzBeat's case: agentless YML templates onboard cloud-native and modern services fast, cloud-edge collectors handle isolated network segments cleanly, and the all-in-one design (colle...
50. How do you migrate an existing Zabbix or Prometheus setup to HertzBeat?
A migration goes smoothest as a staged, parallel-run process rather than a single cutover. Inventory existing targets — list every host, service, and exporter currently monitored, along with its check type. Map targets to HertzBeat templates — for Prometheus exporters, this can be nea...