Skip to main content

Monitoring configuration demo

Last updated 10/03/2026

Install dependencies​

The LogBus2 monitoring feature depends on Prometheus, Pushgateway, and Grafana. Search online for installation tutorials for your operating system.

LogBus2 configuration​

Configuration items explained​

  • push_gateway: The Pushgateway URL. Required
  • job_name: The job name, that is, the job in Pushgateway. Required
  • namespace: The namespace, a prefix used to distinguish projects. It is prepended to job_name. Optional
  • labels: Labels used to filter metrics
  • disable: Whether to disable monitoring. Default: false
  • duration: How often data is pushed. Default: 5s
  • disable_default_go_collector: Whether to disable the default Go metrics collector, which collects information such as GC and goroutines. Default: false
  • server # An API service that lets you pull metrics. Supported in 2.1.0.5 and later
  • server.enabled # Whether to enable it. Default: false
  • server.port # The API service port. Default: 8002

demo​

{
"datasource": [
{
"type": "kafka",
"topic": "ta-logbus-t1",
"consumer_group": "kafka_test",
"auto_commit": false,
"brokers": [
"127.0.0.1:9092"
],
"block_partitions_timeout": 4000,
"block_partitions_revoked": false
}
],
"monitor": {
"disable": false,
"push_gateway": "http://127.0.0.1:9091",
"job_name": "logbus_v2",
"namespace": "lzd",
"labels": {
"instance": "instance_logbus"
},
"disable_default_go_collector": false,
"duration": 5
},
"push_url": "http://127.0.0.1:8992"
}

Build the dashboard​

The dashboard is built with Grafana

Metrics​

  • cpu_usage
  • cpu_load_average
  • disk_used_percent
  • disk_free
  • read_speed: Data read speed
  • send_speed: Data send speed
  • read_bytes: Size of data read
  • total_bytes: Total size of the data source
  • mem_used_percent
  • mem_available

Setup steps​

  1. Open your deployed Grafana, go to the Data sources page, and select Add data source
  1. Select the Prometheus data source
  1. Enter the Prometheus server information
  1. Create a dashboard
  1. Edit the panel and select metrics based on the configured namespace, job_name, and so on
  1. Repeat to create a panel for each metric you want to monitor, and remember to save~

Result​

Was this page helpful?