| import{_ as r,C as d,O as l,P as c,ah as u,Q as t,S as o,U as e,ai as i,aW as n}from"./framework-e4340ccd.js";const m={},h=n('<p>Currently, users can use various methods to monitor the running IoTDB process, including using Java's Jconsole tool to monitor the system status of the running IoTDB process, using the interface developed by IoTDB for users to view data statistics, and using the monitor framework to monitor the system status of the running IoTDB process.</p><h1 id="_1-monitor-framework" tabindex="-1"><a class="header-anchor" href="#_1-monitor-framework" aria-hidden="true">#</a> 1. Monitor Framework</h1><p>Along with IoTDB running, some metrics reflecting current system's status will be collected continuously, which will provide some useful information helping us resolving system problems and detecting potential system risks.</p><h2 id="_1-1-when-to-use-monitor-framework" tabindex="-1"><a class="header-anchor" href="#_1-1-when-to-use-monitor-framework" aria-hidden="true">#</a> 1.1. When to use monitor 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>ThreadPool: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="_1-2-who-will-use-monitor-framework" tabindex="-1"><a class="header-anchor" href="#_1-2-who-will-use-monitor-framework" aria-hidden="true">#</a> 1.2. Who will use monitor 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 more efficiently.</p><h2 id="_1-3-what-metrics-does-iotdb-have" tabindex="-1"><a class="header-anchor" href="#_1-3-what-metrics-does-iotdb-have" aria-hidden="true">#</a> 1.3. What metrics does IoTDB have?</h2><p>For now, we have provided some metrics for several core modules of IoTDB, and more metrics will be added or updated along with the development of new features and optimization or refactoring of architecture.</p><h3 id="_1-3-1-key-concept" tabindex="-1"><a class="header-anchor" href="#_1-3-1-key-concept" aria-hidden="true">#</a> 1.3.1. Key Concept</h3><p>Before step into next, we'd better stop to have a look into some key concepts about metrics.</p><p>Every metric data has two properties</p><ul><li><p>Metric Name</p><p>The name of this metric,for example, <code>logback_events_total</code> indicates the total count of log events。</p></li><li><p>Tag</p><p>Each metric could have 0 or several sub classes (Tag), for the same example, the <code>logback_events_total</code> metric has a sub class named <code>level</code>, which means <code>the total count of log events at the specific level</code></p></li></ul><h3 id="_1-3-2-data-format" tabindex="-1"><a class="header-anchor" href="#_1-3-2-data-format" aria-hidden="true">#</a> 1.3.2. Data Format</h3><p>IoTDB provides metrics data both in JMX and Prometheus format. For JMX, you can get these metrics via <code>org.apache.iotdb.metrics</code>.</p><p>Next, we will choose Prometheus format data as samples to describe each kind of metric.</p><h3 id="_1-3-3-iotdb-metrics" tabindex="-1"><a class="header-anchor" href="#_1-3-3-iotdb-metrics" aria-hidden="true">#</a> 1.3.3. IoTDB Metrics</h3><h4 id="_1-3-3-1-api" tabindex="-1"><a class="header-anchor" href="#_1-3-3-1-api" aria-hidden="true">#</a> 1.3.3.1. API</h4>',19),p=t("thead",null,[t("tr",null,[t("th",null,"Metric"),t("th",null,"Tag"),t("th",null,"level"),t("th",null,"Description"),t("th",null,"Sample")])],-1),_=t("td",null,"entry_seconds_count",-1),f=t("td",null,"important",-1),b=t("td",null,"The total request count of the interface",-1),v=t("td",null,'entry_seconds_count{name="openSession",} 1.0',-1),g=t("td",null,"entry_seconds_sum",-1),y=t("td",null,"important",-1),q=t("td",null,"The total cost seconds of the interface",-1),k=t("td",null,'entry_seconds_sum{name="openSession",} 0.024',-1),T=t("td",null,"entry_seconds_max",-1),w=t("td",null,"important",-1),x=t("td",null,"The max latency of the interface",-1),I=t("td",null,'entry_seconds_max{name="openSession",} 0.024',-1),M=t("tr",null,[t("td",null,"quantity_total"),t("td",null,'name="pointsIn"'),t("td",null,"important"),t("td",null,"The total points inserted into IoTDB"),t("td",null,'quantity_total{name="pointsIn",} 1.0')],-1),D=t("td",null,"thrift_connections",-1),S=t("td",null,"core",-1),C=t("td",null,"current number of thrift connections",-1),j=t("td",null,'thrift_connections{name="RPC",} 1.0',-1),E=n('<h4 id="_1-3-3-2-task" tabindex="-1"><a class="header-anchor" href="#_1-3-3-2-task" aria-hidden="true">#</a> 1.3.3.2. Task</h4><table><thead><tr><th>Metric</th><th>Tag</th><th>level</th><th>Description</th><th>Sample</th></tr></thead><tbody><tr><td>queue</td><td>name="compaction_inner/compaction_cross/flush",<br>status="running/waiting"</td><td>important</td><td>The count of current tasks in running and waiting status</td><td>queue{name="flush",status="waiting",} 0.0<br>queue{name="flush",status="running",} 0.0</td></tr><tr><td>cost_task_seconds_count</td><td>name="compaction/flush"</td><td>important</td><td>The total count of tasks occurs till now</td><td>cost_task_seconds_count{name="flush",} 1.0</td></tr><tr><td>cost_task_seconds_max</td><td>name="compaction/flush"</td><td>important</td><td>The seconds of the longest task takes till now</td><td>cost_task_seconds_max{name="flush",} 0.363</td></tr><tr><td>cost_task_seconds_sum</td><td>name="compaction/flush"</td><td>important</td><td>The total cost seconds of all tasks till now</td><td>cost_task_seconds_sum{name="flush",} 0.363</td></tr><tr><td>data_written_total</td><td>name="compaction", <br>type="aligned/not-aligned/total"</td><td>important</td><td>The size of data written in compaction</td><td>data_written{name="compaction",type="total",} 10240</td></tr><tr><td>data_read_total</td><td>name="compaction"</td><td>important</td><td>The size of data read in compaction</td><td>data_read={name="compaction",} 10240</td></tr></tbody></table><h4 id="_1-3-3-3-memory-usage" tabindex="-1"><a class="header-anchor" href="#_1-3-3-3-memory-usage" aria-hidden="true">#</a> 1.3.3.3. Memory Usage</h4><table><thead><tr><th>Metric</th><th>Tag</th><th>level</th><th>Description</th><th>Sample</th></tr></thead><tbody><tr><td>mem</td><td>name="chunkMetaData/storageGroup/schemaUsage/schemaRemaining"</td><td>important</td><td>Current memory size of chunkMetaData/storageGroup/schema usage/schema remaining memory in bytes</td><td>mem{name="chunkMetaData",} 2050.0</td></tr></tbody></table><h4 id="_1-3-3-4-cache" tabindex="-1"><a class="header-anchor" href="#_1-3-3-4-cache" aria-hidden="true">#</a> 1.3.3.4. Cache</h4><table><thead><tr><th>Metric</th><th>Tag</th><th>level</th><th>Description</th><th>Sample</th></tr></thead><tbody><tr><td>cache_hit</td><td>name="chunk/timeSeriesMeta/bloomFilter"</td><td>important</td><td>Cache hit ratio of chunk/timeSeriesMeta and prevention ratio of bloom filter</td><td>cache_hit{name="chunk",} 80</td></tr></tbody></table><h4 id="_1-3-3-5-business-data" tabindex="-1"><a class="header-anchor" href="#_1-3-3-5-business-data" aria-hidden="true">#</a> 1.3.3.5. Business Data</h4>',7),P=t("thead",null,[t("tr",null,[t("th",null,"Metric"),t("th",null,"Tag"),t("th",null,"level"),t("th",null,"Description"),t("th",null,"Sample")])],-1),B=t("tr",null,[t("td",null,"quantity"),t("td",null,'name="timeSeries/storageGroup/device/deviceUsingTemplate", type="total/normal/template/template"'),t("td",null,"important"),t("td",null,"The current count of timeSeries/storageGroup/devices/devices using template in IoTDB"),t("td",null,'quantity{name="timeSeries",type="normal"} 1.0')],-1),G=t("td",null,"points",-1),A=t("td",null,"core",-1),z=t("td",null,"The point number of last flushed memtable",-1),L=t("td",null,'quantity{name="memtable",type="flush"} 1.0',-1),N=t("h4",{id:"_1-3-3-6-cluster",tabindex:"-1"},[t("a",{class:"header-anchor",href:"#_1-3-3-6-cluster","aria-hidden":"true"},"#"),e(" 1.3.3.6. Cluster")],-1),O=t("thead",null,[t("tr",null,[t("th",null,"Metric"),t("th",null,"Tag"),t("th",null,"level"),t("th",null,"Description"),t("th",null,"Sample")])],-1),R=t("td",null,"cluster_node_leader_count",-1),J=t("td",null,"important",-1),F=t("td",null,[e("The count of "),t("code",null,"dataGroupLeader"),e(" on each node, which reflects the distribution of leaders")],-1),U=t("td",null,'cluster_node_leader_count{name="127.0.0.1",} 2.0',-1),H=t("td",null,"cluster_uncommitted_log",-1),Y=t("td",null,"important",-1),V=t("td",null,[e("The count of "),t("code",null,"uncommitted_log"),e(" on each node in data groups it belongs to")],-1),W=t("td",null,'cluster_uncommitted_log{name="127.0.0.1_Data-127.0.0.1-40010-raftId-0",} 0.0',-1),X=t("td",null,"cluster_node_status",-1),K=t("td",null,"important",-1),Q=t("td",null,"The current node status, 1=online 2=offline",-1),Z=t("td",null,'cluster_node_status{name="127.0.0.1",} 1.0',-1),$=t("td",null,"cluster_elect_total",-1),tt=t("td",null,"important",-1),et=t("td",null,"The count and result (won or failed) of elections the node participated in.",-1),at=t("td",null,'cluster_elect_total{name="127.0.0.1",status="win",} 1.0',-1),ot=n('<h3 id="_1-3-4-iotdb-predefined-metrics-set" tabindex="-1"><a class="header-anchor" href="#_1-3-4-iotdb-predefined-metrics-set" aria-hidden="true">#</a> 1.3.4. IoTDB PreDefined Metrics Set</h3><p>Users can modify the value of <code>predefinedMetrics</code> in the <code>iotdb-metric.yml</code> file to enable the predefined set of metrics,now support <code>JVM</code>, <code>LOGBACK</code>, <code>FILE</code>, <code>PROCESS</code>, <code>SYSYTEM</code>.</p><h4 id="_1-3-4-1-jvm" tabindex="-1"><a class="header-anchor" href="#_1-3-4-1-jvm" aria-hidden="true">#</a> 1.3.4.1. JVM</h4><h5 id="_1-3-4-1-1-threads" tabindex="-1"><a class="header-anchor" href="#_1-3-4-1-1-threads" aria-hidden="true">#</a> 1.3.4.1.1. Threads</h5><table><thead><tr><th>Metric</th><th>Tag</th><th>level</th><th>Description</th><th>Sample</th></tr></thead><tbody><tr><td>jvm_threads_live_threads</td><td>None</td><td>Important</td><td>The current count of threads</td><td>jvm_threads_live_threads 25.0</td></tr><tr><td>jvm_threads_daemon_threads</td><td>None</td><td>Important</td><td>The current count of daemon threads</td><td>jvm_threads_daemon_threads 12.0</td></tr><tr><td>jvm_threads_peak_threads</td><td>None</td><td>Important</td><td>The max count of threads till now</td><td>jvm_threads_peak_threads 28.0</td></tr><tr><td>jvm_threads_states_threads</td><td>state="runnable/blocked/waiting/timed-waiting/new/terminated"</td><td>Important</td><td>The count of threads in each status</td><td>jvm_threads_states_threads{state="runnable",} 10.0</td></tr></tbody></table><h5 id="_1-3-4-1-2-gc" tabindex="-1"><a class="header-anchor" href="#_1-3-4-1-2-gc" aria-hidden="true">#</a> 1.3.4.1.2. GC</h5><table><thead><tr><th>Metric</th><th>Tag</th><th>level</th><th>Description</th><th>Sample</th></tr></thead><tbody><tr><td>jvm_gc_pause_seconds_count</td><td>action="end of major GC/end of minor GC",cause="xxxx"</td><td>Important</td><td>The total count of YGC/FGC events and its cause</td><td>jvm_gc_pause_seconds_count{action="end of major GC",cause="Metadata GC Threshold",} 1.0</td></tr><tr><td>jvm_gc_pause_seconds_sum</td><td>action="end of major GC/end of minor GC",cause="xxxx"</td><td>Important</td><td>The total cost seconds of YGC/FGC and its cause</td><td>jvm_gc_pause_seconds_sum{action="end of major GC",cause="Metadata GC Threshold",} 0.03</td></tr><tr><td>jvm_gc_pause_seconds_max</td><td>action="end of major GC",cause="Metadata GC Threshold"</td><td>Important</td><td>The max cost seconds of YGC/FGC till now and its cause</td><td>jvm_gc_pause_seconds_max{action="end of major GC",cause="Metadata GC Threshold",} 0.0</td></tr><tr><td>jvm_gc_memory_promoted_bytes_total</td><td>None</td><td>Important</td><td>Count of positive increases in the size of the old generation memory pool before GC to after GC</td><td>jvm_gc_memory_promoted_bytes_total 8425512.0</td></tr><tr><td>jvm_gc_max_data_size_bytes</td><td>None</td><td>Important</td><td>Max size of long-lived heap memory pool</td><td>jvm_gc_max_data_size_bytes 2.863661056E9</td></tr><tr><td>jvm_gc_live_data_size_bytes</td><td>None</td><td>Important</td><td>Size of long-lived heap memory pool after reclamation</td><td>jvm_gc_live_data_size_bytes 8450088.0</td></tr><tr><td>jvm_gc_memory_allocated_bytes_total</td><td>None</td><td>Important</td><td>Incremented for an increase in the size of the (young) heap memory pool after one GC to before the next</td><td>jvm_gc_memory_allocated_bytes_total 4.2979144E7</td></tr></tbody></table><h5 id="_1-3-4-1-3-memory" tabindex="-1"><a class="header-anchor" href="#_1-3-4-1-3-memory" aria-hidden="true">#</a> 1.3.4.1.3. Memory</h5>',8),nt=t("table",null,[t("thead",null,[t("tr",null,[t("th",null,"Metric"),t("th",null,"Tag"),t("th",null,"level"),t("th",null,"Description"),t("th",null,"Sample")])]),t("tbody",null,[t("tr",null,[t("td",null,"jvm_buffer_memory_used_bytes"),t("td",null,'id="direct/mapped"'),t("td",null,"Important"),t("td",null,"An estimate of the memory that the Java virtual machine is using for this buffer pool"),t("td",null,'jvm_buffer_memory_used_bytes{id="direct",} 3.46728099E8')]),t("tr",null,[t("td",null,"jvm_buffer_total_capacity_bytes"),t("td",null,'id="direct/mapped"'),t("td",null,"Important"),t("td",null,"An estimate of the total capacity of the buffers in this pool"),t("td",null,'jvm_buffer_total_capacity_bytes{id="mapped",} 0.0')]),t("tr",null,[t("td",null,"jvm_buffer_count_buffers"),t("td",null,'id="direct/mapped"'),t("td",null,"Important"),t("td",null,"An estimate of the number of buffers in the pool"),t("td",null,'jvm_buffer_count_buffers{id="direct",} 183.0')]),t("tr",null,[t("td",null,"jvm_memory_committed_bytes"),t("td",{area:'heap/nonheap,id="xxx",'}),t("td",null,"Important"),t("td",null,"The amount of memory in bytes that is committed for the Java virtual machine to use"),t("td",null,[e('jvm_memory_committed_bytes{area="heap",id="Par Survivor Space",} 2.44252672E8'),t("br"),e('jvm_memory_committed_bytes{area="nonheap",id="Metaspace",} 3.9051264E7'),t("br")])]),t("tr",null,[t("td",null,"jvm_memory_max_bytes"),t("td",{area:'heap/nonheap,id="xxx",'}),t("td",null,"Important"),t("td",null,"The maximum amount of memory in bytes that can be used for memory management"),t("td",null,[e('jvm_memory_max_bytes{area="heap",id="Par Survivor Space",} 2.44252672E8'),t("br"),e('jvm_memory_max_bytes{area="nonheap",id="Compressed Class Space",} 1.073741824E9')])]),t("tr",null,[t("td",null,"jvm_memory_used_bytes"),t("td",{area:'heap/nonheap,id="xxx",'}),t("td",null,"Important"),t("td",null,"The amount of used memory"),t("td",null,[e('jvm_memory_used_bytes{area="heap",id="Par Eden Space",} 1.000128376E9'),t("br"),e('jvm_memory_used_bytes{area="nonheap",id="Code Cache",} 2.9783808E7'),t("br")])])])],-1),st=t("h5",{id:"_1-3-4-1-4-classes",tabindex:"-1"},[t("a",{class:"header-anchor",href:"#_1-3-4-1-4-classes","aria-hidden":"true"},"#"),e(" 1.3.4.1.4. Classes")],-1),it=t("table",null,[t("thead",null,[t("tr",null,[t("th",null,"Metric"),t("th",null,"Tag"),t("th",null,"level"),t("th",null,"Description"),t("th",null,"Sample")])]),t("tbody",null,[t("tr",null,[t("td",null,"jvm_classes_unloaded_classes_total"),t("td",null,"None"),t("td",null,"Important"),t("td",null,"The total number of classes unloaded since the Java virtual machine has started execution"),t("td",null,"jvm_classes_unloaded_classes_total 680.0")]),t("tr",null,[t("td",null,"jvm_classes_loaded_classes"),t("td",null,"None"),t("td",null,"Important"),t("td",null,"The number of classes that are currently loaded in the Java virtual machine"),t("td",null,"jvm_classes_loaded_classes 5975.0")]),t("tr",null,[t("td",null,"jvm_compilation_time_ms_total"),t("td",{compiler:"HotSpot 64-Bit Tiered Compilers,"}),t("td",null,"Important"),t("td",null,"The approximate accumulated elapsed time spent in compilation"),t("td",null,'jvm_compilation_time_ms_total{compiler="HotSpot 64-Bit Tiered Compilers",} 107092.0')])])],-1),rt=n('<h4 id="_1-3-4-2-file" tabindex="-1"><a class="header-anchor" href="#_1-3-4-2-file" aria-hidden="true">#</a> 1.3.4.2. File</h4><table><thead><tr><th>Metric</th><th>Tag</th><th>level</th><th>Description</th><th>Sample</th></tr></thead><tbody><tr><td>file_size</td><td>name="wal/seq/unseq"</td><td>important</td><td>The current file size of wal/seq/unseq in bytes</td><td>file_size{name="wal",} 67.0</td></tr><tr><td>file_count</td><td>name="wal/seq/unseq"</td><td>important</td><td>The current count of wal/seq/unseq files</td><td>file_count{name="seq",} 1.0</td></tr></tbody></table><h4 id="_1-3-4-3-logback" tabindex="-1"><a class="header-anchor" href="#_1-3-4-3-logback" aria-hidden="true">#</a> 1.3.4.3. Logback</h4>',3),dt=t("table",null,[t("thead",null,[t("tr",null,[t("th",null,"Metric"),t("th",null,"Tag"),t("th",null,"level"),t("th",null,"Description"),t("th",null,"示例")])]),t("tbody",null,[t("tr",null,[t("td",null,"logback_events_total"),t("td",{level:"trace/debug/info/warn/error,"}),t("td",null,"Important"),t("td",null,"The count of trace/debug/info/warn/error log events till now"),t("td",null,'logback_events_total{level="warn",} 0.0')])])],-1),lt=n('<h4 id="_1-3-4-4-process" tabindex="-1"><a class="header-anchor" href="#_1-3-4-4-process" aria-hidden="true">#</a> 1.3.4.4. Process</h4><table><thead><tr><th>Metric</th><th>Tag</th><th>level</th><th>Description</th><th>示例</th></tr></thead><tbody><tr><td>process_cpu_load</td><td>name="cpu"</td><td>core</td><td>current process CPU Usage (%)</td><td>process_cpu_load{name="process",} 5.0</td></tr><tr><td>process_cpu_time</td><td>name="cpu"</td><td>core</td><td>total Process CPU Time Occupied (ns)</td><td>process_cpu_time{name="process",} 3.265625E9</td></tr><tr><td>process_max_mem</td><td>name="memory"</td><td>core</td><td>The maximum available memory for the JVM</td><td>process_max_mem{name="process",} 3.545759744E9</td></tr><tr><td>process_used_mem</td><td>name="memory"</td><td>core</td><td>The current available memory for the JVM</td><td>process_used_mem{name="process",} 4.6065456E7</td></tr><tr><td>process_total_mem</td><td>name="memory"</td><td>core</td><td>The current requested memory for the JVM</td><td>process_total_mem{name="process",} 2.39599616E8</td></tr><tr><td>process_free_mem</td><td>name="memory"</td><td>core</td><td>The free available memory for the JVM</td><td>process_free_mem{name="process",} 1.94035584E8</td></tr><tr><td>process_mem_ratio</td><td>name="memory"</td><td>core</td><td>Memory footprint ratio of process</td><td>process_mem_ratio{name="process",} 0.0</td></tr><tr><td>process_threads_count</td><td>name="process"</td><td>core</td><td>The current number of threads</td><td>process_threads_count{name="process",} 11.0</td></tr><tr><td>process_status</td><td>name="process"</td><td>core</td><td>The process survivor status, 1.0 means survivorship, and 0.0 means terminated</td><td>process_status{name="process",} 1.0</td></tr></tbody></table><h4 id="_1-3-4-5-system" tabindex="-1"><a class="header-anchor" href="#_1-3-4-5-system" aria-hidden="true">#</a> 1.3.4.5. System</h4><table><thead><tr><th>Metric</th><th>Tag</th><th>level</th><th>Description</th><th>示例</th></tr></thead><tbody><tr><td>sys_cpu_load</td><td>name="cpu"</td><td>core</td><td>current system CPU Usage(%)</td><td>sys_cpu_load{name="system",} 15.0</td></tr><tr><td>sys_cpu_cores</td><td>name="cpu"</td><td>core</td><td>available CPU cores</td><td>sys_cpu_cores{name="system",} 16.0</td></tr><tr><td>sys_total_physical_memory_size</td><td>name="memory"</td><td>core</td><td>Maximum physical memory of system</td><td>sys_total_physical_memory_size{name="system",} 1.5950999552E10</td></tr><tr><td>sys_free_physical_memory_size</td><td>name="memory"</td><td>core</td><td>The current available memory of system</td><td>sys_free_physical_memory_size{name="system",} 4.532396032E9</td></tr><tr><td>sys_total_swap_space_size</td><td>name="memory"</td><td>core</td><td>The maximum swap area of system</td><td>sys_total_swap_space_size{name="system",} 2.1051273216E10</td></tr><tr><td>sys_free_swap_space_size</td><td>name="memory"</td><td>core</td><td>The available swap area of system</td><td>sys_free_swap_space_size{name="system",} 2.931576832E9</td></tr><tr><td>sys_committed_vm_size</td><td>name="memory"</td><td>important</td><td>the amount of virtual memory available to running processes</td><td>sys_committed_vm_size{name="system",} 5.04344576E8</td></tr><tr><td>sys_disk_total_space</td><td>name="disk"</td><td>core</td><td>The total disk space</td><td>sys_disk_total_space{name="system",} 5.10770798592E11</td></tr><tr><td>sys_disk_free_space</td><td>name="disk"</td><td>core</td><td>The available disk space</td><td>sys_disk_free_space{name="system",} 3.63467845632E11</td></tr></tbody></table><h3 id="_1-3-5-add-custom-metrics" tabindex="-1"><a class="header-anchor" href="#_1-3-5-add-custom-metrics" aria-hidden="true">#</a> 1.3.5. Add custom metrics</h3>',5),ct={href:"https://github.com/apache/iotdb/tree/master/metrics",target:"_blank",rel:"noopener noreferrer"},ut=n("<li>Metric embedded point definition rules <ul><li><code>Metric</code>: The name of the monitoring item. For example, <code>entry_seconds_count</code> is the cumulative number of accesses to the interface, and <code>file_size</code> is the total number of files.</li><li><code>Tags</code>: Key-Value pair, used to identify monitored items, optional <ul><li><code>name = xxx</code>: The name of the monitored item. For example, for the monitoring item<code>entry_seconds_count</code>, the meaning of name is the name of the monitored interface.</li><li><code>status = xxx</code>: The status of the monitored item is subdivided. For example, the monitoring item of the monitoring task can use this parameter to separate the running task and the stopped task.</li><li><code>user = xxx</code>: The monitored item is related to a specific user, such as the total number of writes by the root user.</li><li>Customize for the situation...</li></ul></li></ul></li><li>Monitoring indicator level meaning: <ul><li>The default startup level for online operation is <code>Important</code> level, the default startup level for offline debugging is <code>Normal</code> level, and the audit strictness is <code>Core > Important > Normal > All</code></li><li><code>Core</code>: The core indicator of the system, used by the <strong>operation and maintenance personnel</strong>, which is related to the performance, stability, and security** of the system, such as the status of the instance, the load of the system, etc.</li><li><code>Important</code>: An important indicator 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>: General indicators 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 indicators 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>",2),mt=n(`<h2 id="_1-4-how-to-get-these-metrics" tabindex="-1"><a class="header-anchor" href="#_1-4-how-to-get-these-metrics" aria-hidden="true">#</a> 1.4. How to get these metrics?</h2><p>The metrics collection switch is disabled by default,you need to enable it from <code>conf/iotdb-metric.yml</code>, Currently, it also supports hot loading via <code>load configuration</code> after startup.</p><h3 id="_1-4-1-iotdb-metric-yml" tabindex="-1"><a class="header-anchor" href="#_1-4-1-iotdb-metric-yml" aria-hidden="true">#</a> 1.4.1. Iotdb-metric.yml</h3><div class="language-yaml line-numbers-mode" data-ext="yml"><pre class="language-yaml"><code><span class="token comment"># whether enable the module</span> |
| `),h,t("table",null,[p,t("tbody",null,[t("tr",null,[_,t("td",null,'name="'+o(a.interface)+'"',1),f,b,v]),t("tr",null,[g,t("td",null,'name="'+o(a.interface)+'"',1),y,q,k]),t("tr",null,[T,t("td",null,'name="'+o(a.interface)+'"',1),w,x,I]),M,t("tr",null,[D,t("td",null,'name="'+o(a.thriftService)+'"',1),S,C,j])])]),E,t("table",null,[P,t("tbody",null,[B,t("tr",null,[G,t("td",null,'sg="'+o(a.storageGroup)+'", type="flush"',1),A,z,L])])]),N,t("table",null,[O,t("tbody",null,[t("tr",null,[R,t("td",null,'name="'+o(a.ip)+'"',1),J,F,U]),t("tr",null,[H,t("td",null,'name="'+o(a.ip_datagroupHeader)+'"',1),Y,V,W]),t("tr",null,[X,t("td",null,'name="'+o(a.ip)+'"',1),K,Q,Z]),t("tr",null,[$,t("td",null,'name="'+o(a.ip)+'",status="fail/win"',1),tt,et,at])])]),ot,nt,st,it,rt,dt,lt,t("ul",null,[t("li",null,[e("If you want to add your own metrics data in IoTDB, please see the [IoTDB Metric Framework] ("),t("a",ct,[e("https://github.com/apache/iotdb/tree/master/metrics"),i(s)]),e(") document.")]),ut]),mt,t("p",null,[t("a",ht,[e("Prometheus getting_started"),i(s)])]),t("p",null,[t("a",pt,[e("Prometheus scrape metrics"),i(s)])]),t("p",null,[t("a",_t,[e("Grafana getting_started"),i(s)])]),t("p",null,[t("a",ft,[e("Grafana query metrics from Prometheus"),i(s)])]),bt,vt,gt,yt,t("ol",null,[qt,t("li",null,[e("You can visit "),t("a",kt,[e("Grafana Dashboard official website"),i(s)]),e(", search for "),Tt,e(" and use")])]),wt,xt,t("p",null,[e("After starting JConsole tool and connecting to IoTDB server, a basic look at IoTDB system status(CPU Occupation, in-memory information, etc.) is provided. See "),t("a",It,[e("official documentation"),i(s)]),e(" for more information.")]),Mt])}const jt=r(m,[["render",Dt],["__file","Metric-Tool.html.vue"]]);export{jt as default}; |