| import{_ as r,r as n,o as i,c as s,a as u,d as t,e,b as d,f as a}from"./app-dNeAgOFp.js";const c={},m=a('<h1 id="metric-tool" tabindex="-1"><a class="header-anchor" href="#metric-tool" aria-hidden="true">#</a> Metric Tool</h1><p>Along with IoTDB running, we hope to observe the status of IoTDB, so as to troubleshoot system problems or discover<br> potential system risks in time. A series of metrics that can <strong>reflect the operating status of the system</strong> are system<br> monitoring metrics.</p><h2 id="_1-when-to-use-metric-framework" tabindex="-1"><a class="header-anchor" href="#_1-when-to-use-metric-framework" aria-hidden="true">#</a> 1. When to use metric framework?</h2><p>Belows are some typical application scenarios</p><ol><li><p>System is running slowly</p><p>When system is running slowly, we always hope to have information about system's running status as detail as<br> possible, such as:</p><ul><li>JVM:Is there FGC? How long does it cost? How much does the memory usage decreased after GC? Are there lots of<br> threads?</li><li>System:Is the CPU usage too hi?Are there many disk IOs?</li><li>Connections:How many connections are there in the current time?</li><li>Interface:What is the TPS and latency of every interface?</li><li>Thread Pool:Are there many pending tasks?</li><li>Cache Hit Ratio</li></ul></li><li><p>No space left on device</p><p>When meet a "no space left on device" error, we really want to know which kind of data file had a rapid rise in the<br> past hours.</p></li><li><p>Is the system running in abnormal status</p><p>We could use the count of error logs、the alive status of nodes in cluster, etc, to determine whether the system is<br> running abnormally.</p></li></ol><h2 id="_2-who-will-use-metric-framework" tabindex="-1"><a class="header-anchor" href="#_2-who-will-use-metric-framework" aria-hidden="true">#</a> 2. Who will use metric framework?</h2><p>Any person cares about the system's status, including but not limited to RD, QA, SRE, DBA, can use the metrics to work<br> more efficiently.</p><h2 id="_3-what-is-metrics" tabindex="-1"><a class="header-anchor" href="#_3-what-is-metrics" aria-hidden="true">#</a> 3. What is metrics?</h2><h3 id="_3-1-key-concept" tabindex="-1"><a class="header-anchor" href="#_3-1-key-concept" aria-hidden="true">#</a> 3.1. Key Concept</h3><p>In IoTDB's metric module, each metrics is uniquely identified by <code>Metric Name</code> and <code>Tags</code>.</p><ul><li><code>Metric Name</code>: Metric type name, such as <code>logback_events</code> means log events.</li><li><code>Tags</code>: indicator classification, in the form of Key-Value pairs, each indicator can have 0 or more categories, common<br> Key-Value pairs: <ul><li><code>name = xxx</code>: The name of the monitored object, which is the description of <strong>business logic</strong>. For example, for a<br> monitoring item of type <code>Metric Name = entry_seconds_count</code>, the meaning of name refers to the monitored business<br> interface.</li><li><code>type = xxx</code>: Monitoring indicator type subdivision, which is a description of <strong>monitoring indicator</strong> itself.<br> For example, for monitoring items of type <code>Metric Name = point</code>, the meaning of type refers to the specific type<br> of monitoring points.</li><li><code>status = xxx</code>: The status of the monitored object is a description of <strong>business logic</strong>. For example, for<br> monitoring items of type <code>Metric Name = Task</code>, this parameter can be used to distinguish the status of the<br> monitored object.</li><li><code>user = xxx</code>: The relevant user of the monitored object is a description of <strong>business logic</strong>. For example, count<br> the total points written by the <code>root</code> user.</li><li>Customize according to the specific situation: For example, there is a level classification under<br> logback_events_total, which is used to indicate the number of logs under a specific level.</li></ul></li><li><code>Metric Level</code>: The level of metric managing level, The default startup level is <code>Core</code> level, the recommended startup<br> level is <code>Important level</code>, and the audit strictness is <code>Core > Important > Normal > All</code><ul><li><code>Core</code>: Core metrics of the system, used by the <strong>operation and maintenance personnel</strong>, which is related to the *<br><em>performance, stability, and security</em>* of the system, such as the status of the instance, the load of the system,<br> etc.</li><li><code>Important</code>: Important metrics of the module, which is used by <strong>operation and maintenance and testers</strong>, and is<br> directly related to <strong>the running status of each module</strong>, such as the number of merged files, execution status,<br> etc.</li><li><code>Normal</code>: Normal metrics of the module, used by <strong>developers</strong> to facilitate <strong>locating the module</strong> when problems<br> occur, such as specific key operation situations in the merger.</li><li><code>All</code>: All metrics of the module, used by <strong>module developers</strong>, often used when the problem is reproduced, so as<br> to solve the problem quickly.</li></ul></li></ul><h3 id="_3-2-external-data-format-for-metrics" tabindex="-1"><a class="header-anchor" href="#_3-2-external-data-format-for-metrics" aria-hidden="true">#</a> 3.2. External data format for metrics</h3><ul><li>IoTDB provides metrics in JMX, Prometheus and IoTDB formats: <ul><li>For JMX, metrics can be obtained through <code>org.apache.iotdb.metrics</code>.</li><li>For Prometheus, the value of the metrics can be obtained through the externally exposed port</li><li>External exposure in IoTDB mode: metrics can be obtained by executing IoTDB queries</li></ul></li></ul><h2 id="_4-the-detail-of-metrics" tabindex="-1"><a class="header-anchor" href="#_4-the-detail-of-metrics" aria-hidden="true">#</a> 4. The detail of metrics</h2><p>Currently, IoTDB provides metrics for some main modules externally, and with the development of new functions and system<br> optimization or refactoring, metrics will be added and updated synchronously.</p>',15),h=t("br",null,null,-1),l={href:"https://github.com/apache/iotdb/tree/master/metrics",target:"_blank",rel:"noopener noreferrer"},q=a('<h3 id="_4-1-core-level-metrics" tabindex="-1"><a class="header-anchor" href="#_4-1-core-level-metrics" aria-hidden="true">#</a> 4.1. Core level metrics</h3><p>Core-level metrics are enabled by default during system operation. The addition of each Core-level metrics needs to be<br> carefully evaluated. The current Core-level metrics are as follows:</p><h4 id="_4-1-1-cluster" tabindex="-1"><a class="header-anchor" href="#_4-1-1-cluster" aria-hidden="true">#</a> 4.1.1. Cluster</h4><table><thead><tr><th>Metric</th><th>Tags</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>up_time</td><td>-</td><td>AutoGauge</td><td>The time IoTDB has been running</td></tr><tr><td>config_node</td><td>name="total",status="Registered/Online/Unknown"</td><td>AutoGauge</td><td>The number of registered/online/unknown confignodes</td></tr><tr><td>data_node</td><td>name="total",status="Registered/Online/Unknown"</td><td>AutoGauge</td><td>The number of registered/online/unknown datanodes</td></tr><tr><td>cluster_node_leader_count</td><td>name="{ip}:{port}"</td><td>Gauge</td><td>The count of consensus group leader on each node</td></tr><tr><td>cluster_node_status</td><td>name="{ip}:{port}",type="ConfigNode/DataNode"</td><td>Gauge</td><td>The current node status, 0=Unkonwn 1=online</td></tr><tr><td>entry</td><td>name="{interface}"</td><td>Timer</td><td>The time consumed of thrift operations</td></tr><tr><td>mem</td><td>name="IoTConsensus"</td><td>AutoGauge</td><td>The memory usage of IoTConsensus, Unit: byte</td></tr></tbody></table><h4 id="_4-1-2-interface" tabindex="-1"><a class="header-anchor" href="#_4-1-2-interface" aria-hidden="true">#</a> 4.1.2. Interface</h4><table><thead><tr><th>Metric</th><th>Tags</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>thrift_connections</td><td>name="ConfigNodeRPC"</td><td>AutoGauge</td><td>The number of thrift internal connections in ConfigNode</td></tr><tr><td>thrift_connections</td><td>name="InternalRPC"</td><td>AutoGauge</td><td>The number of thrift internal connections in DataNode</td></tr><tr><td>thrift_connections</td><td>name="MPPDataExchangeRPC"</td><td>AutoGauge</td><td>The number of thrift internal connections in MPP</td></tr><tr><td>thrift_connections</td><td>name="ClientRPC"</td><td>AutoGauge</td><td>The number of thrift connections of Client</td></tr><tr><td>thrift_active_threads</td><td>name="ConfigNodeRPC-Service"</td><td>AutoGauge</td><td>The number of thrift active internal connections in ConfigNode</td></tr><tr><td>thrift_active_threads</td><td>name="DataNodeInternalRPC-Service"</td><td>AutoGauge</td><td>The number of thrift active internal connections in DataNode</td></tr><tr><td>thrift_active_threads</td><td>name="MPPDataExchangeRPC-Service"</td><td>AutoGauge</td><td>The number of thrift active internal connections in MPP</td></tr><tr><td>thrift_active_threads</td><td>name="ClientRPC-Service"</td><td>AutoGauge</td><td>The number of thrift active connections of client</td></tr><tr><td>session_idle_time</td><td>name = "sessionId"</td><td>Histogram</td><td>The distribution of idle time of different sessions</td></tr></tbody></table><h4 id="_4-1-2-node-statistics" tabindex="-1"><a class="header-anchor" href="#_4-1-2-node-statistics" aria-hidden="true">#</a> 4.1.2. Node Statistics</h4><table><thead><tr><th>Metric</th><th>Tags</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>quantity</td><td>name="database"</td><td>AutoGauge</td><td>The number of database</td></tr><tr><td>quantity</td><td>name="timeSeries"</td><td>AutoGauge</td><td>The number of timeseries</td></tr><tr><td>quantity</td><td>name="pointsIn"</td><td>Counter</td><td>The number of write points</td></tr><tr><td>points</td><td>database="{database}", type="flush"</td><td>Gauge</td><td>The point number of last flushed memtable</td></tr></tbody></table><h4 id="_4-1-3-cluster-tracing" tabindex="-1"><a class="header-anchor" href="#_4-1-3-cluster-tracing" aria-hidden="true">#</a> 4.1.3. Cluster Tracing</h4><table><thead><tr><th>Metric</th><th>Tags</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>performance_overview</td><td>interface="{interface}", type="{statement_type}"</td><td>Timer</td><td>The time consumed of operations in client</td></tr><tr><td>performance_overview_detail</td><td>stage="authority"</td><td>Timer</td><td>The time consumed on authority authentication</td></tr><tr><td>performance_overview_detail</td><td>stage="parser"</td><td>Timer</td><td>The time consumed on parsing statement</td></tr><tr><td>performance_overview_detail</td><td>stage="analyzer"</td><td>Timer</td><td>The time consumed on analyzing statement</td></tr><tr><td>performance_overview_detail</td><td>stage="planner"</td><td>Timer</td><td>The time consumed on planning</td></tr><tr><td>performance_overview_detail</td><td>stage="scheduler"</td><td>Timer</td><td>The time consumed on scheduling</td></tr><tr><td>performance_overview_schedule_detail</td><td>stage="local_scheduler"</td><td>Timer</td><td>The time consumed on local scheduler</td></tr><tr><td>performance_overview_schedule_detail</td><td>stage="remote_scheduler"</td><td>Timer</td><td>The time consumed on remote scheduler</td></tr><tr><td>performance_overview_local_detail</td><td>stage="schema_validate"</td><td>Timer</td><td>The time consumed on schema validation</td></tr><tr><td>performance_overview_local_detail</td><td>stage="trigger"</td><td>Timer</td><td>The time consumed on trigger</td></tr><tr><td>performance_overview_local_detail</td><td>stage="storage"</td><td>Timer</td><td>The time consumed on consensus</td></tr><tr><td>performance_overview_storage_detail</td><td>stage="engine"</td><td>Timer</td><td>The time consumed on write stateMachine</td></tr><tr><td>performance_overview_engine_detail</td><td>stage="lock"</td><td>Timer</td><td>The time consumed on grabbing lock in DataRegion</td></tr><tr><td>performance_overview_engine_detail</td><td>stage="create_memtable_block"</td><td>Timer</td><td>The time consumed on creating new memtable</td></tr><tr><td>performance_overview_engine_detail</td><td>stage="memory_block"</td><td>Timer</td><td>The time consumed on insert memory control</td></tr><tr><td>performance_overview_engine_detail</td><td>stage="wal"</td><td>Timer</td><td>The time consumed on writing wal</td></tr><tr><td>performance_overview_engine_detail</td><td>stage="memtable"</td><td>Timer</td><td>The time consumed on writing memtable</td></tr><tr><td>performance_overview_engine_detail</td><td>stage="last_cache"</td><td>Timer</td><td>The time consumed on updating last cache</td></tr></tbody></table><h4 id="_4-1-5-task-statistics" tabindex="-1"><a class="header-anchor" href="#_4-1-5-task-statistics" aria-hidden="true">#</a> 4.1.5. Task Statistics</h4><table><thead><tr><th>Metric</th><th>Tags</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>queue</td><td>name="compaction_inner", status="running/waiting"</td><td>Gauge</td><td>The number of inner compaction tasks</td></tr><tr><td>queue</td><td>name="compaction_cross", status="running/waiting"</td><td>Gauge</td><td>The number of cross compatcion tasks</td></tr><tr><td>queue</td><td>name="flush",status="running/waiting"</td><td>AutoGauge</td><td>The number of flush tasks</td></tr><tr><td>cost_task</td><td>name="inner_compaction/cross_compaction/flush"</td><td>Gauge</td><td>The time consumed of compaction tasks</td></tr></tbody></table><h4 id="_4-1-6-iotdb-process" tabindex="-1"><a class="header-anchor" href="#_4-1-6-iotdb-process" aria-hidden="true">#</a> 4.1.6. IoTDB process</h4><table><thead><tr><th>Metric</th><th>Tags</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>process_cpu_load</td><td>name="process"</td><td>AutoGauge</td><td>The current CPU usage of IoTDB process, Unit: %</td></tr><tr><td>process_cpu_time</td><td>name="process"</td><td>AutoGauge</td><td>The total CPU time occupied of IoTDB process, Unit: ns</td></tr><tr><td>process_max_mem</td><td>name="memory"</td><td>AutoGauge</td><td>The maximum available memory of IoTDB process</td></tr><tr><td>process_total_mem</td><td>name="memory"</td><td>AutoGauge</td><td>The current requested memory for IoTDB process</td></tr><tr><td>process_free_mem</td><td>name="memory"</td><td>AutoGauge</td><td>The free available memory of IoTDB process</td></tr></tbody></table><h4 id="_4-1-7-system" tabindex="-1"><a class="header-anchor" href="#_4-1-7-system" aria-hidden="true">#</a> 4.1.7. System</h4><table><thead><tr><th>Metric</th><th>Tags</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>sys_cpu_load</td><td>name="system"</td><td>AutoGauge</td><td>The current CPU usage of system, Unit: %</td></tr><tr><td>sys_cpu_cores</td><td>name="system"</td><td>Gauge</td><td>The available number of CPU cores</td></tr><tr><td>sys_total_physical_memory_size</td><td>name="memory"</td><td>Gauge</td><td>The maximum physical memory of system</td></tr><tr><td>sys_free_physical_memory_size</td><td>name="memory"</td><td>AutoGauge</td><td>The current available memory of system</td></tr><tr><td>sys_total_swap_space_size</td><td>name="memory"</td><td>AutoGauge</td><td>The maximum swap space of system</td></tr><tr><td>sys_free_swap_space_size</td><td>name="memory"</td><td>AutoGauge</td><td>The available swap space of system</td></tr><tr><td>sys_committed_vm_size</td><td>name="memory"</td><td>AutoGauge</td><td>The space of virtual memory available to running processes</td></tr><tr><td>sys_disk_total_space</td><td>name="disk"</td><td>AutoGauge</td><td>The total disk space</td></tr><tr><td>sys_disk_free_space</td><td>name="disk"</td><td>AutoGauge</td><td>The available disk space</td></tr></tbody></table><h4 id="_4-1-8-log" tabindex="-1"><a class="header-anchor" href="#_4-1-8-log" aria-hidden="true">#</a> 4.1.8. Log</h4><table><thead><tr><th>Metric</th><th>Tags</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>logback_events</td><td>level="trace/debug/info/warn/error"</td><td>Counter</td><td>The number of log events</td></tr></tbody></table><h4 id="_4-1-9-file" tabindex="-1"><a class="header-anchor" href="#_4-1-9-file" aria-hidden="true">#</a> 4.1.9. File</h4><table><thead><tr><th>Metric</th><th>Tags</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>file_size</td><td>name="wal"</td><td>AutoGauge</td><td>The size of WAL file, Unit: byte</td></tr><tr><td>file_size</td><td>name="seq"</td><td>AutoGauge</td><td>The size of sequence TsFile, Unit: byte</td></tr><tr><td>file_size</td><td>name="unseq"</td><td>AutoGauge</td><td>The size of unsequence TsFile, Unit: byte</td></tr><tr><td>file_size</td><td>name="inner-seq-temp"</td><td>AutoGauge</td><td>The size of inner sequence space compaction temporal file</td></tr><tr><td>file_size</td><td>name="inner-unseq-temp"</td><td>AutoGauge</td><td>The size of inner unsequence space compaction temporal file</td></tr><tr><td>file_size</td><td>name="cross-temp"</td><td>AutoGauge</td><td>The size of cross space compaction temoporal file</td></tr><tr><td>file_size</td><td>name="mods</td><td>AutoGauge</td><td>The size of modification files</td></tr><tr><td>file_count</td><td>name="wal"</td><td>AutoGauge</td><td>The count of WAL file</td></tr><tr><td>file_count</td><td>name="seq"</td><td>AutoGauge</td><td>The count of sequence TsFile</td></tr><tr><td>file_count</td><td>name="unseq"</td><td>AutoGauge</td><td>The count of unsequence TsFile</td></tr><tr><td>file_count</td><td>name="inner-seq-temp"</td><td>AutoGauge</td><td>The count of inner sequence space compaction temporal file</td></tr><tr><td>file_count</td><td>name="inner-unseq-temp"</td><td>AutoGauge</td><td>The count of inner unsequence space compaction temporal file</td></tr><tr><td>file_count</td><td>name="cross-temp"</td><td>AutoGauge</td><td>The count of cross space compaction temporal file</td></tr><tr><td>file_count</td><td>name="open_file_handlers"</td><td>AutoGauge</td><td>The count of open files of the IoTDB process, only supports Linux and MacOS</td></tr><tr><td>file_count</td><td>name="mods</td><td>AutoGauge</td><td>The count of modification file</td></tr></tbody></table><h4 id="_4-1-10-jvm-memory" tabindex="-1"><a class="header-anchor" href="#_4-1-10-jvm-memory" aria-hidden="true">#</a> 4.1.10. JVM Memory</h4>',21),g=t("table",null,[t("thead",null,[t("tr",null,[t("th",null,"Metric"),t("th",null,"Tags"),t("th",null,"Type"),t("th",null,"Description")])]),t("tbody",null,[t("tr",null,[t("td",null,"jvm_buffer_memory_used_bytes"),t("td",null,'id="direct/mapped"'),t("td",null,"AutoGauge"),t("td",null,"The used size of buffer")]),t("tr",null,[t("td",null,"jvm_buffer_total_capacity_bytes"),t("td",null,'id="direct/mapped"'),t("td",null,"AutoGauge"),t("td",null,"The max size of buffer")]),t("tr",null,[t("td",null,"jvm_buffer_count_buffers"),t("td",null,'id="direct/mapped"'),t("td",null,"AutoGauge"),t("td",null,"The number of buffer")]),t("tr",null,[t("td",null,"jvm_memory_committed_bytes"),t("td",{area:'heap/nonheap,id="xxx",'}),t("td",null,"AutoGauge"),t("td",null,"The committed memory of JVM")]),t("tr",null,[t("td",null,"jvm_memory_max_bytes"),t("td",{area:'heap/nonheap,id="xxx",'}),t("td",null,"AutoGauge"),t("td",null,"The max memory of JVM")]),t("tr",null,[t("td",null,"jvm_memory_used_bytes"),t("td",{area:'heap/nonheap,id="xxx",'}),t("td",null,"AutoGauge"),t("td",null,"The used memory of JVM")])])],-1),p=a('<h4 id="_4-1-11-jvm-thread" tabindex="-1"><a class="header-anchor" href="#_4-1-11-jvm-thread" aria-hidden="true">#</a> 4.1.11. JVM Thread</h4><table><thead><tr><th>Metric</th><th>Tags</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>jvm_threads_live_threads</td><td></td><td>AutoGauge</td><td>The number of live thread</td></tr><tr><td>jvm_threads_daemon_threads</td><td></td><td>AutoGauge</td><td>The number of daemon thread</td></tr><tr><td>jvm_threads_peak_threads</td><td></td><td>AutoGauge</td><td>The number of peak thread</td></tr><tr><td>jvm_threads_states_threads</td><td>state="runnable/blocked/waiting/timed-waiting/new/terminated"</td><td>AutoGauge</td><td>The number of thread in different states</td></tr></tbody></table><h4 id="_4-1-12-jvm-gc" tabindex="-1"><a class="header-anchor" href="#_4-1-12-jvm-gc" aria-hidden="true">#</a> 4.1.12. JVM GC</h4><table><thead><tr><th>Metric</th><th>Tags</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>jvm_gc_pause</td><td>action="end of major GC/end of minor GC",cause="xxxx"</td><td>Timer</td><td>The number and time consumed of Young GC/Full Gc caused by different reason</td></tr><tr><td></td><td></td><td></td><td></td></tr><tr><td>jvm_gc_concurrent_phase_time</td><td>action="{action}",cause="{cause}"</td><td>Timer</td><td>The number and time consumed of Young GC/Full Gc caused by different</td></tr><tr><td></td><td></td><td></td><td></td></tr><tr><td>jvm_gc_max_data_size_bytes</td><td></td><td>AutoGauge</td><td>The historical maximum value of old memory</td></tr><tr><td>jvm_gc_live_data_size_bytes</td><td></td><td>AutoGauge</td><td>The usage of old memory</td></tr><tr><td>jvm_gc_memory_promoted_bytes</td><td></td><td>Counter</td><td>The accumulative value of positive memory growth of old memory</td></tr><tr><td>jvm_gc_memory_allocated_bytes</td><td></td><td>Counter</td><td>The accumulative value of positive memory growth of allocated memory</td></tr></tbody></table><h3 id="_4-2-important-level-metrics" tabindex="-1"><a class="header-anchor" href="#_4-2-important-level-metrics" aria-hidden="true">#</a> 4.2. Important level metrics</h3><h4 id="_4-2-1-node" tabindex="-1"><a class="header-anchor" href="#_4-2-1-node" aria-hidden="true">#</a> 4.2.1. Node</h4><table><thead><tr><th>Metric</th><th>Tags</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>region</td><td>name="total",type="SchemaRegion"</td><td>AutoGauge</td><td>The total number of SchemaRegion in PartitionTable</td></tr><tr><td>region</td><td>name="total",type="DataRegion"</td><td>AutoGauge</td><td>The total number of DataRegion in PartitionTable</td></tr><tr><td>region</td><td>name="{ip}:{port}",type="SchemaRegion"</td><td>Gauge</td><td>The number of SchemaRegion in PartitionTable of specific node</td></tr><tr><td>region</td><td>name="{ip}:{port}",type="DataRegion"</td><td>Gauge</td><td>The number of DataRegion in PartitionTable of specific node</td></tr></tbody></table><h4 id="_4-2-2-ratisconsensus" tabindex="-1"><a class="header-anchor" href="#_4-2-2-ratisconsensus" aria-hidden="true">#</a> 4.2.2. RatisConsensus</h4><table><thead><tr><th>Metric</th><th>Tags</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>ratis_consensus_write</td><td>stage="writeLocally"</td><td>Timer</td><td>The time cost of writing locally stage</td></tr><tr><td>ratis_consensus_write</td><td>stage="writeRemotely"</td><td>Timer</td><td>The time cost of writing remotely stage</td></tr><tr><td>ratis_consensus_write</td><td>stage="writeStateMachine"</td><td>Timer</td><td>The time cost of writing state machine stage</td></tr><tr><td>ratis_server</td><td>clientWriteRequest</td><td>Timer</td><td>Time taken to process write requests from client</td></tr><tr><td>ratis_server</td><td>followerAppendEntryLatency</td><td>Timer</td><td>Time taken for followers to append log entries</td></tr><tr><td>ratis_log_worker</td><td>appendEntryLatency</td><td>Timer</td><td>Total time taken to append a raft log entry</td></tr><tr><td>ratis_log_worker</td><td>queueingDelay</td><td>Timer</td><td>Time taken for a Raft log operation to get into the queue after being requested, waiting queue to be non-full</td></tr><tr><td>ratis_log_worker</td><td>enqueuedTime</td><td>Timer</td><td>Time spent by a Raft log operation in the queue</td></tr><tr><td>ratis_log_worker</td><td>writelogExecutionTime</td><td>Timer</td><td>Time taken for a Raft log write operation to complete execution</td></tr><tr><td>ratis_log_worker</td><td>flushTime</td><td>Timer</td><td>Time taken to flush log</td></tr><tr><td>ratis_log_worker</td><td>closedSegmentsSizeInBytes</td><td>Gauge</td><td>Size of closed raft log segments in bytes</td></tr><tr><td>ratis_log_worker</td><td>openSegmentSizeInBytes</td><td>Gauge</td><td>Size of open raft log segment in bytes</td></tr></tbody></table><h4 id="_4-2-3-iotconsensus" tabindex="-1"><a class="header-anchor" href="#_4-2-3-iotconsensus" aria-hidden="true">#</a> 4.2.3. IoTConsensus</h4><table><thead><tr><th>Metric</th><th>Tags</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>mutli_leader</td><td>name="logDispatcher-{IP}:{Port}", region="{region}", type="currentSyncIndex"</td><td>AutoGauge</td><td>The sync index of synchronization thread in replica group</td></tr><tr><td>mutli_leader</td><td>name="logDispatcher-{IP}:{Port}", region="{region}", type="cachedRequestInMemoryQueue"</td><td>AutoGauge</td><td>The size of cache requests of synchronization thread in replica group</td></tr><tr><td>mutli_leader</td><td>name="IoTConsensusServerImpl", region="{region}", type="searchIndex"</td><td>AutoGauge</td><td>The write process of main process in replica group</td></tr><tr><td>mutli_leader</td><td>name="IoTConsensusServerImpl", region="{region}", type="safeIndex"</td><td>AutoGauge</td><td>The sync index of replica group</td></tr><tr><td>mutli_leader</td><td>name="IoTConsensusServerImpl", region="{region}", type="syncLag"</td><td>AutoGauge</td><td>The sync lag of replica group</td></tr><tr><td>mutli_leader</td><td>name="IoTConsensusServerImpl", region="{region}", type="LogEntriesFromWAL"</td><td>AutoGauge</td><td>The number of logEntries from wal in Batch</td></tr><tr><td>mutli_leader</td><td>name="IoTConsensusServerImpl", region="{region}", type="LogEntriesFromQueue"</td><td>AutoGauge</td><td>The number of logEntries from queue in Batch</td></tr><tr><td>stage</td><td>name="iot_consensus", region="{region}", type="getStateMachineLock"</td><td>Histogram</td><td>The time consumed to get statemachine lock in main process</td></tr><tr><td>stage</td><td>name="iot_consensus", region="{region}", type="checkingBeforeWrite"</td><td>Histogram</td><td>The time consumed to precheck before write in main process</td></tr><tr><td>stage</td><td>name="iot_consensus", region="{region}", type="writeStateMachine"</td><td>Histogram</td><td>The time consumed to write statemachine in main process</td></tr><tr><td>stage</td><td>name="iot_consensus", region="{region}", type="offerRequestToQueue"</td><td>Histogram</td><td>The time consumed to try to offer request to queue in main process</td></tr><tr><td>stage</td><td>name="iot_consensus", region="{region}", type="consensusWrite"</td><td>Histogram</td><td>The time consumed to the whole write in main process</td></tr><tr><td>stage</td><td>name="iot_consensus", region="{region}", type="constructBatch"</td><td>Histogram</td><td>The time consumed to construct batch in synchronization thread</td></tr><tr><td>stage</td><td>name="iot_consensus", region="{region}", type="syncLogTimePerRequest"</td><td>Histogram</td><td>The time consumed to sync log in asynchronous callback process</td></tr></tbody></table><h4 id="_4-2-4-cache" tabindex="-1"><a class="header-anchor" href="#_4-2-4-cache" aria-hidden="true">#</a> 4.2.4. Cache</h4><table><thead><tr><th>Metric</th><th>Tags</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>cache_hit</td><td>name="chunk"</td><td>AutoGauge</td><td>The cache hit ratio of ChunkCache, Unit: %</td></tr><tr><td>cache_hit</td><td>name="schema"</td><td>AutoGauge</td><td>The cache hit ratio of SchemaCache, Unit: %</td></tr><tr><td>cache_hit</td><td>name="timeSeriesMeta"</td><td>AutoGauge</td><td>The cache hit ratio of TimeseriesMetadataCache, Unit: %</td></tr><tr><td>cache_hit</td><td>name="bloomFilter"</td><td>AutoGauge</td><td>The interception rate of bloomFilter in TimeseriesMetadataCache, Unit: %</td></tr><tr><td>cache</td><td>name="Database", type="hit"</td><td>Counter</td><td>The hit number of Database Cache</td></tr><tr><td>cache</td><td>name="Database", type="all"</td><td>Counter</td><td>The access number of Database Cache</td></tr><tr><td>cache</td><td>name="SchemaPartition", type="hit"</td><td>Counter</td><td>The hit number of SchemaPartition Cache</td></tr><tr><td>cache</td><td>name="SchemaPartition", type="all"</td><td>Counter</td><td>The access number of SchemaPartition Cache</td></tr><tr><td>cache</td><td>name="DataPartition", type="hit"</td><td>Counter</td><td>The hit number of DataPartition Cache</td></tr><tr><td>cache</td><td>name="DataPartition", type="all"</td><td>Counter</td><td>The access number of DataPartition Cache</td></tr><tr><td>cache</td><td>name="SchemaCache", type="hit"</td><td>Counter</td><td>The hit number of Schema Cache</td></tr><tr><td>cache</td><td>name="SchemaCache", type="all"</td><td>Counter</td><td>The access number of Schema Cache</td></tr></tbody></table><h4 id="_4-2-5-memory" tabindex="-1"><a class="header-anchor" href="#_4-2-5-memory" aria-hidden="true">#</a> 4.2.5. Memory</h4><table><thead><tr><th>Metric</th><th>Tags</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>mem</td><td>name="database_{name}"</td><td>AutoGauge</td><td>The memory usage of DataRegion in DataNode, Unit: byte</td></tr><tr><td>mem</td><td>name="chunkMetaData_{name}"</td><td>AutoGauge</td><td>The memory usage of chunkMetaData when writting TsFile, Unit: byte</td></tr><tr><td>mem</td><td>name="IoTConsensus"</td><td>AutoGauge</td><td>The memory usage of IoTConsensus, Unit: byte</td></tr><tr><td>mem</td><td>name="IoTConsensusQueue"</td><td>AutoGauge</td><td>The memory usage of IoTConsensus Queue, Unit: byte</td></tr><tr><td>mem</td><td>name="IoTConsensusSync"</td><td>AutoGauge</td><td>The memory usage of IoTConsensus SyncStatus, Unit: byte</td></tr><tr><td>mem</td><td>name="schema_region_total_usage"</td><td>AutoGauge</td><td>The memory usage of all SchemaRegion, Unit: byte</td></tr></tbody></table><h4 id="_4-2-6-compaction" tabindex="-1"><a class="header-anchor" href="#_4-2-6-compaction" aria-hidden="true">#</a> 4.2.6. Compaction</h4><table><thead><tr><th>Metric</th><th>Tags</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>data_written</td><td>name="compaction", type="aligned/not-aligned/total"</td><td>Counter</td><td>The written size of compaction</td></tr><tr><td>data_read</td><td>name="compaction"</td><td>Counter</td><td>The read size of compaction</td></tr><tr><td>compaction_task_count</td><td>name = "inner_compaction", type="sequence"</td><td>Counter</td><td>The number of inner sequence compction</td></tr><tr><td>compaction_task_count</td><td>name = "inner_compaction", type="unsequence"</td><td>Counter</td><td>The number of inner sequence compction</td></tr><tr><td>compaction_task_count</td><td>name = "cross_compaction", type="cross"</td><td>Counter</td><td>The number of corss compction</td></tr></tbody></table><h4 id="_4-2-7-iotdb-process" tabindex="-1"><a class="header-anchor" href="#_4-2-7-iotdb-process" aria-hidden="true">#</a> 4.2.7. IoTDB Process</h4><table><thead><tr><th>Metric</th><th>Tags</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>process_used_mem</td><td>name="memory"</td><td>AutoGauge</td><td>The used memory of IoTDB process</td></tr><tr><td>process_mem_ratio</td><td>name="memory"</td><td>AutoGauge</td><td>The used memory ratio of IoTDB process</td></tr><tr><td>process_threads_count</td><td>name="process"</td><td>AutoGauge</td><td>The number of thread of IoTDB process</td></tr><tr><td>process_status</td><td>name="process"</td><td>AutoGauge</td><td>The status of IoTDB process, 1=live, 0=dead</td></tr></tbody></table><h4 id="_4-2-8-jvm-class" tabindex="-1"><a class="header-anchor" href="#_4-2-8-jvm-class" aria-hidden="true">#</a> 4.2.8. JVM Class</h4><table><thead><tr><th>Metric</th><th>Tags</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>jvm_classes_unloaded_classes</td><td></td><td>AutoGauge</td><td>The number of unloaded class</td></tr><tr><td>jvm_classes_loaded_classes</td><td></td><td>AutoGauge</td><td>The number of loaded class</td></tr></tbody></table><h4 id="_4-2-9-jvm-compilation" tabindex="-1"><a class="header-anchor" href="#_4-2-9-jvm-compilation" aria-hidden="true">#</a> 4.2.9. JVM Compilation</h4>',22),_=t("table",null,[t("thead",null,[t("tr",null,[t("th",null,"Metric"),t("th",null,"Tags"),t("th",null,"Type"),t("th",null,"Description")])]),t("tbody",null,[t("tr",null,[t("td",null,"jvm_compilation_time_ms"),t("td",{compiler:"HotSpot 64-Bit Tiered Compilers,"}),t("td",null,"AutoGauge"),t("td",null,"The time consumed in compilation")])])],-1),f=a(`<h4 id="_4-2-10-query-planning" tabindex="-1"><a class="header-anchor" href="#_4-2-10-query-planning" aria-hidden="true">#</a> 4.2.10. Query Planning</h4><table><thead><tr><th>Metric</th><th>Tags</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>query_plan_cost</td><td>stage="analyzer"</td><td>Timer</td><td>The query statement analysis time-consuming</td></tr><tr><td>query_plan_cost</td><td>stage="logical_planner"</td><td>Timer</td><td>The query logical plan planning time-consuming</td></tr><tr><td>query_plan_cost</td><td>stage="distribution_planner"</td><td>Timer</td><td>The query distribution plan planning time-consuming</td></tr><tr><td>query_plan_cost</td><td>stage="partition_fetcher"</td><td>Timer</td><td>The partition information fetching time-consuming</td></tr><tr><td>query_plan_cost</td><td>stage="schema_fetcher"</td><td>Timer</td><td>The schema information fetching time-consuming</td></tr></tbody></table><h4 id="_4-2-11-plan-dispatcher" tabindex="-1"><a class="header-anchor" href="#_4-2-11-plan-dispatcher" aria-hidden="true">#</a> 4.2.11. Plan Dispatcher</h4><table><thead><tr><th>Metric</th><th>Tags</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>dispatcher</td><td>stage="wait_for_dispatch"</td><td>Timer</td><td>The distribution plan dispatcher time-consuming</td></tr><tr><td>dispatcher</td><td>stage="dispatch_read"</td><td>Timer</td><td>The distribution plan dispatcher time-consuming (only query)</td></tr></tbody></table><h4 id="_4-2-12-query-resource" tabindex="-1"><a class="header-anchor" href="#_4-2-12-query-resource" aria-hidden="true">#</a> 4.2.12. Query Resource</h4><table><thead><tr><th>Metric</th><th>Tags</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>query_resource</td><td>type="sequence_tsfile"</td><td>Rate</td><td>The access frequency of sequence tsfiles</td></tr><tr><td>query_resource</td><td>type="unsequence_tsfile"</td><td>Rate</td><td>The access frequency of unsequence tsfiles</td></tr><tr><td>query_resource</td><td>type="flushing_memtable"</td><td>Rate</td><td>The access frequency of flushing memtables</td></tr><tr><td>query_resource</td><td>type="working_memtable"</td><td>Rate</td><td>The access frequency of working memtables</td></tr></tbody></table><h4 id="_4-2-13-data-exchange" tabindex="-1"><a class="header-anchor" href="#_4-2-13-data-exchange" aria-hidden="true">#</a> 4.2.13. Data Exchange</h4><table><thead><tr><th>Metric</th><th>Tags</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>data_exchange_cost</td><td>operation="source_handle_get_tsblock", type="local/remote"</td><td>Timer</td><td>The time-consuming that source handles receive TsBlock</td></tr><tr><td>data_exchange_cost</td><td>operation="source_handle_deserialize_tsblock", type="local/remote"</td><td>Timer</td><td>The time-consuming that source handles deserialize TsBlock</td></tr><tr><td>data_exchange_cost</td><td>operation="sink_handle_send_tsblock", type="local/remote"</td><td>Timer</td><td>The time-consuming that sink handles send TsBlock</td></tr><tr><td>data_exchange_cost</td><td>operation="send_new_data_block_event_task", type="server/caller"</td><td>Timer</td><td>The RPC time-consuming that sink handles send TsBlock</td></tr><tr><td>data_exchange_cost</td><td>operation="get_data_block_task", type="server/caller"</td><td>Timer</td><td>The RPC time-consuming that source handles receive TsBlock</td></tr><tr><td>data_exchange_cost</td><td>operation="on_acknowledge_data_block_event_task", type="server/caller"</td><td>Timer</td><td>The RPC time-consuming that source handles ack received TsBlock</td></tr><tr><td>data_exchange_count</td><td>name="send_new_data_block_num", type="server/caller"</td><td>Histogram</td><td>The number of sent TsBlocks by sink handles</td></tr><tr><td>data_exchange_count</td><td>name="get_data_block_num", type="server/caller"</td><td>Histogram</td><td>The number of received TsBlocks by source handles</td></tr><tr><td>data_exchange_count</td><td>name="on_acknowledge_data_block_num", type="server/caller"</td><td>Histogram</td><td>The number of acknowledged TsBlocks by source handles</td></tr><tr><td>data_exchange_count</td><td>name="shuffle_sink_handle_size"</td><td>AutoGauge</td><td>The number of shuffle sink handle</td></tr><tr><td>data_exchange_count</td><td>name="source_handle_size"</td><td>AutoGauge</td><td>The number of source handle</td></tr></tbody></table><h4 id="_4-2-14-query-task-schedule" tabindex="-1"><a class="header-anchor" href="#_4-2-14-query-task-schedule" aria-hidden="true">#</a> 4.2.14. Query Task Schedule</h4><table><thead><tr><th>Metric</th><th>Tags</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>driver_scheduler</td><td>name="ready_queued_time"</td><td>Timer</td><td>The queuing time of ready queue</td></tr><tr><td>driver_scheduler</td><td>name="block_queued_time"</td><td>Timer</td><td>The queuing time of blocking queue</td></tr><tr><td>driver_scheduler</td><td>name="ready_queue_task_count"</td><td>AutoGauge</td><td>The number of tasks queued in the ready queue</td></tr><tr><td>driver_scheduler</td><td>name="block_queued_task_count"</td><td>AutoGauge</td><td>The number of tasks queued in the blocking queue</td></tr><tr><td>driver_scheduler</td><td>name="timeout_queued_task_count"</td><td>AutoGauge</td><td>The number of tasks queued in the timeout queue</td></tr><tr><td>driver_scheduler</td><td>name="query_map_size"</td><td>AutoGauge</td><td>The number of queries recorded in DriverScheduler</td></tr></tbody></table><h4 id="_4-2-15-query-execution" tabindex="-1"><a class="header-anchor" href="#_4-2-15-query-execution" aria-hidden="true">#</a> 4.2.15. Query Execution</h4><table><thead><tr><th>Metric</th><th>Tags</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>query_execution</td><td>stage="local_execution_planner"</td><td>Timer</td><td>The time-consuming of operator tree construction</td></tr><tr><td>query_execution</td><td>stage="query_resource_init"</td><td>Timer</td><td>The time-consuming of query resource initialization</td></tr><tr><td>query_execution</td><td>stage="get_query_resource_from_mem"</td><td>Timer</td><td>The time-consuming of query resource memory query and construction</td></tr><tr><td>query_execution</td><td>stage="driver_internal_process"</td><td>Timer</td><td>The time-consuming of driver execution</td></tr><tr><td>query_execution</td><td>stage="wait_for_result"</td><td>Timer</td><td>The time-consuming of getting query result from result handle</td></tr><tr><td>operator_execution_cost</td><td>name="{operator_name}"</td><td>Timer</td><td>The operator execution time</td></tr><tr><td>operator_execution_count</td><td>name="{operator_name}"</td><td>Counter</td><td>The number of operator calls (counted by the number of next method calls)</td></tr><tr><td>aggregation</td><td>from="raw_data"</td><td>Timer</td><td>The time-consuming of performing an aggregation calculation from a batch of raw data</td></tr><tr><td>aggregation</td><td>from="statistics"</td><td>Timer</td><td>The time-consuming of updating an aggregated value with statistics</td></tr><tr><td>series_scan_cost</td><td>stage="load_timeseries_metadata", type="aligned/non_aligned", from="mem/disk"</td><td>Timer</td><td>The time-consuming of loading TimeseriesMetadata</td></tr><tr><td>series_scan_cost</td><td>stage="read_timeseries_metadata", type="", from="cache/file"</td><td>Timer</td><td>The time-consuming of reading TimeseriesMetadata of a tsfile</td></tr><tr><td>series_scan_cost</td><td>stage="timeseries_metadata_modification", type="aligned/non_aligned", from="null"</td><td>Timer</td><td>The time-consuming of filtering TimeseriesMetadata by mods</td></tr><tr><td>series_scan_cost</td><td>stage="load_chunk_metadata_list", type="aligned/non_aligned", from="mem/disk"</td><td>Timer</td><td>The time-consuming of loading ChunkMetadata list</td></tr><tr><td>series_scan_cost</td><td>stage="chunk_metadata_modification", type="aligned/non_aligned", from="mem/disk"</td><td>Timer</td><td>The time-consuming of filtering ChunkMetadata by mods</td></tr><tr><td>series_scan_cost</td><td>stage="chunk_metadata_filter", type="aligned/non_aligned", from="mem/disk"</td><td>Timer</td><td>The time-consuming of filtering ChunkMetadata by query filter</td></tr><tr><td>series_scan_cost</td><td>stage="construct_chunk_reader", type="aligned/non_aligned", from="mem/disk"</td><td>Timer</td><td>The time-consuming of constructing ChunkReader</td></tr><tr><td>series_scan_cost</td><td>stage="read_chunk", type="", from="cache/file"</td><td>Timer</td><td>The time-consuming of reading Chunk</td></tr><tr><td>series_scan_cost</td><td>stage="init_chunk_reader", type="aligned/non_aligned", from="mem/disk"</td><td>Timer</td><td>The time-consuming of initializing ChunkReader (constructing PageReader)</td></tr><tr><td>series_scan_cost</td><td>stage="build_tsblock_from_page_reader", type="aligned/non_aligned", from="mem/disk"</td><td>Timer</td><td>The time-consuming of constructing Tsblock from PageReader</td></tr><tr><td>series_scan_cost</td><td>stage="build_tsblock_from_merge_reader", type="aligned/non_aligned", from="null"</td><td>Timer</td><td>The time-consuming of constructing Tsblock from MergeReader (handling overlapping data)</td></tr></tbody></table><h4 id="_4-2-16-coordinator" tabindex="-1"><a class="header-anchor" href="#_4-2-16-coordinator" aria-hidden="true">#</a> 4.2.16. Coordinator</h4><table><thead><tr><th>Metric</th><th>Tags</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>coordinator</td><td>name="query_execution_map_size"</td><td>AutoGauge</td><td>The number of queries recorded on current DataNode</td></tr></tbody></table><h4 id="_4-2-17-fragmentinstancemanager" tabindex="-1"><a class="header-anchor" href="#_4-2-17-fragmentinstancemanager" aria-hidden="true">#</a> 4.2.17. FragmentInstanceManager</h4><table><thead><tr><th>Metric</th><th>Tags</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>fragment_instance_manager</td><td>name="instance_context_size"</td><td>AutoGauge</td><td>The number of query fragment context on current DataNode</td></tr><tr><td>fragment_instance_manager</td><td>name="instance_execution_size"</td><td>AutoGauge</td><td>The number of query fragment on current DataNode</td></tr></tbody></table><h4 id="_4-2-18-memorypool" tabindex="-1"><a class="header-anchor" href="#_4-2-18-memorypool" aria-hidden="true">#</a> 4.2.18. MemoryPool</h4><table><thead><tr><th>Metric</th><th>Tags</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>memory_pool</td><td>name="max_bytes"</td><td>Gauge</td><td>Maximum memory for data exchange</td></tr><tr><td>memory_pool</td><td>name="remaining_bytes"</td><td>AutoGauge</td><td>Remaining memory for data exchange</td></tr><tr><td>memory_pool</td><td>name="query_memory_reservation_size"</td><td>AutoGauge</td><td>Size of query reserved memory</td></tr><tr><td>memory_pool</td><td>name="memory_reservation_size"</td><td>AutoGauge</td><td>Size of sink handle and source handle trying to reserve memory</td></tr></tbody></table><h4 id="_4-2-19-localexecutionplanner" tabindex="-1"><a class="header-anchor" href="#_4-2-19-localexecutionplanner" aria-hidden="true">#</a> 4.2.19. LocalExecutionPlanner</h4><table><thead><tr><th>Metric</th><th>Tags</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>local_execution_planner</td><td>name="free_memory_for_operators"</td><td>AutoGauge</td><td>The remaining memory can allocate for query fragments on current DataNode</td></tr></tbody></table><h4 id="_4-2-20-schema-engine" tabindex="-1"><a class="header-anchor" href="#_4-2-20-schema-engine" aria-hidden="true">#</a> 4.2.20. Schema Engine</h4><table><thead><tr><th>Metric</th><th>Tags</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>schema_engine</td><td>name="schema_region_total_mem_usage"</td><td>AutoGauge</td><td>Memory usgae for all SchemaRegion</td></tr><tr><td>schema_engine</td><td>name="schema_region_mem_capacity"</td><td>AutoGauge</td><td>Memory capacity for all SchemaRegion</td></tr><tr><td>schema_engine</td><td>name="schema_engine_mode"</td><td>Gauge</td><td>Mode of SchemaEngine</td></tr><tr><td>schema_engine</td><td>name="schema_region_consensus"</td><td>Gauge</td><td>Consensus protocol of SchemaRegion</td></tr><tr><td>schema_engine</td><td>name="schema_region_number"</td><td>AutoGauge</td><td>Number of SchemaRegion</td></tr><tr><td>quantity</td><td>name="template_series_cnt"</td><td>AutoGauge</td><td>Number of template series</td></tr><tr><td>schema_region</td><td>name="schema_region_mem_usage", region="SchemaRegion[{regionId}]"</td><td>AutoGauge</td><td>Memory usgae for each SchemaRegion</td></tr><tr><td>schema_region</td><td>name="schema_region_series_cnt", region="SchemaRegion[{regionId}]"</td><td>AutoGauge</td><td>Number of total timeseries for each SchemaRegion</td></tr><tr><td>schema_region</td><td>name="activated_template_cnt", region="SchemaRegion[{regionId}]"</td><td>AutoGauge</td><td>Number of Activated template for each SchemaRegion</td></tr><tr><td>schema_region</td><td>name="template_series_cnt", region="SchemaRegion[{regionId}]"</td><td>AutoGauge</td><td>Number of template series for each SchemaRegion</td></tr></tbody></table><h4 id="_4-2-21-write-performance" tabindex="-1"><a class="header-anchor" href="#_4-2-21-write-performance" aria-hidden="true">#</a> 4.2.21. Write Performance</h4><table><thead><tr><th>Metric</th><th style="text-align:left;">Tags</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>wal_node_num</td><td style="text-align:left;">name="wal_nodes_num"</td><td>AutoGauge</td><td>Num of WALNode</td></tr><tr><td>wal_cost</td><td style="text-align:left;">stage="make_checkpoint" type="<checkpoint_type>"</td><td>Timer</td><td>Time cost of make checkpoints for all checkpoint type</td></tr><tr><td>wal_cost</td><td style="text-align:left;">type="serialize_one_wal_info_entry"</td><td>Timer</td><td>Time cost of serialize one WALInfoEntry</td></tr><tr><td>wal_cost</td><td style="text-align:left;">stage="sync_wal_buffer" type="<force_flag>"</td><td>Timer</td><td>Time cost of sync WALBuffer</td></tr><tr><td>wal_buffer</td><td style="text-align:left;">name="used_ratio"</td><td>Histogram</td><td>Used ratio of WALBuffer</td></tr><tr><td>wal_buffer</td><td style="text-align:left;">name="entries_count"</td><td>Histogram</td><td>Entries Count of WALBuffer</td></tr><tr><td>wal_cost</td><td style="text-align:left;">stage="serialize_wal_entry" type="serialize_wal_entry_total"</td><td>Timer</td><td>Time cost of WALBuffer serialize task</td></tr><tr><td>wal_node_info</td><td style="text-align:left;">name="effective_info_ratio" type="<wal_node_id>"</td><td>Histogram</td><td>Effective info ratio of WALNode</td></tr><tr><td>wal_node_info</td><td style="text-align:left;">name="oldest_mem_table_ram_when_cause_snapshot" type="<wal_node_id>"</td><td>Histogram</td><td>Ram of oldest memTable when cause snapshot</td></tr><tr><td>wal_node_info</td><td style="text-align:left;">name="oldest_mem_table_ram_when_cause_flush" type="<wal_node_id>"</td><td>Histogram</td><td>Ram of oldest memTable when cause flush</td></tr><tr><td>flush_sub_task_cost</td><td style="text-align:left;">type="sort_task"</td><td>Timer</td><td>Time cost of sort series in flush sort stage</td></tr><tr><td>flush_sub_task_cost</td><td style="text-align:left;">type="encoding_task"</td><td>Timer</td><td>Time cost of sub encoding task in flush encoding stage</td></tr><tr><td>flush_sub_task_cost</td><td style="text-align:left;">type="io_task"</td><td>Timer</td><td>Time cost of sub io task in flush io stage</td></tr><tr><td>flush_cost</td><td style="text-align:left;">stage="write_plan_indices"</td><td>Timer</td><td>Time cost of write plan indices</td></tr><tr><td>flush_cost</td><td style="text-align:left;">stage="sort"</td><td>Timer</td><td>Time cost of flush sort stage</td></tr><tr><td>flush_cost</td><td style="text-align:left;">stage="encoding"</td><td>Timer</td><td>Time cost of flush encoding stage</td></tr><tr><td>flush_cost</td><td style="text-align:left;">stage="io"</td><td>Timer</td><td>Time cost of flush io stage</td></tr><tr><td>pending_flush_task</td><td style="text-align:left;">type="pending_task_num"</td><td>AutoGauge</td><td>Num of pending flush task num</td></tr><tr><td>pending_flush_task</td><td style="text-align:left;">type="pending_sub_task_num"</td><td>AutoGauge</td><td>Num of pending flush sub task num</td></tr><tr><td>flushing_mem_table_status</td><td style="text-align:left;">name="mem_table_size" region="DataRegion[<data_region_id>]"</td><td>Histogram</td><td>Size of flushing memTable</td></tr><tr><td>flushing_mem_table_status</td><td style="text-align:left;">name="total_point_num" region="DataRegion[<data_region_id>]"</td><td>Histogram</td><td>Point num of flushing memTable</td></tr><tr><td>flushing_mem_table_status</td><td style="text-align:left;">name="series_num" region="DataRegion[<data_region_id>]"</td><td>Histogram</td><td>Series num of flushing memTable</td></tr><tr><td>flushing_mem_table_status</td><td style="text-align:left;">name="avg_series_points_num" region="DataRegion[<data_region_id>]"</td><td>Histogram</td><td>Point num of flushing memChunk</td></tr><tr><td>flushing_mem_table_status</td><td style="text-align:left;">name="tsfile_compression_ratio" region="DataRegion[<data_region_id>]"</td><td>Histogram</td><td>TsFile Compression ratio of flushing memTable</td></tr><tr><td>flushing_mem_table_status</td><td style="text-align:left;">name="flush_tsfile_size" region="DataRegion[<data_region_id>]"</td><td>Histogram</td><td>TsFile size of flushing memTable</td></tr><tr><td>data_region_mem_cost</td><td style="text-align:left;">name="data_region_mem_cost"</td><td>AutoGauge</td><td>Mem cost of data regions</td></tr></tbody></table><h3 id="_4-3-normal-level-metrics" tabindex="-1"><a class="header-anchor" href="#_4-3-normal-level-metrics" aria-hidden="true">#</a> 4.3. Normal level Metrics</h3><h4 id="_4-3-1-cluster" tabindex="-1"><a class="header-anchor" href="#_4-3-1-cluster" aria-hidden="true">#</a> 4.3.1. Cluster</h4><table><thead><tr><th>Metric</th><th>Tags</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>region</td><td>name="{DatabaseName}",type="SchemaRegion/DataRegion"</td><td>AutoGauge</td><td>The number of DataRegion/SchemaRegion of database in specific node</td></tr><tr><td>slot</td><td>name="{DatabaseName}",type="schemaSlotNumber/dataSlotNumber"</td><td>AutoGauge</td><td>The number of DataSlot/SchemaSlot of database in specific node</td></tr></tbody></table><h3 id="_4-4-all-metric" tabindex="-1"><a class="header-anchor" href="#_4-4-all-metric" aria-hidden="true">#</a> 4.4. All Metric</h3><p>Currently there is no All level metrics, and it will continue to be added in the future.</p><h2 id="_5-how-to-get-these-metrics" tabindex="-1"><a class="header-anchor" href="#_5-how-to-get-these-metrics" aria-hidden="true">#</a> 5. How to get these metrics?</h2><p>The relevant configuration of the metric module is in <code>conf/iotdb-{datanode/confignode}.properties</code>, and all<br> configuration items support hot loading through the <code>load configuration</code> command.</p><h3 id="_5-1-jmx" tabindex="-1"><a class="header-anchor" href="#_5-1-jmx" aria-hidden="true">#</a> 5.1. JMX</h3><p>For metrics exposed externally using JMX, you can view them through Jconsole. After entering the Jconsole monitoring<br> page, you will first see an overview of various running conditions of IoTDB. Here you can see heap memory information,<br> thread information, class information, and the server's CPU usage.</p><h4 id="_5-1-1-obtain-metric-data" tabindex="-1"><a class="header-anchor" href="#_5-1-1-obtain-metric-data" aria-hidden="true">#</a> 5.1.1. Obtain metric data</h4><p>After connecting to JMX, you can find the "MBean" named "org.apache.iotdb.metrics" through the "MBeans" tab, and you can<br> view the specific values of all monitoring metrics in the sidebar.</p><img style="width:100%;max-width:800px;max-height:600px;margin-left:auto;margin-right:auto;display:block;" alt="metric-jmx" src="https://alioss.timecho.com/docs/img/github/204018765-6fda9391-ebcf-4c80-98c5-26f34bd74df0.png"><h4 id="_5-1-2-get-other-relevant-data" tabindex="-1"><a class="header-anchor" href="#_5-1-2-get-other-relevant-data" aria-hidden="true">#</a> 5.1.2. Get other relevant data</h4><p>After connecting to JMX, you can find the "MBean" named "org.apache.iotdb.service" through the "MBeans" tab, as shown in<br> the image below, to understand the basic status of the service</p><p><img style="width:100%;max-width:800px;max-height:600px;margin-left:auto;margin-right:auto;display:block;" src="https://alioss.timecho.com/docs/img/github/149951720-707f1ee8-32ee-4fde-9252-048caebd232e.png"> <br></p><p>In order to improve query performance, IOTDB caches ChunkMetaData and TsFileMetaData. Users can use MXBean and expand<br> the sidebar <code>org.apache.iotdb.db.service</code> to view the cache hit ratio:</p><img style="width:100%;max-width:800px;max-height:600px;margin-left:auto;margin-right:auto;display:block;" src="https://alioss.timecho.com/docs/img/github/112426760-73e3da80-8d73-11eb-9a8f-9232d1f2033b.png"><h3 id="_5-2-prometheus" tabindex="-1"><a class="header-anchor" href="#_5-2-prometheus" aria-hidden="true">#</a> 5.2. Prometheus</h3><h4 id="_5-2-1-the-mapping-from-metric-type-to-prometheus-format" tabindex="-1"><a class="header-anchor" href="#_5-2-1-the-mapping-from-metric-type-to-prometheus-format" aria-hidden="true">#</a> 5.2.1. The mapping from metric type to prometheus format</h4><blockquote><p>For metrics whose Metric Name is name and Tags are K1=V1, ..., Kn=Vn, the mapping is as follows, where value is a<br> specific value</p></blockquote><table><thead><tr><th>Metric Type</th><th>Mapping</th></tr></thead><tbody><tr><td>Counter</td><td>name_total{cluster="clusterName", nodeType="nodeType", nodeId="nodeId", k1="V1", ..., Kn="Vn"} value</td></tr><tr><td>AutoGauge、Gauge</td><td>name{cluster="clusterName", nodeType="nodeType", nodeId="nodeId", k1="V1", ..., Kn="Vn"} value</td></tr><tr><td>Histogram</td><td>name_max{cluster="clusterName", nodeType="nodeType", nodeId="nodeId", k1="V1", ..., Kn="Vn"} value <br> name_sum{cluster="clusterName", nodeType="nodeType", nodeId="nodeId", k1="V1", ..., Kn="Vn"} value <br> name_count{cluster="clusterName", nodeType="nodeType", nodeId="nodeId", k1="V1", ..., Kn="Vn"} value <br> name{cluster="clusterName", nodeType="nodeType", nodeId="nodeId", k1="V1", ..., Kn="Vn", quantile="0.5"} value <br> name{cluster="clusterName", nodeType="nodeType", nodeId="nodeId", k1="V1", ..., Kn="Vn", quantile="0.99"} value</td></tr><tr><td>Rate</td><td>name_total{cluster="clusterName", nodeType="nodeType", nodeId="nodeId", k1="V1", ..., Kn="Vn"} value <br> name_total{cluster="clusterName", nodeType="nodeType", nodeId="nodeId", k1="V1", ..., Kn="Vn", rate="m1"} value <br> name_total{cluster="clusterName", nodeType="nodeType", nodeId="nodeId", k1="V1", ..., Kn="Vn", rate="m5"} value <br> name_total{cluster="clusterName", nodeType="nodeType", nodeId="nodeId", k1="V1", ..., Kn="Vn", rate="m15"} value <br> name_total{cluster="clusterName", nodeType="nodeType", nodeId="nodeId", k1="V1", ..., Kn="Vn", rate="mean"} value</td></tr><tr><td>Timer</td><td>name_seconds_max{cluster="clusterName", nodeType="nodeType", nodeId="nodeId", k1="V1", ..., Kn="Vn"} value <br> name_seconds_sum{cluster="clusterName", nodeType="nodeType", nodeId="nodeId", k1="V1", ..., Kn="Vn"} value <br> name_seconds_count{cluster="clusterName", nodeType="nodeType", nodeId="nodeId", k1="V1", ..., Kn="Vn"} value <br> name_seconds{cluster="clusterName", nodeType="nodeType", nodeId="nodeId", k1="V1", ..., Kn="Vn", quantile="0.5"} value <br> name_seconds{cluster="clusterName", nodeType="nodeType", nodeId="nodeId", k1="V1", ..., Kn="Vn", quantile="0.99"} value</td></tr></tbody></table><h4 id="_5-2-2-config-file" tabindex="-1"><a class="header-anchor" href="#_5-2-2-config-file" aria-hidden="true">#</a> 5.2.2. Config File</h4><ol><li>Taking DataNode as an example, modify the iotdb-datanode.properties configuration file as follows:</li></ol><div class="language-properties line-numbers-mode" data-ext="properties"><pre class="language-properties"><code><span class="token key attr-name">dn_metric_reporter_list</span><span class="token punctuation">=</span><span class="token value attr-value">PROMETHEUS</span> |