Skip to content

Moquette

Collect monitoring metrics for Moquette messages, sessions, queues, JVM, and processes.

Configuration

Enable Prometheus Metrics

Use a Moquette build that includes the metrics_prometheus module and add the following to moquette.conf:

metrics_provider_class MetricsProviderPrometheus
metrics_endpoint_port 9400

Restart Moquette and ensure that the host running DataKit can access http://<host>:9400/metrics.

Configure DataKit

After installing DataKit, go to its installation directory and copy the collector configuration:

mkdir -p conf.d/prom
cp conf.d/samples/prom.conf.sample conf.d/prom/moquette.conf

Edit conf.d/prom/moquette.conf, replacing <host>, <env>, and <name> with the actual Moquette address, environment, and deployment name:

[[inputs.prom]]
  urls = ["http://<host>:9400/metrics"]
  source = "moquette"
  interval = "15s"
  timeout = "10s"
  measurement_name = "moquette"
  keep_exist_metric_name = true
  election = false

  [inputs.prom.tags]
    service = "moquette"
    env = "<env>"
    deployment = "<name>"

Restart DataKit

datakit service -R

Metrics

Measurement: moquette.

MetricName MetricDescribe Dimensions Unit
jvm_buffer_pool_capacity_bytes JVM buffer pool capacity pool, host, instance, service, env, deployment B
jvm_buffer_pool_used_buffers Number of used buffers in the JVM buffer pool pool, host, instance, service, env, deployment -
jvm_buffer_pool_used_bytes JVM buffer pool memory used pool, host, instance, service, env, deployment B
jvm_classes_currently_loaded Number of currently loaded JVM classes host, instance, service, env, deployment -
jvm_classes_loaded_total Total classes loaded since JVM startup host, instance, service, env, deployment -
jvm_classes_unloaded_total Total classes unloaded since JVM startup host, instance, service, env, deployment -
jvm_compilation_time_seconds_total Cumulative JVM JIT compilation time host, instance, service, env, deployment s
jvm_gc_collection_seconds_count Cumulative JVM garbage collection count gc, host, instance, service, env, deployment -
jvm_gc_collection_seconds_sum Cumulative JVM garbage collection time gc, host, instance, service, env, deployment s
jvm_memory_committed_bytes Committed capacity of the JVM memory area area, host, instance, service, env, deployment B
jvm_memory_init_bytes Initial capacity of the JVM memory area area, host, instance, service, env, deployment B
jvm_memory_max_bytes Maximum capacity of the JVM memory area; -1 if undefined area, host, instance, service, env, deployment B
jvm_memory_objects_pending_finalization Number of JVM objects pending finalization host, instance, service, env, deployment -
jvm_memory_pool_allocated_bytes_total Cumulative memory allocated in the JVM memory pool; updated only after GC pool, host, instance, service, env, deployment B
jvm_memory_pool_collection_committed_bytes Committed JVM memory pool capacity after the last GC pool, host, instance, service, env, deployment B
jvm_memory_pool_collection_init_bytes Initial JVM memory pool capacity after the last GC pool, host, instance, service, env, deployment B
jvm_memory_pool_collection_max_bytes Maximum JVM memory pool capacity after the last GC; -1 if undefined pool, host, instance, service, env, deployment B
jvm_memory_pool_collection_used_bytes JVM memory pool memory used after the last GC pool, host, instance, service, env, deployment B
jvm_memory_pool_committed_bytes Committed JVM memory pool capacity pool, host, instance, service, env, deployment B
jvm_memory_pool_init_bytes Initial JVM memory pool capacity pool, host, instance, service, env, deployment B
jvm_memory_pool_max_bytes Maximum JVM memory pool capacity; -1 if undefined pool, host, instance, service, env, deployment B
jvm_memory_pool_used_bytes JVM memory pool memory used pool, host, instance, service, env, deployment B
jvm_memory_used_bytes JVM memory area memory used area, host, instance, service, env, deployment B
jvm_runtime_info JVM runtime information; value is 1, with version and vendor recorded in tags runtime, vendor, version, host, instance, service, env, deployment -
jvm_threads_current Current JVM Threads host, instance, service, env, deployment -
jvm_threads_daemon Current JVM daemon thread count host, instance, service, env, deployment -
jvm_threads_deadlocked JVM threads deadlocked on object monitors or ownable synchronizers host, instance, service, env, deployment -
jvm_threads_deadlocked_monitor JVM threads deadlocked on object monitors host, instance, service, env, deployment -
jvm_threads_peak Peak thread count since JVM startup host, instance, service, env, deployment -
jvm_threads_started_total Total threads created since JVM startup host, instance, service, env, deployment -
jvm_threads_state Current JVM thread count by thread state state, host, instance, service, env, deployment -
moquette_open_sessions Number of sessions in the Broker host, instance, service, env, deployment -
moquette_publishes_total Cumulative messages published by the Broker host, instance, service, env, deployment -
moquette_session_messages_total Cumulative messages dispatched by session event queue and QoS QoS, queue_name, host, instance, service, env, deployment -
moquette_session_queue_fill Current session event queue utilization, from 0 to 1 queue_id, host, instance, service, env, deployment -
moquette_session_queue_fill_max Maximum session event queue utilization since the last scrape, from 0 to 1 queue_id, host, instance, service, env, deployment -
moquette_session_queue_overruns_total Cumulative task enqueue failures caused by a full session event queue queue_name, host, instance, service, env, deployment -
process_cpu_seconds_total Cumulative process CPU time in user and kernel modes host, instance, service, env, deployment s
process_max_fds Maximum file descriptors the process is allowed to open host, instance, service, env, deployment -
process_open_fds Number of file descriptors currently open by the process host, instance, service, env, deployment -
process_resident_memory_bytes Process resident memory size host, instance, service, env, deployment B
process_start_time_seconds Process start time as a Unix timestamp in seconds host, instance, service, env, deployment s
process_virtual_memory_bytes Process virtual memory size host, instance, service, env, deployment B

Feedback

Is this page helpful?