HertzBeat Collector
HertzBeat Collector is a lightweight data collection module that enables metrics collection, high availability deployments, and cloud-edge collaboration in Apache HertzBeat.
Introduction
HertzBeat Collector is a versatile and lightweight metrics collection module within the Apache HertzBeat monitoring system. It's designed to gather monitoring data from various targets and send the collected metrics to the main HertzBeat server for processing, alerting, and visualization.
With the collector module, you can implement:
- High Availability: Deploy multiple collectors to ensure continuous monitoring even if some collector instances fail
- Load Balancing: Distribute monitoring tasks across multiple collectors to improve performance
- Cloud-Edge Collaboration: Monitor resources in isolated networks while managing everything from a central HertzBeat server
Collector Architecture
The collector module is built with a modular design to make it easily extensible for various monitoring scenarios. The architecture consists of:
-
Collector Entry Point: The main entry point for running the collector module, from which collection tasks are executed after startup.
-
collector-basic: Contains implementations for common protocols like HTTP, JDBC, SSH, SNMP, etc. These collectors typically don't require additional proprietary dependencies and can handle most basic monitoring needs.
-
collector-common: Provides general utility classes and methods, such as connection pools and caching mechanisms that other modules can reuse.
-
collector-xxx: Extension modules for specific services or protocols (MongoDB, RocketMQ, Kafka, NebulaGraph, etc.). These modules often require specific dependencies for their respective services.
Supported Protocols
HertzBeat Collector supports an extensive list of monitoring protocols:
| Protocol Category | Protocols |
|---|---|
| Web/API | http, ssl_cert, websocket |
| Databases | jdbc, redis, mongodb, memcached |
| Operating Systems | ssh, ipmi |
| Network | icmp (ping), telnet, snmp, modbus |
| Messaging | mqtt, rocketmq, kafka |
pop3, smtp, imap | |
| Cloud Services | prometheus, nebulagraph, ngql |
| Others | jmx, dns, ftp, ntp, udp, nginx, redfish, script, registry, httpsd |
Deployment Options
You can deploy HertzBeat Collector in several ways depending on your environment and needs, once you log in to the HertzBeat web interface and go to the collector, you can see the deployment options.
Parameters explanation:
-e IDENTITY=custom-collector-name: (Optional) Set a unique identifier for this collector. Must be unique across all collectors.-e MODE=public: Set the running mode (public or private), for public cluster or private cloud-edge mode.-e MANAGER_HOST=192.168.1.100: Important! Set the IP address of the main HertzBeat server. Replace with your actual server IP.-e MANAGER_PORT=1158: (Optional) Set the port of the main HertzBeat server, default is 1158.-v $(pwd)/logs:/opt/hertzbeat-collector/logs: (Optional) Mount the log files to the local host.