blob: 9345f2f16804a9d4c27c97937a9572e3201c1cd3 [file] [log] [blame]
import{_ as s,C as r,O as l,P as c,ah as u,Q as e,U as n,ai as d,S as o,aW as a}from"./framework-e4340ccd.js";const h={},m=a('<p>Along with IoTDB running, we hope to observe the status of IoTDB, so as to troubleshoot system problems or discover potential system risks in time. A series of metrics that can <strong>reflect the operating status of the system</strong> are system 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&#39;s running status as detail as 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 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 &quot;no space left on device&quot; error, we really want to know which kind of data file had a rapid rise in the 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 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&#39;s status, including but not limited to RD, QA, SRE, DBA, can use the metrics to work 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&#39;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 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 monitoring item of type <code>Metric Name = entry_seconds_count</code>, the meaning of name refers to the monitored business interface.</li><li><code>type = xxx</code>: Monitoring indicator type subdivision, which is a description of <strong>monitoring indicator</strong> itself. For example, for monitoring items of type <code>Metric Name = point</code>, the meaning of type refers to the specific type 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 monitoring items of type <code>Metric Name = Task</code>, this parameter can be used to distinguish the status of the 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 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 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 level is <code>Important level</code>, and the audit strictness is <code>Core &gt; Important &gt; Normal &gt; 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 * <em>performance, stability, and security</em>* of the system, such as the status of the instance, the load of the system, etc.</li><li><code>Important</code>: Important metrics of the module, which is used by <strong>operation and maintenance and testers</strong>, and is directly related to <strong>the running status of each module</strong>, such as the number of merged files, execution status, 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 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 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 optimization or refactoring, metrics will be added and updated synchronously.</p>',14),p={href:"https://github.com/apache/iotdb/tree/master/metrics",target:"_blank",rel:"noopener noreferrer"},f=e("h3",{id:"_4-1-core-level-metrics",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#_4-1-core-level-metrics","aria-hidden":"true"},"#"),n(" 4.1. Core level metrics")],-1),_=e("p",null,"Core-level metrics are enabled by default during system operation. The addition of each Core-level metrics needs to be carefully evaluated. The current Core-level metrics are as follows:",-1),g=e("h4",{id:"_4-1-1-cluster",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#_4-1-1-cluster","aria-hidden":"true"},"#"),n(" 4.1.1. Cluster")],-1),b=e("thead",null,[e("tr",null,[e("th",null,"Metric"),e("th",null,"Tags"),e("th",null,"Type"),e("th",null,"Description")])],-1),y=e("tr",null,[e("td",null,"config_node"),e("td",null,'name="total",status="Registered/Online/Unknown"'),e("td",null,"AutoGauge"),e("td",null,"The number of registered/online/unknown confignodes")],-1),T=e("tr",null,[e("td",null,"data_node"),e("td",null,'name="total",status="Registered/Online/Unknown"'),e("td",null,"AutoGauge"),e("td",null,"The number of registered/online/unknown datanodes")],-1),q=e("td",null,"points",-1),v=e("td",null,"Gauge",-1),k=e("td",null,"The point number of last flushed memtable",-1),w=a('<h4 id="_4-1-2-iotdb-process" tabindex="-1"><a class="header-anchor" href="#_4-1-2-iotdb-process" aria-hidden="true">#</a> 4.1.2. 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=&quot;process&quot;</td><td>AutoGauge</td><td>The current CPU usage of IoTDB process, Unit: %</td></tr><tr><td>process_cpu_time</td><td>name=&quot;process&quot;</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=&quot;memory&quot;</td><td>AutoGauge</td><td>The maximum available memory of IoTDB process</td></tr><tr><td>process_total_mem</td><td>name=&quot;memory&quot;</td><td>AutoGauge</td><td>The current requested memory for IoTDB process</td></tr><tr><td>process_free_mem</td><td>name=&quot;memory&quot;</td><td>AutoGauge</td><td>The free available memory of IoTDB process</td></tr></tbody></table><h4 id="_4-1-3-system" tabindex="-1"><a class="header-anchor" href="#_4-1-3-system" aria-hidden="true">#</a> 4.1.3. 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=&quot;system&quot;</td><td>AutoGauge</td><td>The current CPU usage of system, Unit: %</td></tr><tr><td>sys_cpu_cores</td><td>name=&quot;system&quot;</td><td>Gauge</td><td>The available number of CPU cores</td></tr><tr><td>sys_total_physical_memory_size</td><td>name=&quot;memory&quot;</td><td>Gauge</td><td>The maximum physical memory of system</td></tr><tr><td>sys_free_physical_memory_size</td><td>name=&quot;memory&quot;</td><td>AutoGauge</td><td>The current available memory of system</td></tr><tr><td>sys_total_swap_space_size</td><td>name=&quot;memory&quot;</td><td>AutoGauge</td><td>The maximum swap space of system</td></tr><tr><td>sys_free_swap_space_size</td><td>name=&quot;memory&quot;</td><td>AutoGauge</td><td>The available swap space of system</td></tr><tr><td>sys_committed_vm_size</td><td>name=&quot;memory&quot;</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=&quot;disk&quot;</td><td>AutoGauge</td><td>The total disk space</td></tr><tr><td>sys_disk_free_space</td><td>name=&quot;disk&quot;</td><td>AutoGauge</td><td>The available disk space</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-cluster" tabindex="-1"><a class="header-anchor" href="#_4-2-1-cluster" aria-hidden="true">#</a> 4.2.1. Cluster</h4>',6),D=e("thead",null,[e("tr",null,[e("th",null,"Metric"),e("th",null,"Tags"),e("th",null,"Type"),e("th",null,"Description")])],-1),C=e("td",null,"cluster_node_leader_count",-1),I=e("td",null,"Gauge",-1),x=e("td",null,"The count of consensus group leader on each node",-1),A=e("td",null,"cluster_node_status",-1),G=e("td",null,"Gauge",-1),V=e("td",null,"The current node status, 0=Unkonwn 1=online",-1),M=e("h4",{id:"_4-2-2-node",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#_4-2-2-node","aria-hidden":"true"},"#"),n(" 4.2.2. Node")],-1),P=e("thead",null,[e("tr",null,[e("th",null,"Metric"),e("th",null,"Tags"),e("th",null,"Type"),e("th",null,"Description")])],-1),S=e("tr",null,[e("td",null,"quantity"),e("td",null,'name="database"'),e("td",null,"AutoGauge"),e("td",null,"The number of database")],-1),K=e("tr",null,[e("td",null,"quantity"),e("td",null,'name="timeSeries"'),e("td",null,"AutoGauge"),e("td",null,"The number of timeseries")],-1),B=e("tr",null,[e("td",null,"quantity"),e("td",null,'name="pointsIn"'),e("td",null,"Counter"),e("td",null,"The number of write points")],-1),N=e("tr",null,[e("td",null,"region"),e("td",null,'name="total",type="SchemaRegion"'),e("td",null,"AutoGauge"),e("td",null,"The total number of SchemaRegion in PartitionTable")],-1),z=e("tr",null,[e("td",null,"region"),e("td",null,'name="total",type="DataRegion"'),e("td",null,"AutoGauge"),e("td",null,"The total number of DataRegion in PartitionTable")],-1),R=e("td",null,"region",-1),U=e("td",null,"Gauge",-1),j=e("td",null,"The number of SchemaRegion in PartitionTable of specific node",-1),O=e("td",null,"region",-1),F=e("td",null,"Gauge",-1),L=e("td",null,"The number of DataRegion in PartitionTable of specific node",-1),H=e("h4",{id:"_4-2-3-iotconsensus",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#_4-2-3-iotconsensus","aria-hidden":"true"},"#"),n(" 4.2.3. IoTConsensus")],-1),E=e("thead",null,[e("tr",null,[e("th",null,"Metric"),e("th",null,"Tags"),e("th",null,"Type"),e("th",null,"Description")])],-1),J=e("td",null,"mutli_leader",-1),W=e("td",null,"AutoGauge",-1),Q=e("td",null,"The sync index of synchronization thread in replica group",-1),X=e("td",null,"mutli_leader",-1),Y=e("td",null,"AutoGauge",-1),Z=e("td",null,"The size of cache requests of synchronization thread in replica group",-1),$=e("td",null,"mutli_leader",-1),ee=e("td",null,"AutoGauge",-1),te=e("td",null,"The write process of main process in replica group",-1),oe=e("td",null,"mutli_leader",-1),ne=e("td",null,"AutoGauge",-1),ae=e("td",null,"The sync index of replica group",-1),ie=e("td",null,"stage",-1),de=e("td",null,"Histogram",-1),se=e("td",null,"The time consumed to get statemachine lock in main process",-1),re=e("td",null,"stage",-1),le=e("td",null,"Histogram",-1),ce=e("td",null,"The time consumed to precheck before write in main process",-1),ue=e("td",null,"stage",-1),he=e("td",null,"Histogram",-1),me=e("td",null,"The time consumed to write statemachine in main process",-1),pe=e("td",null,"stage",-1),fe=e("td",null,"Histogram",-1),_e=e("td",null,"The time consumed to try to offer request to queue in main process",-1),ge=e("td",null,"stage",-1),be=e("td",null,"Histogram",-1),ye=e("td",null,"The time consumed to the whole write in main process",-1),Te=e("td",null,"stage",-1),qe=e("td",null,"Histogram",-1),ve=e("td",null,"The time consumed to construct batch in synchronization thread",-1),ke=e("td",null,"stage",-1),we=e("td",null,"Histogram",-1),De=e("td",null,"The time consumed to sync log in asynchronous callback process",-1),Ce=a('<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=&quot;chunk&quot;</td><td>AutoGauge</td><td>The cache hit ratio of ChunkCache, Unit: %</td></tr><tr><td>cache_hit</td><td>name=&quot;schema&quot;</td><td>AutoGauge</td><td>The cache hit ratio of SchemaCache, Unit: %</td></tr><tr><td>cache_hit</td><td>name=&quot;timeSeriesMeta&quot;</td><td>AutoGauge</td><td>The cache hit ratio of TimeseriesMetadataCache, Unit: %</td></tr><tr><td>cache_hit</td><td>name=&quot;bloomFilter&quot;</td><td>AutoGauge</td><td>The interception rate of bloomFilter in TimeseriesMetadataCache, Unit: %</td></tr><tr><td>cache</td><td>name=&quot;Database&quot;, type=&quot;hit&quot;</td><td>Counter</td><td>The hit number of Database Cache</td></tr><tr><td>cache</td><td>name=&quot;Database&quot;, type=&quot;all&quot;</td><td>Counter</td><td>The access number of Database Cache</td></tr><tr><td>cache</td><td>name=&quot;SchemaPartition&quot;, type=&quot;hit&quot;</td><td>Counter</td><td>The hit number of SchemaPartition Cache</td></tr><tr><td>cache</td><td>name=&quot;SchemaPartition&quot;, type=&quot;all&quot;</td><td>Counter</td><td>The access number of SSchemaPartition Cache</td></tr><tr><td>cache</td><td>name=&quot;DataPartition&quot;, type=&quot;hit&quot;</td><td>Counter</td><td>The hit number of DataPartition Cache</td></tr><tr><td>cache</td><td>name=&quot;DataPartition&quot;, type=&quot;all&quot;</td><td>Counter</td><td>The access number of SDataPartition Cache</td></tr></tbody></table><h4 id="_4-2-5-interface" tabindex="-1"><a class="header-anchor" href="#_4-2-5-interface" aria-hidden="true">#</a> 4.2.5. Interface</h4>',3),Ie=e("thead",null,[e("tr",null,[e("th",null,"Metric"),e("th",null,"Tags"),e("th",null,"Type"),e("th",null,"Description")])],-1),xe=e("td",null,"operation",-1),Ae=e("td",null,"Histogram",-1),Ge=e("td",null,"The time consumed of operations in client",-1),Ve=e("td",null,"entry",-1),Me=e("td",null,"Timer",-1),Pe=e("td",null,"The time consumed of thrift operations",-1),Se=e("tr",null,[e("td",null,"thrift_connections"),e("td",null,'name="ConfigNodeRPC"'),e("td",null,"AutoGauge"),e("td",null,"The number of thrift internal connections in ConfigNode")],-1),Ke=e("tr",null,[e("td",null,"thrift_connections"),e("td",null,'name="Internal"'),e("td",null,"AutoGauge"),e("td",null,"The number of thrift internal connections in DataNode")],-1),Be=e("tr",null,[e("td",null,"thrift_connections"),e("td",null,'name="MPPDataExchange"'),e("td",null,"AutoGauge"),e("td",null,"The number of thrift internal connections in MPP")],-1),Ne=e("tr",null,[e("td",null,"thrift_connections"),e("td",null,'name="RPC"'),e("td",null,"AutoGauge"),e("td",null,"The number of thrift connections of Client")],-1),ze=e("tr",null,[e("td",null,"thrift_active_threads"),e("td",null,'name="ConfigNodeRPC-Service"'),e("td",null,"AutoGauge"),e("td",null,"The number of thrift active internal connections in ConfigNode")],-1),Re=e("tr",null,[e("td",null,"thrift_active_threads"),e("td",null,'name="DataNodeInternalRPC-Service"'),e("td",null,"AutoGauge"),e("td",null,"The number of thrift active internal connections in DataNode")],-1),Ue=e("tr",null,[e("td",null,"thrift_active_threads"),e("td",null,'name="MPPDataExchangeRPC-Service"'),e("td",null,"AutoGauge"),e("td",null,"The number of thrift active internal connections in MPP")],-1),je=e("tr",null,[e("td",null,"thrift_active_threads"),e("td",null,'name="ClientRPC-Service"'),e("td",null,"AutoGauge"),e("td",null,"The number of thrift active connections of client")],-1),Oe=e("h4",{id:"_4-2-6-memory",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#_4-2-6-memory","aria-hidden":"true"},"#"),n(" 4.2.6. Memory")],-1),Fe=e("thead",null,[e("tr",null,[e("th",null,"Metric"),e("th",null,"Tags"),e("th",null,"Type"),e("th",null,"Description")])],-1),Le=e("td",null,"mem",-1),He=e("td",null,"AutoGauge",-1),Ee=e("td",null,"The memory usage of DataRegion in DataNode, Unit: byte",-1),Je=e("td",null,"mem",-1),We=e("td",null,"AutoGauge",-1),Qe=e("td",null,"The memory usage of chunkMetaData when writting TsFile, Unit: byte",-1),Xe=e("tr",null,[e("td",null,"mem"),e("td",null,'name="IoTConsensus"'),e("td",null,"AutoGauge"),e("td",null,"The memory usage of IoTConsensus, Unit: byte")],-1),Ye=e("tr",null,[e("td",null,"mem"),e("td",null,'name="schema_region_total_usage"'),e("td",null,"AutoGauge"),e("td",null,"The memory usage of all SchemaRegion, Unit: byte")],-1),Ze=e("tr",null,[e("td",null,"mem"),e("td",null,'name="schema_region_total_remaining"'),e("td",null,"AutoGauge"),e("td",null,"The memory remaining for all SchemaRegion, Unit: byte")],-1),$e=a('<h4 id="_4-2-7-task" tabindex="-1"><a class="header-anchor" href="#_4-2-7-task" aria-hidden="true">#</a> 4.2.7. Task</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=&quot;compaction_inner&quot;, status=&quot;running/waiting&quot;</td><td>Gauge</td><td>The number of inner compaction tasks</td></tr><tr><td>queue</td><td>name=&quot;compaction_cross&quot;, status=&quot;running/waiting&quot;</td><td>Gauge</td><td>The number of cross compatcion tasks</td></tr><tr><td>cost_task</td><td>name=&quot;inner_compaction/cross_compaction/flush&quot;</td><td>Gauge</td><td>The time consumed of compaction tasks</td></tr><tr><td>queue</td><td>name=&quot;flush&quot;,status=&quot;running/waiting&quot;</td><td>AutoGauge</td><td>The number of flush tasks</td></tr><tr><td>queue</td><td>name=&quot;Sub_RawQuery&quot;,status=&quot;running/waiting&quot;</td><td>AutoGauge</td><td>The number of Sub_RawQuery</td></tr></tbody></table><h4 id="_4-2-8-compaction" tabindex="-1"><a class="header-anchor" href="#_4-2-8-compaction" aria-hidden="true">#</a> 4.2.8. 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=&quot;compaction&quot;, type=&quot;aligned/not-aligned/total&quot;</td><td>Counter</td><td>The written size of compaction</td></tr><tr><td>data_read</td><td>name=&quot;compaction&quot;</td><td>Counter</td><td>The read size of compaction</td></tr><tr><td>compaction_task_count</td><td>name = &quot;inner_compaction&quot;, type=&quot;sequence&quot;</td><td>Counter</td><td>The number of inner sequence compction</td></tr><tr><td>compaction_task_count</td><td>name = &quot;inner_compaction&quot;, type=&quot;unsequence&quot;</td><td>Counter</td><td>The number of inner sequence compction</td></tr><tr><td>compaction_task_count</td><td>name = &quot;cross_compaction&quot;, type=&quot;cross&quot;</td><td>Counter</td><td>The number of corss compction</td></tr></tbody></table><h4 id="_4-2-9-file" tabindex="-1"><a class="header-anchor" href="#_4-2-9-file" aria-hidden="true">#</a> 4.2.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=&quot;wal&quot;</td><td>AutoGauge</td><td>The size of WAL file, Unit: byte</td></tr><tr><td>file_size</td><td>name=&quot;seq&quot;</td><td>AutoGauge</td><td>The size of sequence TsFile, Unit: byte</td></tr><tr><td>file_size</td><td>name=&quot;unseq&quot;</td><td>AutoGauge</td><td>The size of unsequence TsFile, Unit: byte</td></tr><tr><td>file_size</td><td>name=&quot;inner-seq-temp&quot;</td><td>AutoGauge</td><td>The size of inner sequence space compaction temporal file</td></tr><tr><td>file_size</td><td>name=&quot;inner-unseq-temp&quot;</td><td>AutoGauge</td><td>The size of inner unsequence space compaction temporal file</td></tr><tr><td>file_size</td><td>name=&quot;cross-temp&quot;</td><td>AutoGauge</td><td>The size of cross space compaction temoporal file</td></tr><tr><td>file_size</td><td>name=&quot;mods</td><td>AutoGauge</td><td>The size of modification files</td></tr><tr><td>file_count</td><td>name=&quot;wal&quot;</td><td>AutoGauge</td><td>The count of WAL file</td></tr><tr><td>file_count</td><td>name=&quot;seq&quot;</td><td>AutoGauge</td><td>The count of sequence TsFile</td></tr><tr><td>file_count</td><td>name=&quot;unseq&quot;</td><td>AutoGauge</td><td>The count of unsequence TsFile</td></tr><tr><td>file_count</td><td>name=&quot;inner-seq-temp&quot;</td><td>AutoGauge</td><td>The count of inner sequence space compaction temporal file</td></tr><tr><td>file_count</td><td>name=&quot;inner-unseq-temp&quot;</td><td>AutoGauge</td><td>The count of inner unsequence space compaction temporal file</td></tr><tr><td>file_count</td><td>name=&quot;cross-temp&quot;</td><td>AutoGauge</td><td>The count of cross space compaction temporal file</td></tr><tr><td>file_count</td><td>name=&quot;open_file_handlers&quot;</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=&quot;mods</td><td>AutoGauge</td><td>The count of modification file</td></tr></tbody></table><h4 id="_4-2-10-iotdb-process" tabindex="-1"><a class="header-anchor" href="#_4-2-10-iotdb-process" aria-hidden="true">#</a> 4.2.10. 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=&quot;memory&quot;</td><td>AutoGauge</td><td>The used memory of IoTDB process</td></tr><tr><td>process_mem_ratio</td><td>name=&quot;memory&quot;</td><td>AutoGauge</td><td>The used memory ratio of IoTDB process</td></tr><tr><td>process_threads_count</td><td>name=&quot;process&quot;</td><td>AutoGauge</td><td>The number of thread of IoTDB process</td></tr><tr><td>process_status</td><td>name=&quot;process&quot;</td><td>AutoGauge</td><td>The status of IoTDB process, 1=live, 0=dead</td></tr></tbody></table><h4 id="_4-2-11-log" tabindex="-1"><a class="header-anchor" href="#_4-2-11-log" aria-hidden="true">#</a> 4.2.11. 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=&quot;trace/debug/info/warn/error&quot;</td><td>Counter</td><td>The number of log events</td></tr></tbody></table><h4 id="_4-2-12-jvm-thread" tabindex="-1"><a class="header-anchor" href="#_4-2-12-jvm-thread" aria-hidden="true">#</a> 4.2.12. 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=&quot;runnable/blocked/waiting/timed-waiting/new/terminated&quot;</td><td>AutoGauge</td><td>The number of thread in different states</td></tr></tbody></table><h4 id="_4-2-13-jvm-gc" tabindex="-1"><a class="header-anchor" href="#_4-2-13-jvm-gc" aria-hidden="true">#</a> 4.2.13. JVM GC</h4>',13),et=e("thead",null,[e("tr",null,[e("th",null,"Metric"),e("th",null,"Tags"),e("th",null,"Type"),e("th",null,"Description")])],-1),tt=e("tr",null,[e("td",null,"jvm_gc_pause"),e("td",null,'action="end of major GC/end of minor GC",cause="xxxx"'),e("td",null,"Timer"),e("td",null,"The number and time consumed of Young GC/Full Gc caused by different reason")],-1),ot=e("tr",null,[e("td"),e("td"),e("td"),e("td")],-1),nt=e("td",null,"jvm_gc_concurrent_phase_time",-1),at=e("td",null,"Timer",-1),it=e("td",null,"The number and time consumed of Young GC/Full Gc caused by different",-1),dt=e("tr",null,[e("td"),e("td"),e("td"),e("td")],-1),st=e("tr",null,[e("td",null,"jvm_gc_max_data_size_bytes"),e("td"),e("td",null,"AutoGauge"),e("td",null,"The historical maximum value of old memory")],-1),rt=e("tr",null,[e("td",null,"jvm_gc_live_data_size_bytes"),e("td"),e("td",null,"AutoGauge"),e("td",null,"The usage of old memory")],-1),lt=e("tr",null,[e("td",null,"jvm_gc_memory_promoted_bytes"),e("td"),e("td",null,"Counter"),e("td",null,"The accumulative value of positive memory growth of old memory")],-1),ct=e("tr",null,[e("td",null,"jvm_gc_memory_allocated_bytes"),e("td"),e("td",null,"Counter"),e("td",null,"The accumulative value of positive memory growth of allocated memory")],-1),ut=e("h4",{id:"_4-2-14-jvm-memory",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#_4-2-14-jvm-memory","aria-hidden":"true"},"#"),n(" 4.2.14. JVM Memory")],-1),ht=e("table",null,[e("thead",null,[e("tr",null,[e("th",null,"Metric"),e("th",null,"Tags"),e("th",null,"Type"),e("th",null,"Description")])]),e("tbody",null,[e("tr",null,[e("td",null,"jvm_buffer_memory_used_bytes"),e("td",null,'id="direct/mapped"'),e("td",null,"AutoGauge"),e("td",null,"The used size of buffer")]),e("tr",null,[e("td",null,"jvm_buffer_total_capacity_bytes"),e("td",null,'id="direct/mapped"'),e("td",null,"AutoGauge"),e("td",null,"The max size of buffer")]),e("tr",null,[e("td",null,"jvm_buffer_count_buffers"),e("td",null,'id="direct/mapped"'),e("td",null,"AutoGauge"),e("td",null,"The number of buffer")]),e("tr",null,[e("td",null,"jvm_memory_committed_bytes"),e("td",{area:'heap/nonheap,id="xxx",'}),e("td",null,"AutoGauge"),e("td",null,"The committed memory of JVM")]),e("tr",null,[e("td",null,"jvm_memory_max_bytes"),e("td",{area:'heap/nonheap,id="xxx",'}),e("td",null,"AutoGauge"),e("td",null,"The max memory of JVM")]),e("tr",null,[e("td",null,"jvm_memory_used_bytes"),e("td",{area:'heap/nonheap,id="xxx",'}),e("td",null,"AutoGauge"),e("td",null,"The used memory of JVM")])])],-1),mt=a('<h4 id="_4-2-15-jvm-class" tabindex="-1"><a class="header-anchor" href="#_4-2-15-jvm-class" aria-hidden="true">#</a> 4.2.15. 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-16-jvm-compilation" tabindex="-1"><a class="header-anchor" href="#_4-2-16-jvm-compilation" aria-hidden="true">#</a> 4.2.16. JVM Compilation</h4>',3),pt=e("table",null,[e("thead",null,[e("tr",null,[e("th",null,"Metric"),e("th",null,"Tags"),e("th",null,"Type"),e("th",null,"Description")])]),e("tbody",null,[e("tr",null,[e("td",null,"jvm_compilation_time_ms"),e("td",{compiler:"HotSpot 64-Bit Tiered Compilers,"}),e("td",null,"AutoGauge"),e("td",null,"The time consumed in compilation")])])],-1),ft=e("h3",{id:"_4-3-normal-level-metrics",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#_4-3-normal-level-metrics","aria-hidden":"true"},"#"),n(" 4.3. Normal level Metrics")],-1),_t=e("h4",{id:"_4-3-1-cluster",tabindex:"-1"},[e("a",{class:"header-anchor",href:"#_4-3-1-cluster","aria-hidden":"true"},"#"),n(" 4.3.1. Cluster")],-1),gt=e("thead",null,[e("tr",null,[e("th",null,"Metric"),e("th",null,"Tags"),e("th",null,"Type"),e("th",null,"Description")])],-1),bt=e("td",null,"region",-1),yt=e("td",null,"AutoGauge",-1),Tt=e("td",null,"The number of DataRegion/SchemaRegion of database in specific node",-1),qt=e("td",null,"slot",-1),vt=e("td",null,"AutoGauge",-1),kt=e("td",null,"The number of DataSlot/SchemaSlot of database in specific node",-1),wt=a(`<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 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 page, you will first see an overview of various running conditions of IoTDB. Here you can see heap memory information, thread information, class information, and the server&#39;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 &quot;MBean&quot; named &quot;org.apache.iotdb.metrics&quot; through the &quot;MBeans&quot; tab, and you can 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 &quot;MBean&quot; named &quot;org.apache.iotdb.service&quot; through the &quot;MBeans&quot; tab, as shown in 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 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-forma" tabindex="-1"><a class="header-anchor" href="#_5-2-1-the-mapping-from-metric-type-to-prometheus-forma" aria-hidden="true">#</a> 5.2.1. The mapping from metric type to prometheus forma</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 specific value</p></blockquote><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 specific value</p></blockquote><table><thead><tr><th>Metric Type</th><th>Mapping</th></tr></thead><tbody><tr><td>Counter</td><td>name_total{k1=&quot;V1&quot;, ..., Kn=&quot;Vn&quot;} value</td></tr><tr><td>AutoGauge、Gauge</td><td>name{k1=&quot;V1&quot;, ..., Kn=&quot;Vn&quot;} value</td></tr><tr><td>Histogram</td><td>name_max{k1=&quot;V1&quot;, ..., Kn=&quot;Vn&quot;} value <br> name_sum{k1=&quot;V1&quot;, ..., Kn=&quot;Vn&quot;} value <br> name_count{k1=&quot;V1&quot;, ..., Kn=&quot;Vn&quot;} value <br> name{k1=&quot;V1&quot;, ..., Kn=&quot;Vn&quot;, quantile=&quot;0.0&quot;} value <br> name{k1=&quot;V1&quot;, ..., Kn=&quot;Vn&quot;, quantile=&quot;0.25&quot;} value <br> name{k1=&quot;V1&quot;, ..., Kn=&quot;Vn&quot;, quantile=&quot;0.5&quot;} value <br> name{k1=&quot;V1&quot;, ..., Kn=&quot;Vn&quot;, quantile=&quot;0.75&quot;} value <br> name{k1=&quot;V1&quot;, ..., Kn=&quot;Vn&quot;, quantile=&quot;1.0&quot;} value</td></tr><tr><td>Rate</td><td>name_total{k1=&quot;V1&quot;, ..., Kn=&quot;Vn&quot;} value <br> name_total{k1=&quot;V1&quot;, ..., Kn=&quot;Vn&quot;, rate=&quot;m1&quot;} value <br> name_total{k1=&quot;V1&quot;, ..., Kn=&quot;Vn&quot;, rate=&quot;m5&quot;} value <br> name_total{k1=&quot;V1&quot;, ..., Kn=&quot;Vn&quot;, rate=&quot;m15&quot;} value <br> name_total{k1=&quot;V1&quot;, ..., Kn=&quot;Vn&quot;, rate=&quot;mean&quot;} value</td></tr><tr><td>Timer</td><td>name_seconds_max{k1=&quot;V1&quot;, ..., Kn=&quot;Vn&quot;} value <br> name_seconds_sum{k1=&quot;V1&quot;, ..., Kn=&quot;Vn&quot;} value <br> name_seconds_count{k1=&quot;V1&quot;, ..., Kn=&quot;Vn&quot;} value <br> name_seconds{k1=&quot;V1&quot;, ..., Kn=&quot;Vn&quot;, quantile=&quot;0.0&quot;} value <br> name_seconds{k1=&quot;V1&quot;, ..., Kn=&quot;Vn&quot;, quantile=&quot;0.25&quot;} value <br> name_seconds{k1=&quot;V1&quot;, ..., Kn=&quot;Vn&quot;, quantile=&quot;0.5&quot;} value <br> name_seconds{k1=&quot;V1&quot;, ..., Kn=&quot;Vn&quot;, quantile=&quot;0.75&quot;} value <br> name_seconds{k1=&quot;V1&quot;, ..., Kn=&quot;Vn&quot;, quantile=&quot;1.0&quot;} 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>
<span class="token key attr-name">dn_metric_level</span><span class="token punctuation">=</span><span class="token value attr-value">CORE</span>
<span class="token key attr-name">dn_metric_prometheus_reporter_port</span><span class="token punctuation">=</span><span class="token value attr-value">9091</span>
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><p>Then you can get metrics data as follows</p><ol start="2"><li>Start IoTDB DataNodes</li><li>Open a browser or use <code>curl</code> to visit <code>http://servier_ip:9091/metrics</code>, you can get the following metric data:</li></ol><div class="language-text line-numbers-mode" data-ext="text"><pre class="language-text"><code>...
# HELP file_count
# TYPE file_count gauge
file_count{name=&quot;wal&quot;,} 0.0
file_count{name=&quot;unseq&quot;,} 0.0
file_count{name=&quot;seq&quot;,} 2.0
...
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><h4 id="_5-2-3-prometheus-grafana" tabindex="-1"><a class="header-anchor" href="#_5-2-3-prometheus-grafana" aria-hidden="true">#</a> 5.2.3. Prometheus + Grafana</h4><p>As shown above, IoTDB exposes monitoring metrics data in the standard Prometheus format to the outside world. Prometheus can be used to collect and store monitoring indicators, and Grafana can be used to visualize monitoring indicators.</p><p>The following picture describes the relationships among IoTDB, Prometheus and Grafana</p><figure><img src="https://alioss.timecho.com/docs/img/UserGuide/System-Tools/Metrics/iotdb_prometheus_grafana.png" alt="iotdb_prometheus_grafana" tabindex="0" loading="lazy"><figcaption>iotdb_prometheus_grafana</figcaption></figure><ol><li>Along with running, IoTDB will collect its metrics continuously.</li><li>Prometheus scrapes metrics from IoTDB at a constant interval (can be configured).</li><li>Prometheus saves these metrics to its inner TSDB.</li><li>Grafana queries metrics from Prometheus at a constant interval (can be configured) and then presents them on the graph.</li></ol><p>So, we need to do some additional works to configure and deploy Prometheus and Grafana.</p><p>For instance, you can config your Prometheus as follows to get metrics data from IoTDB:</p><div class="language-yaml line-numbers-mode" data-ext="yml"><pre class="language-yaml"><code><span class="token key atrule">job_name</span><span class="token punctuation">:</span> pull<span class="token punctuation">-</span>metrics
<span class="token key atrule">honor_labels</span><span class="token punctuation">:</span> <span class="token boolean important">true</span>
<span class="token key atrule">honor_timestamps</span><span class="token punctuation">:</span> <span class="token boolean important">true</span>
<span class="token key atrule">scrape_interval</span><span class="token punctuation">:</span> 15s
<span class="token key atrule">scrape_timeout</span><span class="token punctuation">:</span> 10s
<span class="token key atrule">metrics_path</span><span class="token punctuation">:</span> /metrics
<span class="token key atrule">scheme</span><span class="token punctuation">:</span> http
<span class="token key atrule">follow_redirects</span><span class="token punctuation">:</span> <span class="token boolean important">true</span>
<span class="token key atrule">static_configs</span><span class="token punctuation">:</span>
<span class="token punctuation">-</span> <span class="token key atrule">targets</span><span class="token punctuation">:</span>
<span class="token punctuation">-</span> localhost<span class="token punctuation">:</span><span class="token number">9091</span>
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><p>The following documents may help you have a good journey with Prometheus and Grafana.</p>`,34),Dt={href:"https://prometheus.io/docs/prometheus/latest/getting_started/",target:"_blank",rel:"noopener noreferrer"},Ct={href:"https://prometheus.io/docs/prometheus/latest/configuration/configuration/#scrape_config",target:"_blank",rel:"noopener noreferrer"},It={href:"https://grafana.com/docs/grafana/latest/getting-started/getting-started/",target:"_blank",rel:"noopener noreferrer"},xt={href:"https://prometheus.io/docs/visualization/grafana/#grafana-support-for-prometheus",target:"_blank",rel:"noopener noreferrer"},At=a('<h4 id="_5-2-4-apache-iotdb-dashboard" tabindex="-1"><a class="header-anchor" href="#_5-2-4-apache-iotdb-dashboard" aria-hidden="true">#</a> 5.2.4. Apache IoTDB Dashboard</h4><p>We provide the Apache IoTDB Dashboard, and the rendering shown in Grafana is as follows:</p><figure><img src="https://alioss.timecho.com/docs/img/UserGuide/System-Tools/Metrics/dashboard.png" alt="Apache IoTDB Dashboard" tabindex="0" loading="lazy"><figcaption>Apache IoTDB Dashboard</figcaption></figure><h5 id="_5-2-4-1-how-to-get-apache-iotdb-dashboard" tabindex="-1"><a class="header-anchor" href="#_5-2-4-1-how-to-get-apache-iotdb-dashboard" aria-hidden="true">#</a> 5.2.4.1. How to get Apache IoTDB Dashboard</h5>',4),Gt=e("li",null,[n("You can obtain the json files of Dashboards by GitHub: "),e("ol",null,[e("li",null,[e("a",{href:"https://github.com/apache/iotdb/tree/rel/1.0/docs/UserGuide/Monitor-Alert/Apache-IoTDB-ConfigNode-Dashboard.json"},"Apache IoTDB ConfigNode Dashboard")]),e("li",null,[e("a",{href:"https://github.com/apache/iotdb/tree/rel/1.0/docs/UserGuide/Monitor-Alert/Apache-IoTDB-DataNode-Dashboard.json"},"Apache IoTDB DataNode Dashboard")])])],-1),Vt={href:"https://grafana.com/grafana/dashboards/",target:"_blank",rel:"noopener noreferrer"},Mt=e("code",null,"Apache IoTDB Dashboard",-1),Pt=a('<p>When creating Grafana, you can select the json file you just downloaded to <code>Import</code> and select the corresponding target data source for Apache IoTDB Dashboard.</p><h5 id="_5-2-4-2-apache-iotdb-confignode-dashboard-instructions" tabindex="-1"><a class="header-anchor" href="#_5-2-4-2-apache-iotdb-confignode-dashboard-instructions" aria-hidden="true">#</a> 5.2.4.2. Apache IoTDB ConfigNode Dashboard Instructions</h5><blockquote><p>Except for the metrics specified specially, the following metrics are guaranteed to be available in the monitoring framework at the Important levels.</p></blockquote><ul><li><code>Overview</code>: system overview <ul><li><code>Registered Node</code>: The number of registered ConfigNode/DataNode</li><li><code>DataNode</code>: The status of the cluster DataNode, including Online and Unknown.</li><li><code>ConfigNode</code>: The status of the cluster ConfigNode, including Online and Unknown.</li><li><code>The Status Of Node</code>: The status of specific nodes in the cluster, including Online and Unknown.</li></ul></li><li><code>Region</code>: Region overview <ul><li><code>Region Number</code>: the number of Regions, including the total number, the number of DataRegions and the number of SchemaRegions.</li><li><code>Leadership distribution</code>: Cluster leader distribution, which refers to the number of Leaders corresponding to the Region on each node.</li><li><code>Total Region in Node</code>: The total number of Regions of different Nodes.</li><li><code>Region in Node</code>: the number of SchemaRegions/DataRegions of different Nodes.</li><li><code>Region in Database</code> (Normal level): the number of Regions in different Databases, including SchemaRegion and DataRegion.</li><li><code>Slot in Database</code> (Normal level): The number of Slots in different Databases, including the number of DataSlots and SchemaSlots.</li></ul></li><li><code>System</code>: system <ul><li><code>CPU Core</code>: the number of CPU cores in the system.</li><li><code>CPU Load</code>: system CPU load, progress CPU load.</li><li><code>CPU Time Per Minute</code>: The process takes up the system CPU time per minute on average. Note: multi-core will cause this value to exceed 1 minute.</li><li><code>System Memory</code>: the physical memory size of the system, the physical memory size used by the system, and the memory size submitted by the virtual machine.</li><li><code>System Swap Size</code>: the total size of the system swap area, the size used by the system swap area.</li><li><code>Process Memory</code>: the maximum total memory size of the IoTDB process, the total memory size of the IoTDB process, and the memory size used by the IoTDB process.</li><li><code>The Number of GC Per Minute</code>: The average number of GC per minute.</li><li><code>The Time Consumed Of GC Per Minute</code>: Average GC time spent per minute.</li><li><code>The Number Of Java Thread</code>: The number of threads in different states of the IoTDB process.</li><li><code>Heap Memory</code>: the heap memory of the IoTDB process</li><li><code>Off Heap Memory</code>: the off-heap memory of the IoTDB process</li><li><code>Log Number Per Minute</code>: the average number of logs per minute of the IoTDB process</li><li><code>The Time Consumed of Compliation Per Minute</code>: average compilation time per minute</li><li><code>The Number Of Class</code>: The number of classes loaded and unloaded by the JVM</li></ul></li></ul><h5 id="_5-2-4-3-apache-iotdb-datanode-dashboard-instructions" tabindex="-1"><a class="header-anchor" href="#_5-2-4-3-apache-iotdb-datanode-dashboard-instructions" aria-hidden="true">#</a> 5.2.4.3. Apache IoTDB DataNode Dashboard Instructions</h5><blockquote><p>Except for the metrics specified specially, the following metrics are guaranteed to be available in the monitoring framework at the Important levels.</p></blockquote><ul><li><code>Overview</code>: system overview <ul><li><code>The Number Of Entity</code>: the number of entities, including time series, etc.</li><li><code>Write Point Per Minute</code>: the average number of system write points per minute</li><li><code>Database Used Memory</code>: the memory size used by each Database</li></ul></li><li><code>Interface</code>: interface <ul><li><code>The Time Consumed Of Operation(50%)</code>: Median time spent by different client operations</li><li><code>The Time Consumed Of Operation(75%)</code>: The upper quartile of the time consumed by different client operations</li><li><code>The Time Consumed Of Operation(100%)</code>: The maximum time spent by different client operations</li><li><code>The QPS of Interface</code>: system interface visits per second</li><li><code>The Time Consumed Of Interface</code>: the average time consumed by the system interface</li><li><code>Cache Hit Rate</code>: cache hit rate</li><li><code>Thrift Connection</code>: the number of Thrift connections established</li><li><code>Thrift Active Thread</code>: The number of active Thrift connections established</li></ul></li><li><code>Engine</code>: <ul><li><code>Task Number</code>: the number of tasks in different states in the system</li><li><code>The Time Consumed Of Tasking</code>: Time consumption of tasks in different states in the system</li><li><code>Compaction Read And Write Per Minute</code>: the average amount of combined read and write data per minute</li><li><code>Compaction R/W Ratio Per Minute</code>: The average ratio of combined read and write data per minute</li><li><code>Compaction Number Per Minute</code>: the average number of different types of consolidation tasks per minute</li></ul></li><li><code>IoTConsensus</code>: <ul><li><code>IoTConsensus Used Memory</code>:The size of the memory used by IoTConsensus consensus</li><li><code>IoTConsensus Sync Index</code>:the searchIndex and safeIndex of region</li><li><code>IoTConsensus Overview</code>:The total sync lag and total size of buffered requests of node</li><li><code>The time consumed of different stages(50%)</code>:The median of the time consumed of different stages</li><li><code>The time consumed of different stages(75%)</code>:The upper quartile of the time consumed of different stages</li><li><code>The time consumed of different stages(100%)</code>:The max of the time consumed of different stages</li><li><code>IoTConsensus Search Index Rate</code>:The increasing rate of searchIndex of region</li><li><code>IoTConsensus Safe Index Rate</code>:The increasing rate of safeIndex of region</li><li><code>IoTConsensus LogDispatcher Request Size</code>:The number of requests buffered in logDispatcher</li><li><code>Sync Lag</code>:The sync lag of region</li><li><code>Min Peer Sync Lag</code>:The sync lag between the searchIndex of IoTConsensusServerImpl and the max currentSyncIndex of LogDispatcher</li><li><code>Sync speed diff of Peers</code>:The sync lag between the max currentSyncIndex of LogDispatcher and the min currentSyncIndex of LogDispatcher</li></ul></li><li><code>System</code>: system <ul><li><code>CPU Core</code>: the number of CPU cores in the system.</li><li><code>CPU Load</code>: system CPU load, progress CPU load.</li><li><code>CPU Time Per Minute</code>: The process takes up the system CPU time per minute on average. Note: multi-core will cause this value to exceed 1 minute.</li><li><code>System Memory</code>: the physical memory size of the system, the physical memory size used by the system, and the memory size submitted by the virtual machine.</li><li><code>System Swap Size</code>: the total size of the system swap area, the size used by the system swap area.</li><li><code>Process Memory</code>: the maximum total memory size of the IoTDB process, the total memory size of the IoTDB process, and the memory size used by the IoTDB process.</li><li><code>The Size Of File</code>: IoTDB system-related file size, including the total file size under wal, the total size of tsfile files under seq, and the total size of tsfile files under unseq</li><li><code>The Number Of File</code>: the number of files related to the IoTDB system, including the number of files under wal, the number of tsfile files under seq, and the number of tsfile files under unseq</li><li><code>The Space Of Disk</code>: the total size and remaining size of the disk mounted in the current data directory</li><li><code>The Number of GC Per Minute</code>: The average number of GC per minute.</li><li><code>The Time Consumed Of GC Per Minute</code>: Average GC time spent per minute.</li><li><code>The Number Of Java Thread</code>: The number of threads in different states of the IoTDB process.</li><li><code>Heap Memory</code>: the heap memory of the IoTDB process</li><li><code>Off Heap Memory</code>: the off-heap memory of the IoTDB process</li><li><code>Log Number Per Minute</code>: the average number of logs per minute of the IoTDB process</li><li><code>The Time Consumed of Compliation Per Minute</code>: average compilation time per minute</li><li><code>The Number Of Class</code>: The number of classes loaded and unloaded by the JVM</li></ul></li></ul><h3 id="_5-3-iotdb" tabindex="-1"><a class="header-anchor" href="#_5-3-iotdb" aria-hidden="true">#</a> 5.3. IoTDB</h3><h4 id="_5-3-1-iotdb-mapping-relationship-of-metrics" tabindex="-1"><a class="header-anchor" href="#_5-3-1-iotdb-mapping-relationship-of-metrics" aria-hidden="true">#</a> 5.3.1. IoTDB mapping relationship of metrics</h4><table><thead><tr><th>Metric Type</th><th>Mapping</th></tr></thead><tbody><tr><td>Counter</td><td>root.__system.metric.<code>ip:port</code>.name.<code>K1=V1</code>...<code>Kn=Vn</code>.value</td></tr><tr><td>AutoGauge、Gauge</td><td>root.__system.metric.<code>ip:port</code>.name.<code>K1=V1</code>...<code>Kn=Vn</code>.value</td></tr><tr><td>Histogram</td><td>root.__system.metric.<code>ip:port</code>.name.<code>K1=V1</code>...<code>Kn=Vn</code>.count <br> root.__system.metric.<code>ip:port</code>.name.<code>K1=V1</code>...<code>Kn=Vn</code>.max <br> root.__system.metric.<code>ip:port</code>.name.<code>K1=V1</code>...<code>Kn=Vn</code>.sum <br> root.__system.metric.<code>ip:port</code>.name.<code>K1=V1</code>...<code>Kn=Vn</code>.p0 <br> root.__system.metric.<code>ip:port</code>.name.<code>K1=V1</code>...<code>Kn=Vn</code>.p25 <br> root.__system.metric.<code>ip:port</code>.name.<code>K1=V1</code>...<code>Kn=Vn</code>.p50 <br> root.__system.metric.<code>ip:port</code>.name.<code>K1=V1</code>...<code>Kn=Vn</code>.p75 <br> root.__system.metric.<code>ip:port</code>.name.<code>K1=V1</code>...<code>Kn=Vn</code>.p100</td></tr><tr><td>Rate</td><td>root.__system.metric.<code>ip:port</code>.name.<code>K1=V1</code>...<code>Kn=Vn</code>.count <br> root.__system.metric.<code>ip:port</code>.name.<code>K1=V1</code>...<code>Kn=Vn</code>.mean <br> root.__system.metric.<code>ip:port</code>.name.<code>K1=V1</code>...<code>Kn=Vn</code>.m1 <br> root.__system.metric.<code>ip:port</code>.name.<code>K1=V1</code>...<code>Kn=Vn</code>.m5 <br> root.__system.metric.<code>ip:port</code>.name.<code>K1=V1</code>...<code>Kn=Vn</code>.m15</td></tr><tr><td>Timer</td><td>root.__system.metric.<code>ip:port</code>.name.<code>K1=V1</code>...<code>Kn=Vn</code>.count <br> root.__system.metric.<code>ip:port</code>.name.<code>K1=V1</code>...<code>Kn=Vn</code>.max <br> root.__system.metric.<code>ip:port</code>.name.<code>K1=V1</code>...<code>Kn=Vn</code>.mean <br> root.__system.metric.<code>ip:port</code>.name.<code>K1=V1</code>...<code>Kn=Vn</code>.sum <br> root.__system.metric.<code>ip:port</code>.name.<code>K1=V1</code>...<code>Kn=Vn</code>.p0 <br> root.__system.metric.<code>ip:port</code>.name.<code>K1=V1</code>...<code>Kn=Vn</code>.p25 <br> root.__system.metric.<code>ip:port</code>.name.<code>K1=V1</code>...<code>Kn=Vn</code>.p50 <br> root.__system.metric.<code>ip:port</code>.name.<code>K1=V1</code>...<code>Kn=Vn</code>.p75 <br> root.__system.metric.<code>ip:port</code>.name.<code>K1=V1</code>...<code>Kn=Vn</code>.p100 <br> root.__system.metric.<code>ip:port</code>.name.<code>K1=V1</code>...<code>Kn=Vn</code>.m1 <br> root.__system.metric.<code>ip:port</code>.name.<code>K1=V1</code>...<code>Kn=Vn</code>.m5 <br> root.__system.metric.<code>ip:port</code>.name.<code>K1=V1</code>...<code>Kn=Vn</code>.m15</td></tr></tbody></table><h4 id="_5-3-2-obtain-metrics" tabindex="-1"><a class="header-anchor" href="#_5-3-2-obtain-metrics" aria-hidden="true">#</a> 5.3.2. Obtain metrics</h4><p>According to the above mapping relationship, related IoTDB query statements can be formed to obtain metrics</p>',12);function St(t,Kt){const i=r("ExternalLinkIcon");return l(),c("div",null,[u(`
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
`),m,e("p",null,[n("If you want to add your own metrics data in IoTDB, please see the [IoTDB Metric Framework] ("),e("a",p,[n("https://github.com/apache/iotdb/tree/master/metrics"),d(i)]),n(") document.")]),f,_,g,e("table",null,[b,e("tbody",null,[y,T,e("tr",null,[q,e("td",null,'database="'+o(t.database)+'", type="flush"',1),v,k])])]),w,e("table",null,[D,e("tbody",null,[e("tr",null,[C,e("td",null,'name="'+o(t.ip)+":"+o(t.port)+'"',1),I,x]),e("tr",null,[A,e("td",null,'name="'+o(t.ip)+":"+o(t.port)+'",type="ConfigNode/DataNode"',1),G,V])])]),M,e("table",null,[P,e("tbody",null,[S,K,B,N,z,e("tr",null,[R,e("td",null,'name="'+o(t.ip)+":"+o(t.port)+'",type="SchemaRegion"',1),U,j]),e("tr",null,[O,e("td",null,'name="'+o(t.ip)+":"+o(t.port)+'",type="DataRegion"',1),F,L])])]),H,e("table",null,[E,e("tbody",null,[e("tr",null,[J,e("td",null,'name="logDispatcher-'+o(t.IP)+":"+o(t.Port)+'", region="'+o(t.region)+'", type="currentSyncIndex"',1),W,Q]),e("tr",null,[X,e("td",null,'name="logDispatcher-'+o(t.IP)+":"+o(t.Port)+'", region="'+o(t.region)+'", type="cachedRequestInMemoryQueue"',1),Y,Z]),e("tr",null,[$,e("td",null,'name="IoTConsensusServerImpl", region="'+o(t.region)+'", type="searchIndex"',1),ee,te]),e("tr",null,[oe,e("td",null,'name="IoTConsensusServerImpl", region="'+o(t.region)+'", type="safeIndex"',1),ne,ae]),e("tr",null,[ie,e("td",null,'name="iot_consensus", region="'+o(t.region)+'", type="getStateMachineLock"',1),de,se]),e("tr",null,[re,e("td",null,'name="iot_consensus", region="'+o(t.region)+'", type="checkingBeforeWrite"',1),le,ce]),e("tr",null,[ue,e("td",null,'name="iot_consensus", region="'+o(t.region)+'", type="writeStateMachine"',1),he,me]),e("tr",null,[pe,e("td",null,'name="iot_consensus", region="'+o(t.region)+'", type="offerRequestToQueue"',1),fe,_e]),e("tr",null,[ge,e("td",null,'name="iot_consensus", region="'+o(t.region)+'", type="consensusWrite"',1),be,ye]),e("tr",null,[Te,e("td",null,'name="iot_consensus", region="'+o(t.region)+'", type="constructBatch"',1),qe,ve]),e("tr",null,[ke,e("td",null,'name="iot_consensus", region="'+o(t.region)+'", type="syncLogTimePerRequest"',1),we,De])])]),Ce,e("table",null,[Ie,e("tbody",null,[e("tr",null,[xe,e("td",null,'name = "'+o(t.name)+'"',1),Ae,Ge]),e("tr",null,[Ve,e("td",null,'name="'+o(t.interface)+'"',1),Me,Pe]),Se,Ke,Be,Ne,ze,Re,Ue,je])]),Oe,e("table",null,[Fe,e("tbody",null,[e("tr",null,[Le,e("td",null,'name="database_'+o(t.name)+'"',1),He,Ee]),e("tr",null,[Je,e("td",null,'name="chunkMetaData_'+o(t.name)+'"',1),We,Qe]),Xe,Ye,Ze])]),$e,e("table",null,[et,e("tbody",null,[tt,ot,e("tr",null,[nt,e("td",null,'action="'+o(t.action)+'",cause="'+o(t.cause)+'"',1),at,it]),dt,st,rt,lt,ct])]),ut,ht,mt,pt,ft,_t,e("table",null,[gt,e("tbody",null,[e("tr",null,[bt,e("td",null,'name="'+o(t.DatabaseName)+'",type="SchemaRegion/DataRegion"',1),yt,Tt]),e("tr",null,[qt,e("td",null,'name="'+o(t.DatabaseName)+'",type="schemaSlotNumber/dataSlotNumber"',1),vt,kt])])]),wt,e("p",null,[e("a",Dt,[n("Prometheus getting_started"),d(i)])]),e("p",null,[e("a",Ct,[n("Prometheus scrape metrics"),d(i)])]),e("p",null,[e("a",It,[n("Grafana getting_started"),d(i)])]),e("p",null,[e("a",xt,[n("Grafana query metrics from Prometheus"),d(i)])]),At,e("ol",null,[Gt,e("li",null,[n("You can visit "),e("a",Vt,[n("Grafana Dashboard official website"),d(i)]),n(", search for "),Mt,n(" and use")])]),Pt])}const Nt=s(h,[["render",St],["__file","Metric-Tool.html.vue"]]);export{Nt as default};