Skip to main content
Version: Current

Monitoring Apache IoTDB Database

Monitor the running status of the Apache IoTDB Internet of Things time series database (JVM-related), memory task clusters and other related Metrics.

Operation before monitoring

You need to enable the metrics function in IoTDB, which will provide interface data in the form of prometheus metrics.

To enable the metrics function, refer to Official Documentation

The main steps are as follows:

  1. The metric collection is disabled by default, you need to modify the parameters in conf/iotdb-metric.yml first, then restart the server
# Whether to start the monitoring module, the default is false
enableMetric: true

# Whether to enable operation delay statistics
enablePerformanceStat: false

# Data provision method, externally provide metrics data through jmx and prometheus protocol, optional parameters: [JMX, PROMETHEUS, IOTDB], IOTDB is closed by default.

# The metric architecture used at the bottom layer, optional parameters: [MICROMETER, DROPWIZARD]
monitorType: MICROMETER

# Initialize the level of the metric, optional parameters: [CORE, IMPORTANT, NORMAL, ALL]
metricLevel: IMPORTANT

# Predefined metrics set, optional parameters: [JVM, LOGBACK, FILE, PROCESS, SYSTEM]
  1. Restart IoTDB, open a browser or use curl to access http://servier_ip:9091/metrics, and you can see the metric data.

  2. Add the corresponding IoTDB monitoring in HertzBeat.

Configuration parameters

Parameter nameParameter help description
Monitoring HostThe peer IPV4, IPV6 or domain name to be monitored. Note ⚠️Without protocol header (eg: https://, http://).
Monitoring nameThe name that identifies this monitoring, and the name needs to be unique.
PortThe port provided by the IoTDB Metric interface, which is 9091 by default.
TimeoutHTTP request query timeout
Acquisition IntervalInterval time for monitoring periodic data collection, in seconds, the minimum interval that can be set is 30 seconds
Whether to detectWhether to detect and check the availability of monitoring before adding monitoring, and the operation of adding and modifying will continue after the detection is successful
Description RemarksMore remark information to identify and describe this monitoring, users can remark information here

Collect metrics

Metric collection: cluster_node_status

Metric NameMetric UnitMetric Help Description
nameNoneNode name IP
statusNoneNode status, 1=online 2=offline

Metric collection: jvm_memory_committed_bytes

Metric NameMetric UnitMetric Help Description
areanoneheap memory or nonheap memory
idnonememory block
valueMBThe memory size currently requested by the JVM

Metric collection: jvm_memory_used_bytes

Metric NameMetric UnitMetric Help Description
areanoneheap memory or nonheap memory
idnonememory block
valueMBJVM used memory size

Metric collection: jvm_threads_states_threads

Metric NameMetric UnitMetric Help Description
statenonethread state
countNoneThe number of threads corresponding to the thread state

Index collection: quantity business data

Metric NameMetric UnitMetric Help Description
nameNoneBusiness name timeSeries/storageGroup/device/deviceUsingTemplate
typenonetype total/normal/template/template
valueNoneThe current timeSeries/storageGroup/device/The number of devices that have activated the template

Metric collection: cache_hit cache

Metric NameMetric UnitMetric Help Description
nameNoneCache name chunk/timeSeriesMeta/bloomFilter
value%chunk/timeSeriesMeta cache hit rate, bloomFilter interception rate

Metric collection: queue task queue

Metric NameMetric UnitMetric Help Description
nameNoneQueue name compaction_inner/compaction_cross/flush
statusnonestatus running/waiting
valueNoneNumber of tasks at current time

Metric collection: thrift_connections

Metric NameMetric UnitMetric Help Description
connectionnonethrift current connection number