| import{_ as s,r,o as l,c,a as u,d as e,e as n,b as d,t as o,f as a}from"./app-wIgiOADQ.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'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 "no space left on device" 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'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 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,[n("Core-level metrics are enabled by default during system operation. The addition of each Core-level metrics needs to be"),e("br"),n(" 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="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-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="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><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),X=e("td",null,"The sync index of synchronization thread in replica group",-1),Y=e("td",null,"mutli_leader",-1),Q=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="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 SSchemaPartition 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 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),Xe=e("td",null,"The memory usage of chunkMetaData when writting TsFile, Unit: byte",-1),Ye=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),Qe=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="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>cost_task</td><td>name="inner_compaction/cross_compaction/flush"</td><td>Gauge</td><td>The time consumed of compaction 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>queue</td><td>name="Sub_RawQuery",status="running/waiting"</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="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-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="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-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="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-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="trace/debug/info/warn/error"</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="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-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<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 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<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{k1="V1", ..., Kn="Vn"} value</td></tr><tr><td>AutoGauge、Gauge</td><td>name{k1="V1", ..., Kn="Vn"} value</td></tr><tr><td>Histogram</td><td>name_max{k1="V1", ..., Kn="Vn"} value <br> name_sum{k1="V1", ..., Kn="Vn"} value <br> name_count{k1="V1", ..., Kn="Vn"} value <br> name{k1="V1", ..., Kn="Vn", quantile="0.0"} value <br> name{k1="V1", ..., Kn="Vn", quantile="0.25"} value <br> name{k1="V1", ..., Kn="Vn", quantile="0.5"} value <br> name{k1="V1", ..., Kn="Vn", quantile="0.75"} value <br> name{k1="V1", ..., Kn="Vn", quantile="1.0"} value</td></tr><tr><td>Rate</td><td>name_total{k1="V1", ..., Kn="Vn"} value <br> name_total{k1="V1", ..., Kn="Vn", rate="m1"} value <br> name_total{k1="V1", ..., Kn="Vn", rate="m5"} value <br> name_total{k1="V1", ..., Kn="Vn", rate="m15"} value <br> name_total{k1="V1", ..., Kn="Vn", rate="mean"} value</td></tr><tr><td>Timer</td><td>name_seconds_max{k1="V1", ..., Kn="Vn"} value <br> name_seconds_sum{k1="V1", ..., Kn="Vn"} value <br> name_seconds_count{k1="V1", ..., Kn="Vn"} value <br> name_seconds{k1="V1", ..., Kn="Vn", quantile="0.0"} value <br> name_seconds{k1="V1", ..., Kn="Vn", quantile="0.25"} value <br> name_seconds{k1="V1", ..., Kn="Vn", quantile="0.5"} value <br> name_seconds{k1="V1", ..., Kn="Vn", quantile="0.75"} value <br> name_seconds{k1="V1", ..., Kn="Vn", quantile="1.0"} 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> |
| `),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,X]),e("tr",null,[Y,e("td",null,'name="logDispatcher-'+o(t.IP)+":"+o(t.Port)+'", region="'+o(t.region)+'", type="cachedRequestInMemoryQueue"',1),Q,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,Xe]),Ye,Qe,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"),Mt,n(" for "),Pt,n(" and use")])]),St])}const zt=s(h,[["render",Kt],["__file","Metric-Tool.html.vue"]]);export{zt as default}; |