Pulsar Heartbeat monitors Pulsar cluster availability, tracks latency of Pulsar message pubsub, and reports failures of the Pulsar cluster. It produces synthetic workloads to measure end-to-end message pubsub latency.
It is a cloud native application that can be installed by Helm within the Pulsar Kubernetes cluster.
Here is a list of features that Pulsar Heartbeat supports.
This is a data driven tool that sources configuration from a yaml or json file. Here is a template. The configuration json file can be specified in the overwrite order of
PULSAR_OPS_MONITOR_CFG./pulsar-heartbeat -config /path/to/pulsar_ops_monitor_config.yml../config/runtime.ymlThis tool exposes Prometheus compliant metrics at \metrics endpoint for scraping. The exported metrics are:
| Name | Type | Description |
|---|---|---|
| pulsar_pubsub_latency_ms | gauge | end to end message pub and sub latency in milliseconds |
| pulsar_pubsub_latency_ms_hst | summary | end to end message latency histogram summary over 50%, 90%, and 99% samples |
| pulsar_websocket_latency_ms | gauge | end to end message pub and sub latency over websocket interface in milliseconds |
| pulsar_k8s_bookkeeper_offline_counter | gauge | bookkeeper offline instances in Kubernetes cluster |
| pulsar_k8s_broker_offline_counter | gauge | broker offline instances in the Kubernetes cluster |
| pulsar_k8s_proxy_offline_counter | gauge | proxy offline instances in the Kubernetes cluster |
| pulsar_k8s_bookkeeper_zookeeper_counter | gauge | zookeeper offline instances in the Kubernetes cluster |
| pulsar_monitor_counter | counter | the total number of heartbeats counter |
| pulsar_tenant_size | gauge | the number of tenants that can be used as a health indicator of admin interface |
Pulsar heartbeat can be deployed within the same Pulsar Kubernetes cluster. Kubernetes monitoring and individual broker monitoring are only supported within the same Pulsar Kubernetes cluster deployment.
Pulsar Heartbeat's official docker image can be pulled here
$ docker-compose up
The runtime.yml/yaml or runtime.json file must be mounted to /config/runtime.yml as the default configuration path.
Run docker container that exposes Prometheus metrics for collection.
$ docker run -d -it -v $HOME/go/src/github.com/datastax/pulsar-heartbeat/config/runtime-astra.yml:/config/runtime.yml -p 8080:8080 --name=pulsar-heartbeat datastax/pulsar-heartbeat:latest
For the following commands, Helm version 3 is supported.
Pulsar Heartbeat can be installed as part of Pulsar cluster in this Helm chart.
Pulsar Heartbeat can be directly enabled inside the DataStax Pulsar chart.
This script builds the Pulsar Heartbeat Go application, runs code static analysis(golint), runs unit tests, and creates a binary under ./bin/pulsar-heartbeat.
$ ./scripts/ci.sh
This command runs a multi stage build to produce a docker image.
## Incident Management Integration
Pulsar Heartbeat supports multiple incident management platforms for alerting and escalation:
### OpsGenie
Configure OpsGenie integration in your configuration file:
```yaml
opsGenieConfig:
intervalSeconds: 180
heartbeatKey: "your-opsgenie-heartbeat-key"
alertKey: "your-opsgenie-alert-key"
Configure PagerDuty integration via environment variable:
export PAGER_DUTY_INTEGRATION_KEY="your-pagerduty-integration-key"
Configure IBM OCM integration via environment variables:
export IBM_OCM_WEBHOOK_URL="https://your-ibm-ocm-webhook-url"
export IBM_OCM_API_BASE_URL="https://console.oncallmanager.ibm.com"
export IBM_OCM_API_USER="your-api-username"
export IBM_OCM_API_PASSWORD="your-api-password"
Note: For incident resolution, IBM OCM requires API credentials (IBM_OCM_API_BASE_URL, IBM_OCM_API_USER, IBM_OCM_API_PASSWORD). If only the webhook URL is provided, incidents will be created but not automatically resolved.
Note: You can enable multiple incident management platforms simultaneously. Pulsar Heartbeat will send alerts to all configured platforms and automatically resolve incidents when issues are cleared.
$ make
Content type
Image
Digest
sha256:510dc1084…
Size
44.6 MB
Last updated
about 2 months ago
docker pull datastax/pulsar-heartbeatPulls:
692
Jan 20 to Jan 26