blob: 6a10b298d07521168eeb867b268b1c97d692ff6c [file] [log] [blame]
(window.webpackJsonp=window.webpackJsonp||[]).push([[314],{710:function(t,e,a){"use strict";a.r(e);var s=a(29),_=Object(s.a)({},(function(){var t=this,e=t._self._c;return e("ContentSlotsDistributor",{attrs:{"slot-key":t.$parent.slotKey}},[e("h2",{attrs:{id:"_1-what-is-metrics"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_1-what-is-metrics"}},[t._v("#")]),t._v(" 1. What is metrics?")]),t._v(" "),e("p",[t._v("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.")]),t._v(" "),e("h2",{attrs:{id:"_2-when-to-use-metrics"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_2-when-to-use-metrics"}},[t._v("#")]),t._v(" 2. When to use metrics?")]),t._v(" "),e("p",[t._v("Belows are some typical application scenarios")]),t._v(" "),e("ol",[e("li",[e("p",[t._v("System is running slowly")]),t._v(" "),e("p",[t._v("When system is running slowly, we always hope to have information about system's running status as detail as possible, such as")]),t._v(" "),e("ul",[e("li",[t._v("JVM:Is there FGC?How long does it cost?How much does the memory usage decreased after GC?Are there lots of threads?")]),t._v(" "),e("li",[t._v("System:Is the CPU usage too hi?Are there many disk IOs?")]),t._v(" "),e("li",[t._v("Connections:How many connections are there in the current time?")]),t._v(" "),e("li",[t._v("Interface:What is the TPS and latency of every interface?")]),t._v(" "),e("li",[t._v("ThreadPool:Are there many pending tasks?")]),t._v(" "),e("li",[t._v("Cache Hit Ratio")])])]),t._v(" "),e("li",[e("p",[t._v("No space left on device")]),t._v(" "),e("p",[t._v('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.')])]),t._v(" "),e("li",[e("p",[t._v("Is the system running in abnormal status")]),t._v(" "),e("p",[t._v("We could use the count of error logs、the alive status of nodes in cluster, etc, to determine whether the system is running abnormally.")])])]),t._v(" "),e("h2",{attrs:{id:"_3-who-will-use-metrics"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_3-who-will-use-metrics"}},[t._v("#")]),t._v(" 3. Who will use metrics?")]),t._v(" "),e("p",[t._v("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.")]),t._v(" "),e("h2",{attrs:{id:"_4-what-metrics-does-iotdb-have"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_4-what-metrics-does-iotdb-have"}},[t._v("#")]),t._v(" 4. What metrics does IoTDB have?")]),t._v(" "),e("p",[t._v("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.")]),t._v(" "),e("h3",{attrs:{id:"_4-1-key-concept"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_4-1-key-concept"}},[t._v("#")]),t._v(" 4.1. Key Concept")]),t._v(" "),e("p",[t._v("Before step into next, we'd better stop to have a look into some key concepts about metrics.")]),t._v(" "),e("p",[t._v("Every metric data has two properties")]),t._v(" "),e("ul",[e("li",[e("p",[t._v("Metric Name")]),t._v(" "),e("p",[t._v("The name of this metric,for example, "),e("code",[t._v("logback_events_total")]),t._v(" indicates the total count of log events。")])]),t._v(" "),e("li",[e("p",[t._v("Tag")]),t._v(" "),e("p",[t._v("Each metric could have 0 or several sub classes (Tag), for the same example, the "),e("code",[t._v("logback_events_total")]),t._v(" metric has a sub class named "),e("code",[t._v("level")]),t._v(", which means "),e("code",[t._v("the total count of log events at the specific level")])])])]),t._v(" "),e("h3",{attrs:{id:"_4-2-data-format"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_4-2-data-format"}},[t._v("#")]),t._v(" 4.2. Data Format")]),t._v(" "),e("p",[t._v("IoTDB provides metrics data both in JMX and Prometheus format. For JMX, you can get these metrics via "),e("code",[t._v("org.apache.iotdb.metrics")]),t._v(".")]),t._v(" "),e("p",[t._v("Next, we will choose Prometheus format data as samples to describe each kind of metric.")]),t._v(" "),e("h3",{attrs:{id:"_4-3-iotdb-metrics"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_4-3-iotdb-metrics"}},[t._v("#")]),t._v(" 4.3. IoTDB Metrics")]),t._v(" "),e("h4",{attrs:{id:"_4-3-1-api"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_4-3-1-api"}},[t._v("#")]),t._v(" 4.3.1. API")]),t._v(" "),e("table",[e("thead",[e("tr",[e("th",[t._v("Metric")]),t._v(" "),e("th",[t._v("Tag")]),t._v(" "),e("th",[t._v("level")]),t._v(" "),e("th",[t._v("Description")]),t._v(" "),e("th",[t._v("Sample")])])]),t._v(" "),e("tbody",[e("tr",[e("td",[t._v("entry_seconds_count")]),t._v(" "),e("td",[t._v('name="interface name"')]),t._v(" "),e("td",[t._v("important")]),t._v(" "),e("td",[t._v("The total request count of the interface")]),t._v(" "),e("td",[t._v('entry_seconds_count{name="openSession",} 1.0')])]),t._v(" "),e("tr",[e("td",[t._v("entry_seconds_sum")]),t._v(" "),e("td",[t._v('name="interface name"')]),t._v(" "),e("td",[t._v("important")]),t._v(" "),e("td",[t._v("The total cost seconds of the interface")]),t._v(" "),e("td",[t._v('entry_seconds_sum{name="openSession",} 0.024')])]),t._v(" "),e("tr",[e("td",[t._v("entry_seconds_max")]),t._v(" "),e("td",[t._v('name="interface name"')]),t._v(" "),e("td",[t._v("important")]),t._v(" "),e("td",[t._v("The max latency of the interface")]),t._v(" "),e("td",[t._v('entry_seconds_max{name="openSession",} 0.024')])]),t._v(" "),e("tr",[e("td",[t._v("quantity_total")]),t._v(" "),e("td",[t._v('name="pointsIn"')]),t._v(" "),e("td",[t._v("important")]),t._v(" "),e("td",[t._v("The total points inserted into IoTDB")]),t._v(" "),e("td",[t._v('quantity_total{name="pointsIn",} 1.0')])])])]),t._v(" "),e("h4",{attrs:{id:"_4-3-2-task"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_4-3-2-task"}},[t._v("#")]),t._v(" 4.3.2. Task")]),t._v(" "),e("table",[e("thead",[e("tr",[e("th",[t._v("Metric")]),t._v(" "),e("th",[t._v("Tag")]),t._v(" "),e("th",[t._v("level")]),t._v(" "),e("th",[t._v("Description")]),t._v(" "),e("th",[t._v("Sample")])])]),t._v(" "),e("tbody",[e("tr",[e("td",[t._v("queue")]),t._v(" "),e("td",[t._v('name="compaction_inner/compaction_cross/flush",'),e("br"),t._v('status="running/waiting"')]),t._v(" "),e("td",[t._v("important")]),t._v(" "),e("td",[t._v("The count of current tasks in running and waiting status")]),t._v(" "),e("td",[t._v('queue{name="flush",status="waiting",} 0.0'),e("br"),t._v('queue{name="flush",status="running",} 0.0')])]),t._v(" "),e("tr",[e("td",[t._v("cost_task_seconds_count")]),t._v(" "),e("td",[t._v('name="compaction/flush"')]),t._v(" "),e("td",[t._v("important")]),t._v(" "),e("td",[t._v("The total count of tasks occurs till now")]),t._v(" "),e("td",[t._v('cost_task_seconds_count{name="flush",} 1.0')])]),t._v(" "),e("tr",[e("td",[t._v("cost_task_seconds_max")]),t._v(" "),e("td",[t._v('name="compaction/flush"')]),t._v(" "),e("td",[t._v("important")]),t._v(" "),e("td",[t._v("The seconds of the longest task takes till now")]),t._v(" "),e("td",[t._v('cost_task_seconds_max{name="flush",} 0.363')])]),t._v(" "),e("tr",[e("td",[t._v("cost_task_seconds_sum")]),t._v(" "),e("td",[t._v('name="compaction/flush"')]),t._v(" "),e("td",[t._v("important")]),t._v(" "),e("td",[t._v("The total cost seconds of all tasks till now")]),t._v(" "),e("td",[t._v('cost_task_seconds_sum{name="flush",} 0.363')])]),t._v(" "),e("tr",[e("td",[t._v("data_written")]),t._v(" "),e("td",[t._v('name="compaction", '),e("br"),t._v('type="aligned/not-aligned/total"')]),t._v(" "),e("td",[t._v("important")]),t._v(" "),e("td",[t._v("The size of data written in compaction")]),t._v(" "),e("td",[t._v('data_written{name="compaction",type="total",} 10240')])]),t._v(" "),e("tr",[e("td",[t._v("data_read")]),t._v(" "),e("td",[t._v('name="compaction"')]),t._v(" "),e("td",[t._v("important")]),t._v(" "),e("td",[t._v("The size of data read in compaction")]),t._v(" "),e("td",[t._v('data_read={name="compaction",} 10240')])])])]),t._v(" "),e("h4",{attrs:{id:"_4-3-3-memory-usage"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_4-3-3-memory-usage"}},[t._v("#")]),t._v(" 4.3.3. Memory Usage")]),t._v(" "),e("table",[e("thead",[e("tr",[e("th",[t._v("Metric")]),t._v(" "),e("th",[t._v("Tag")]),t._v(" "),e("th",[t._v("level")]),t._v(" "),e("th",[t._v("Description")]),t._v(" "),e("th",[t._v("Sample")])])]),t._v(" "),e("tbody",[e("tr",[e("td",[t._v("mem")]),t._v(" "),e("td",[t._v('name="chunkMetaData/storageGroup/mtree"')]),t._v(" "),e("td",[t._v("important")]),t._v(" "),e("td",[t._v("Current memory size of chunkMetaData/storageGroup/mtree data in bytes")]),t._v(" "),e("td",[t._v('mem{name="chunkMetaData",} 2050.0')])])])]),t._v(" "),e("h4",{attrs:{id:"_4-3-4-cache-hit-ratio"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_4-3-4-cache-hit-ratio"}},[t._v("#")]),t._v(" 4.3.4. Cache Hit Ratio")]),t._v(" "),e("table",[e("thead",[e("tr",[e("th",[t._v("Metric")]),t._v(" "),e("th",[t._v("Tag")]),t._v(" "),e("th",[t._v("level")]),t._v(" "),e("th",[t._v("Description")]),t._v(" "),e("th",[t._v("Sample")])])]),t._v(" "),e("tbody",[e("tr",[e("td",[t._v("cache_hit")]),t._v(" "),e("td",[t._v('name="chunk/timeSeriesMeta/bloomFilter"')]),t._v(" "),e("td",[t._v("important")]),t._v(" "),e("td",[t._v("Cache hit ratio of chunk/timeSeriesMeta and prevention ratio of bloom filter")]),t._v(" "),e("td",[t._v('cache_hit{name="chunk",} 80')])])])]),t._v(" "),e("h4",{attrs:{id:"_4-3-5-business-data"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_4-3-5-business-data"}},[t._v("#")]),t._v(" 4.3.5. Business Data")]),t._v(" "),e("table",[e("thead",[e("tr",[e("th",[t._v("Metric")]),t._v(" "),e("th",[t._v("Tag")]),t._v(" "),e("th",[t._v("level")]),t._v(" "),e("th",[t._v("Description")]),t._v(" "),e("th",[t._v("Sample")])])]),t._v(" "),e("tbody",[e("tr",[e("td",[t._v("quantity")]),t._v(" "),e("td",[t._v('name="timeSeries/storageGroup/device"')]),t._v(" "),e("td",[t._v("important")]),t._v(" "),e("td",[t._v("The current count of timeSeries/storageGroup/devices in IoTDB")]),t._v(" "),e("td",[t._v('quantity{name="timeSeries",} 1.0')])])])]),t._v(" "),e("h4",{attrs:{id:"_4-3-6-cluster"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_4-3-6-cluster"}},[t._v("#")]),t._v(" 4.3.6. Cluster")]),t._v(" "),e("table",[e("thead",[e("tr",[e("th",[t._v("Metric")]),t._v(" "),e("th",[t._v("Tag")]),t._v(" "),e("th",[t._v("level")]),t._v(" "),e("th",[t._v("Description")]),t._v(" "),e("th",[t._v("Sample")])])]),t._v(" "),e("tbody",[e("tr",[e("td",[t._v("cluster_node_leader_count")]),t._v(" "),e("td",[t._v('name="'+t._s(t.ip)+'"')]),t._v(" "),e("td",[t._v("important")]),t._v(" "),e("td",[t._v("The count of "),e("code",[t._v("dataGroupLeader")]),t._v(" on each node, which reflects the distribution of leaders")]),t._v(" "),e("td",[t._v('cluster_node_leader_count{name="127.0.0.1",} 2.0')])]),t._v(" "),e("tr",[e("td",[t._v("cluster_uncommitted_log")]),t._v(" "),e("td",[t._v('name="'+t._s(t.ip_datagroupHeader)+'"')]),t._v(" "),e("td",[t._v("important")]),t._v(" "),e("td",[t._v("The count of "),e("code",[t._v("uncommitted_log")]),t._v(" on each node in data groups it belongs to")]),t._v(" "),e("td",[t._v('cluster_uncommitted_log{name="127.0.0.1_Data-127.0.0.1-40010-raftId-0",} 0.0')])]),t._v(" "),e("tr",[e("td",[t._v("cluster_node_status")]),t._v(" "),e("td",[t._v('name="'+t._s(t.ip)+'"')]),t._v(" "),e("td",[t._v("important")]),t._v(" "),e("td",[t._v("The current node status, 1=online 2=offline")]),t._v(" "),e("td",[t._v('cluster_node_status{name="127.0.0.1",} 1.0')])]),t._v(" "),e("tr",[e("td",[t._v("cluster_elect_total")]),t._v(" "),e("td",[t._v('name="'+t._s(t.ip)+'",status="fail/win"')]),t._v(" "),e("td",[t._v("important")]),t._v(" "),e("td",[t._v("The count and result (won or failed) of elections the node participated in.")]),t._v(" "),e("td",[t._v('cluster_elect_total{name="127.0.0.1",status="win",} 1.0')])])])]),t._v(" "),e("h3",{attrs:{id:"_4-4-iotdb-predefined-metrics-set"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_4-4-iotdb-predefined-metrics-set"}},[t._v("#")]),t._v(" 4.4. IoTDB PreDefined Metrics Set")]),t._v(" "),e("p",[t._v("Users can modify the value of "),e("code",[t._v("predefinedMetrics")]),t._v(" in the "),e("code",[t._v("iotdb-metric.yml")]),t._v(" file to enable the predefined set of metrics,now support "),e("code",[t._v("JVM")]),t._v(", "),e("code",[t._v("LOGBACK")]),t._v(", "),e("code",[t._v("FILE")]),t._v(", "),e("code",[t._v("PROCESS")]),t._v(", "),e("code",[t._v("SYSYTEM")]),t._v(".")]),t._v(" "),e("h4",{attrs:{id:"_4-4-1-jvm"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_4-4-1-jvm"}},[t._v("#")]),t._v(" 4.4.1. JVM")]),t._v(" "),e("h5",{attrs:{id:"_4-4-1-1-threads"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_4-4-1-1-threads"}},[t._v("#")]),t._v(" 4.4.1.1. Threads")]),t._v(" "),e("table",[e("thead",[e("tr",[e("th",[t._v("Metric")]),t._v(" "),e("th",[t._v("Tag")]),t._v(" "),e("th",[t._v("level")]),t._v(" "),e("th",[t._v("Description")]),t._v(" "),e("th",[t._v("Sample")])])]),t._v(" "),e("tbody",[e("tr",[e("td",[t._v("jvm_threads_live_threads")]),t._v(" "),e("td",[t._v("None")]),t._v(" "),e("td",[t._v("Important")]),t._v(" "),e("td",[t._v("The current count of threads")]),t._v(" "),e("td",[t._v("jvm_threads_live_threads 25.0")])]),t._v(" "),e("tr",[e("td",[t._v("jvm_threads_daemon_threads")]),t._v(" "),e("td",[t._v("None")]),t._v(" "),e("td",[t._v("Important")]),t._v(" "),e("td",[t._v("The current count of daemon threads")]),t._v(" "),e("td",[t._v("jvm_threads_daemon_threads 12.0")])]),t._v(" "),e("tr",[e("td",[t._v("jvm_threads_peak_threads")]),t._v(" "),e("td",[t._v("None")]),t._v(" "),e("td",[t._v("Important")]),t._v(" "),e("td",[t._v("The max count of threads till now")]),t._v(" "),e("td",[t._v("jvm_threads_peak_threads 28.0")])]),t._v(" "),e("tr",[e("td",[t._v("jvm_threads_states_threads")]),t._v(" "),e("td",[t._v('state="runnable/blocked/waiting/timed-waiting/new/terminated"')]),t._v(" "),e("td",[t._v("Important")]),t._v(" "),e("td",[t._v("The count of threads in each status")]),t._v(" "),e("td",[t._v('jvm_threads_states_threads{state="runnable",} 10.0')])])])]),t._v(" "),e("h5",{attrs:{id:"_4-4-1-2-gc"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_4-4-1-2-gc"}},[t._v("#")]),t._v(" 4.4.1.2. GC")]),t._v(" "),e("table",[e("thead",[e("tr",[e("th",[t._v("Metric")]),t._v(" "),e("th",[t._v("Tag")]),t._v(" "),e("th",[t._v("level")]),t._v(" "),e("th",[t._v("Description")]),t._v(" "),e("th",[t._v("Sample")])])]),t._v(" "),e("tbody",[e("tr",[e("td",[t._v("jvm_gc_pause_seconds_count")]),t._v(" "),e("td",[t._v('action="end of major GC/end of minor GC",cause="xxxx"')]),t._v(" "),e("td",[t._v("Important")]),t._v(" "),e("td",[t._v("The total count of YGC/FGC events and its cause")]),t._v(" "),e("td",[t._v('jvm_gc_pause_seconds_count{action="end of major GC",cause="Metadata GC Threshold",} 1.0')])]),t._v(" "),e("tr",[e("td",[t._v("jvm_gc_pause_seconds_sum")]),t._v(" "),e("td",[t._v('action="end of major GC/end of minor GC",cause="xxxx"')]),t._v(" "),e("td",[t._v("Important")]),t._v(" "),e("td",[t._v("The total cost seconds of YGC/FGC and its cause")]),t._v(" "),e("td",[t._v('jvm_gc_pause_seconds_sum{action="end of major GC",cause="Metadata GC Threshold",} 0.03')])]),t._v(" "),e("tr",[e("td",[t._v("jvm_gc_pause_seconds_max")]),t._v(" "),e("td",[t._v('action="end of major GC",cause="Metadata GC Threshold"')]),t._v(" "),e("td",[t._v("Important")]),t._v(" "),e("td",[t._v("The max cost seconds of YGC/FGC till now and its cause")]),t._v(" "),e("td",[t._v('jvm_gc_pause_seconds_max{action="end of major GC",cause="Metadata GC Threshold",} 0.0')])]),t._v(" "),e("tr",[e("td",[t._v("jvm_gc_memory_promoted_bytes_total")]),t._v(" "),e("td",[t._v("None")]),t._v(" "),e("td",[t._v("Important")]),t._v(" "),e("td",[t._v("Count of positive increases in the size of the old generation memory pool before GC to after GC")]),t._v(" "),e("td",[t._v("jvm_gc_memory_promoted_bytes_total 8425512.0")])]),t._v(" "),e("tr",[e("td",[t._v("jvm_gc_max_data_size_bytes")]),t._v(" "),e("td",[t._v("None")]),t._v(" "),e("td",[t._v("Important")]),t._v(" "),e("td",[t._v("Max size of long-lived heap memory pool")]),t._v(" "),e("td",[t._v("jvm_gc_max_data_size_bytes 2.863661056E9")])]),t._v(" "),e("tr",[e("td",[t._v("jvm_gc_live_data_size_bytes")]),t._v(" "),e("td",[t._v("None")]),t._v(" "),e("td",[t._v("Important")]),t._v(" "),e("td",[t._v("Size of long-lived heap memory pool after reclamation")]),t._v(" "),e("td",[t._v("jvm_gc_live_data_size_bytes 8450088.0")])]),t._v(" "),e("tr",[e("td",[t._v("jvm_gc_memory_allocated_bytes_total")]),t._v(" "),e("td",[t._v("None")]),t._v(" "),e("td",[t._v("Important")]),t._v(" "),e("td",[t._v("Incremented for an increase in the size of the (young) heap memory pool after one GC to before the next")]),t._v(" "),e("td",[t._v("jvm_gc_memory_allocated_bytes_total 4.2979144E7")])])])]),t._v(" "),e("h5",{attrs:{id:"_4-4-1-3-memory"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_4-4-1-3-memory"}},[t._v("#")]),t._v(" 4.4.1.3. Memory")]),t._v(" "),e("table",[e("thead",[e("tr",[e("th",[t._v("Metric")]),t._v(" "),e("th",[t._v("Tag")]),t._v(" "),e("th",[t._v("level")]),t._v(" "),e("th",[t._v("Description")]),t._v(" "),e("th",[t._v("Sample")])])]),t._v(" "),e("tbody",[e("tr",[e("td",[t._v("jvm_buffer_memory_used_bytes")]),t._v(" "),e("td",[t._v('id="direct/mapped"')]),t._v(" "),e("td",[t._v("Important")]),t._v(" "),e("td",[t._v("An estimate of the memory that the Java virtual machine is using for this buffer pool")]),t._v(" "),e("td",[t._v('jvm_buffer_memory_used_bytes{id="direct",} 3.46728099E8')])]),t._v(" "),e("tr",[e("td",[t._v("jvm_buffer_total_capacity_bytes")]),t._v(" "),e("td",[t._v('id="direct/mapped"')]),t._v(" "),e("td",[t._v("Important")]),t._v(" "),e("td",[t._v("An estimate of the total capacity of the buffers in this pool")]),t._v(" "),e("td",[t._v('jvm_buffer_total_capacity_bytes{id="mapped",} 0.0')])]),t._v(" "),e("tr",[e("td",[t._v("jvm_buffer_count_buffers")]),t._v(" "),e("td",[t._v('id="direct/mapped"')]),t._v(" "),e("td",[t._v("Important")]),t._v(" "),e("td",[t._v("An estimate of the number of buffers in the pool")]),t._v(" "),e("td",[t._v('jvm_buffer_count_buffers{id="direct",} 183.0')])]),t._v(" "),e("tr",[e("td",[t._v("jvm_memory_committed_bytes")]),t._v(" "),e("td",[t._v('{area="heap/nonheap",id="xxx",}')]),t._v(" "),e("td",[t._v("Important")]),t._v(" "),e("td",[t._v("The amount of memory in bytes that is committed for the Java virtual machine to use")]),t._v(" "),e("td",[t._v('jvm_memory_committed_bytes{area="heap",id="Par Survivor Space",} 2.44252672E8'),e("br"),t._v('jvm_memory_committed_bytes{area="nonheap",id="Metaspace",} 3.9051264E7'),e("br")])]),t._v(" "),e("tr",[e("td",[t._v("jvm_memory_max_bytes")]),t._v(" "),e("td",[t._v('{area="heap/nonheap",id="xxx",}')]),t._v(" "),e("td",[t._v("Important")]),t._v(" "),e("td",[t._v("The maximum amount of memory in bytes that can be used for memory management")]),t._v(" "),e("td",[t._v('jvm_memory_max_bytes{area="heap",id="Par Survivor Space",} 2.44252672E8'),e("br"),t._v('jvm_memory_max_bytes{area="nonheap",id="Compressed Class Space",} 1.073741824E9')])]),t._v(" "),e("tr",[e("td",[t._v("jvm_memory_used_bytes")]),t._v(" "),e("td",[t._v('{area="heap/nonheap",id="xxx",}')]),t._v(" "),e("td",[t._v("Important")]),t._v(" "),e("td",[t._v("The amount of used memory")]),t._v(" "),e("td",[t._v('jvm_memory_used_bytes{area="heap",id="Par Eden Space",} 1.000128376E9'),e("br"),t._v('jvm_memory_used_bytes{area="nonheap",id="Code Cache",} 2.9783808E7'),e("br")])])])]),t._v(" "),e("h5",{attrs:{id:"_4-4-1-4-classes"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_4-4-1-4-classes"}},[t._v("#")]),t._v(" 4.4.1.4. Classes")]),t._v(" "),e("table",[e("thead",[e("tr",[e("th",[t._v("Metric")]),t._v(" "),e("th",[t._v("Tag")]),t._v(" "),e("th",[t._v("level")]),t._v(" "),e("th",[t._v("Description")]),t._v(" "),e("th",[t._v("Sample")])])]),t._v(" "),e("tbody",[e("tr",[e("td",[t._v("jvm_classes_unloaded_classes_total")]),t._v(" "),e("td",[t._v("None")]),t._v(" "),e("td",[t._v("Important")]),t._v(" "),e("td",[t._v("The total number of classes unloaded since the Java virtual machine has started execution")]),t._v(" "),e("td",[t._v("jvm_classes_unloaded_classes_total 680.0")])]),t._v(" "),e("tr",[e("td",[t._v("jvm_classes_loaded_classes")]),t._v(" "),e("td",[t._v("None")]),t._v(" "),e("td",[t._v("Important")]),t._v(" "),e("td",[t._v("The number of classes that are currently loaded in the Java virtual machine")]),t._v(" "),e("td",[t._v("jvm_classes_loaded_classes 5975.0")])]),t._v(" "),e("tr",[e("td",[t._v("jvm_compilation_time_ms_total")]),t._v(" "),e("td",[t._v('{compiler="HotSpot 64-Bit Tiered Compilers",}')]),t._v(" "),e("td",[t._v("Important")]),t._v(" "),e("td",[t._v("The approximate accumulated elapsed time spent in compilation")]),t._v(" "),e("td",[t._v('jvm_compilation_time_ms_total{compiler="HotSpot 64-Bit Tiered Compilers",} 107092.0')])])])]),t._v(" "),e("h4",{attrs:{id:"_4-4-2-file"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_4-4-2-file"}},[t._v("#")]),t._v(" 4.4.2. File")]),t._v(" "),e("table",[e("thead",[e("tr",[e("th",[t._v("Metric")]),t._v(" "),e("th",[t._v("Tag")]),t._v(" "),e("th",[t._v("level")]),t._v(" "),e("th",[t._v("Description")]),t._v(" "),e("th",[t._v("Sample")])])]),t._v(" "),e("tbody",[e("tr",[e("td",[t._v("file_size")]),t._v(" "),e("td",[t._v('name="wal/seq/unseq"')]),t._v(" "),e("td",[t._v("important")]),t._v(" "),e("td",[t._v("The current file size of wal/seq/unseq in bytes")]),t._v(" "),e("td",[t._v('file_size{name="wal",} 67.0')])]),t._v(" "),e("tr",[e("td",[t._v("file_count")]),t._v(" "),e("td",[t._v('name="wal/seq/unseq"')]),t._v(" "),e("td",[t._v("important")]),t._v(" "),e("td",[t._v("The current count of wal/seq/unseq files")]),t._v(" "),e("td",[t._v('file_count{name="seq",} 1.0')])])])]),t._v(" "),e("h4",{attrs:{id:"_4-4-3-logback"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_4-4-3-logback"}},[t._v("#")]),t._v(" 4.4.3. Logback")]),t._v(" "),e("table",[e("thead",[e("tr",[e("th",[t._v("Metric")]),t._v(" "),e("th",[t._v("Tag")]),t._v(" "),e("th",[t._v("level")]),t._v(" "),e("th",[t._v("Description")]),t._v(" "),e("th",[t._v("示例")])])]),t._v(" "),e("tbody",[e("tr",[e("td",[t._v("logback_events_total")]),t._v(" "),e("td",[t._v('{level="trace/debug/info/warn/error",}')]),t._v(" "),e("td",[t._v("Important")]),t._v(" "),e("td",[t._v("The count of trace/debug/info/warn/error log events till now")]),t._v(" "),e("td",[t._v('logback_events_total{level="warn",} 0.0')])])])]),t._v(" "),e("h4",{attrs:{id:"_4-4-4-process"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_4-4-4-process"}},[t._v("#")]),t._v(" 4.4.4. Process")]),t._v(" "),e("table",[e("thead",[e("tr",[e("th",[t._v("Metric")]),t._v(" "),e("th",[t._v("Tag")]),t._v(" "),e("th",[t._v("level")]),t._v(" "),e("th",[t._v("Description")]),t._v(" "),e("th",[t._v("示例")])])]),t._v(" "),e("tbody",[e("tr",[e("td",[t._v("process_cpu_load")]),t._v(" "),e("td",[t._v('name="cpu"')]),t._v(" "),e("td",[t._v("core")]),t._v(" "),e("td",[t._v("current process CPU Usage (%)")]),t._v(" "),e("td",[t._v('process_cpu_load{name="process",} 5.0')])]),t._v(" "),e("tr",[e("td",[t._v("process_cpu_time")]),t._v(" "),e("td",[t._v('name="cpu"')]),t._v(" "),e("td",[t._v("core")]),t._v(" "),e("td",[t._v("total Process CPU Time Occupied (ns)")]),t._v(" "),e("td",[t._v('process_cpu_time{name="process",} 3.265625E9')])]),t._v(" "),e("tr",[e("td",[t._v("process_max_mem")]),t._v(" "),e("td",[t._v('name="memory"')]),t._v(" "),e("td",[t._v("core")]),t._v(" "),e("td",[t._v("The maximum available memory for the JVM")]),t._v(" "),e("td",[t._v('process_max_mem{name="process",} 3.545759744E9')])]),t._v(" "),e("tr",[e("td",[t._v("process_used_mem")]),t._v(" "),e("td",[t._v('name="memory"')]),t._v(" "),e("td",[t._v("core")]),t._v(" "),e("td",[t._v("The current available memory for the JVM")]),t._v(" "),e("td",[t._v('process_used_mem{name="process",} 4.6065456E7')])]),t._v(" "),e("tr",[e("td",[t._v("process_total_mem")]),t._v(" "),e("td",[t._v('name="memory"')]),t._v(" "),e("td",[t._v("core")]),t._v(" "),e("td",[t._v("The current requested memory for the JVM")]),t._v(" "),e("td",[t._v('process_total_mem{name="process",} 2.39599616E8')])]),t._v(" "),e("tr",[e("td",[t._v("process_free_mem")]),t._v(" "),e("td",[t._v('name="memory"')]),t._v(" "),e("td",[t._v("core")]),t._v(" "),e("td",[t._v("The free available memory for the JVM")]),t._v(" "),e("td",[t._v('process_free_mem{name="process",} 1.94035584E8')])]),t._v(" "),e("tr",[e("td",[t._v("process_mem_ratio")]),t._v(" "),e("td",[t._v('name="memory"')]),t._v(" "),e("td",[t._v("core")]),t._v(" "),e("td",[t._v("Memory footprint ratio of process")]),t._v(" "),e("td",[t._v('process_mem_ratio{name="process",} 0.0')])]),t._v(" "),e("tr",[e("td",[t._v("process_threads_count")]),t._v(" "),e("td",[t._v('name="process"')]),t._v(" "),e("td",[t._v("core")]),t._v(" "),e("td",[t._v("The current number of threads")]),t._v(" "),e("td",[t._v('process_threads_count{name="process",} 11.0')])]),t._v(" "),e("tr",[e("td",[t._v("process_status")]),t._v(" "),e("td",[t._v('name="process"')]),t._v(" "),e("td",[t._v("core")]),t._v(" "),e("td",[t._v("The process survivor status, 1.0 means survivorship, and 0.0 means terminated")]),t._v(" "),e("td",[t._v('process_status{name="process",} 1.0')])])])]),t._v(" "),e("h4",{attrs:{id:"_4-4-5-system"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_4-4-5-system"}},[t._v("#")]),t._v(" 4.4.5. System")]),t._v(" "),e("table",[e("thead",[e("tr",[e("th",[t._v("Metric")]),t._v(" "),e("th",[t._v("Tag")]),t._v(" "),e("th",[t._v("level")]),t._v(" "),e("th",[t._v("Description")]),t._v(" "),e("th",[t._v("示例")])])]),t._v(" "),e("tbody",[e("tr",[e("td",[t._v("sys_cpu_load")]),t._v(" "),e("td",[t._v('name="cpu"')]),t._v(" "),e("td",[t._v("core")]),t._v(" "),e("td",[t._v("current system CPU Usage(%)")]),t._v(" "),e("td",[t._v('sys_cpu_load{name="system",} 15.0')])]),t._v(" "),e("tr",[e("td",[t._v("sys_cpu_cores")]),t._v(" "),e("td",[t._v('name="cpu"')]),t._v(" "),e("td",[t._v("core")]),t._v(" "),e("td",[t._v("available CPU cores")]),t._v(" "),e("td",[t._v('sys_cpu_cores{name="system",} 16.0')])]),t._v(" "),e("tr",[e("td",[t._v("sys_total_physical_memory_size")]),t._v(" "),e("td",[t._v('name="memory"')]),t._v(" "),e("td",[t._v("core")]),t._v(" "),e("td",[t._v("Maximum physical memory of system")]),t._v(" "),e("td",[t._v('sys_total_physical_memory_size{name="system",} 1.5950999552E10')])]),t._v(" "),e("tr",[e("td",[t._v("sys_free_physical_memory_size")]),t._v(" "),e("td",[t._v('name="memory"')]),t._v(" "),e("td",[t._v("core")]),t._v(" "),e("td",[t._v("The current available memory of system")]),t._v(" "),e("td",[t._v('sys_free_physical_memory_size{name="system",} 4.532396032E9')])]),t._v(" "),e("tr",[e("td",[t._v("sys_total_swap_space_size")]),t._v(" "),e("td",[t._v('name="memory"')]),t._v(" "),e("td",[t._v("core")]),t._v(" "),e("td",[t._v("The maximum swap area of system")]),t._v(" "),e("td",[t._v('sys_total_swap_space_size{name="system",} 2.1051273216E10')])]),t._v(" "),e("tr",[e("td",[t._v("sys_free_swap_space_size")]),t._v(" "),e("td",[t._v('name="memory"')]),t._v(" "),e("td",[t._v("core")]),t._v(" "),e("td",[t._v("The available swap area of system")]),t._v(" "),e("td",[t._v('sys_free_swap_space_size{name="system",} 2.931576832E9')])]),t._v(" "),e("tr",[e("td",[t._v("sys_committed_vm_size")]),t._v(" "),e("td",[t._v('name="memory"')]),t._v(" "),e("td",[t._v("important")]),t._v(" "),e("td",[t._v("the amount of virtual memory available to running processes")]),t._v(" "),e("td",[t._v('sys_committed_vm_size{name="system",} 5.04344576E8')])]),t._v(" "),e("tr",[e("td",[t._v("sys_disk_total_space")]),t._v(" "),e("td",[t._v('name="disk"')]),t._v(" "),e("td",[t._v("core")]),t._v(" "),e("td",[t._v("The total disk space")]),t._v(" "),e("td",[t._v('sys_disk_total_space{name="system",} 5.10770798592E11')])]),t._v(" "),e("tr",[e("td",[t._v("sys_disk_free_space")]),t._v(" "),e("td",[t._v('name="disk"')]),t._v(" "),e("td",[t._v("core")]),t._v(" "),e("td",[t._v("The available disk space")]),t._v(" "),e("td",[t._v('sys_disk_free_space{name="system",} 3.63467845632E11')])])])]),t._v(" "),e("h3",{attrs:{id:"_4-5-add-custom-metrics"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_4-5-add-custom-metrics"}},[t._v("#")]),t._v(" 4.5. Add custom metrics")]),t._v(" "),e("ul",[e("li",[t._v("If you want to add your own metrics data in IoTDB, please see the [IoTDB Metric Framework] (https://github.com/apache/iotdb/tree/master/metrics) document.")]),t._v(" "),e("li",[t._v("Metric embedded point definition rules\n"),e("ul",[e("li",[e("code",[t._v("Metric")]),t._v(": The name of the monitoring item. For example, "),e("code",[t._v("entry_seconds_count")]),t._v(" is the cumulative number of accesses to the interface, and "),e("code",[t._v("file_size")]),t._v(" is the total number of files.")]),t._v(" "),e("li",[e("code",[t._v("Tags")]),t._v(": Key-Value pair, used to identify monitored items, optional\n"),e("ul",[e("li",[e("code",[t._v("name = xxx")]),t._v(": The name of the monitored item. For example, for the monitoring item"),e("code",[t._v("entry_seconds_count")]),t._v(", the meaning of name is the name of the monitored interface.")]),t._v(" "),e("li",[e("code",[t._v("status = xxx")]),t._v(": 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.")]),t._v(" "),e("li",[e("code",[t._v("user = xxx")]),t._v(": The monitored item is related to a specific user, such as the total number of writes by the root user.")]),t._v(" "),e("li",[t._v("Customize for the situation...")])])])])]),t._v(" "),e("li",[t._v("Monitoring indicator level meaning:\n"),e("ul",[e("li",[t._v("The default startup level for online operation is "),e("code",[t._v("Important")]),t._v(" level, the default startup level for offline debugging is "),e("code",[t._v("Normal")]),t._v(" level, and the audit strictness is "),e("code",[t._v("Core > Important > Normal > All")])]),t._v(" "),e("li",[e("code",[t._v("Core")]),t._v(": The core indicator of the system, used by the "),e("strong",[t._v("operation and maintenance personnel")]),t._v(", 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.")]),t._v(" "),e("li",[e("code",[t._v("Important")]),t._v(": An important indicator of the module, which is used by "),e("strong",[t._v("operation and maintenance and testers")]),t._v(", and is directly related to "),e("strong",[t._v("the running status of each module")]),t._v(", such as the number of merged files, execution status, etc.")]),t._v(" "),e("li",[e("code",[t._v("Normal")]),t._v(": General indicators of the module, used by "),e("strong",[t._v("developers")]),t._v(" to facilitate "),e("strong",[t._v("locating the module")]),t._v(" when problems occur, such as specific key operation situations in the merger.")]),t._v(" "),e("li",[e("code",[t._v("All")]),t._v(": All indicators of the module, used by "),e("strong",[t._v("module developers")]),t._v(", often used when the problem is reproduced, so as to solve the problem quickly.")])])])]),t._v(" "),e("h2",{attrs:{id:"_5-how-to-get-these-metrics"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_5-how-to-get-these-metrics"}},[t._v("#")]),t._v(" 5. How to get these metrics?")]),t._v(" "),e("p",[t._v("The metrics collection switch is disabled by default,you need to enable it from "),e("code",[t._v("conf/iotdb-metric.yml")]),t._v(", Currently, it also supports hot loading via "),e("code",[t._v("load configuration")]),t._v(" after startup.")]),t._v(" "),e("h3",{attrs:{id:"_5-1-iotdb-metric-yml"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_5-1-iotdb-metric-yml"}},[t._v("#")]),t._v(" 5.1. Iotdb-metric.yml")]),t._v(" "),e("div",{staticClass:"language-yaml line-numbers-mode"},[e("pre",{pre:!0,attrs:{class:"language-yaml"}},[e("code",[e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# whether enable the module")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("enableMetric")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token boolean important"}},[t._v("false")]),t._v("\n\n"),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# Is stat performance of operation latency")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("enablePerformanceStat")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token boolean important"}},[t._v("false")]),t._v("\n\n"),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# Multiple reporter, options: [JMX, PROMETHEUS, IOTDB], IOTDB is off by default")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("metricReporterList")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("-")]),t._v(" JMX\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("-")]),t._v(" PROMETHEUS\n\n"),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# Type of monitor frame, options: [MICROMETER, DROPWIZARD]")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("monitorType")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" MICROMETER\n\n"),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# Level of metric level, options: [CORE, IMPORTANT, NORMAL, ALL]")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("metricLevel")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" IMPORTANT\n\n"),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# Predefined metric, options: [JVM, LOGBACK, FILE, PROCESS, SYSTEM]")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("predefinedMetrics")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("-")]),t._v(" JVM\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("-")]),t._v(" FILE\n\n"),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# The http server's port for prometheus exporter to get metric data.")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("prometheusExporterPort")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("9091")]),t._v("\n\n"),e("span",{pre:!0,attrs:{class:"token comment"}},[t._v("# The config of iotdb reporter")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("ioTDBReporterConfig")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("host")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" 127.0.0.1\n "),e("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("port")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("6667")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("username")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" root\n "),e("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("password")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" root\n "),e("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("database")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" _metric\n "),e("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("pushPeriodInSecond")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("15")]),t._v("\n")])]),t._v(" "),e("div",{staticClass:"line-numbers-wrapper"},[e("span",{staticClass:"line-number"},[t._v("1")]),e("br"),e("span",{staticClass:"line-number"},[t._v("2")]),e("br"),e("span",{staticClass:"line-number"},[t._v("3")]),e("br"),e("span",{staticClass:"line-number"},[t._v("4")]),e("br"),e("span",{staticClass:"line-number"},[t._v("5")]),e("br"),e("span",{staticClass:"line-number"},[t._v("6")]),e("br"),e("span",{staticClass:"line-number"},[t._v("7")]),e("br"),e("span",{staticClass:"line-number"},[t._v("8")]),e("br"),e("span",{staticClass:"line-number"},[t._v("9")]),e("br"),e("span",{staticClass:"line-number"},[t._v("10")]),e("br"),e("span",{staticClass:"line-number"},[t._v("11")]),e("br"),e("span",{staticClass:"line-number"},[t._v("12")]),e("br"),e("span",{staticClass:"line-number"},[t._v("13")]),e("br"),e("span",{staticClass:"line-number"},[t._v("14")]),e("br"),e("span",{staticClass:"line-number"},[t._v("15")]),e("br"),e("span",{staticClass:"line-number"},[t._v("16")]),e("br"),e("span",{staticClass:"line-number"},[t._v("17")]),e("br"),e("span",{staticClass:"line-number"},[t._v("18")]),e("br"),e("span",{staticClass:"line-number"},[t._v("19")]),e("br"),e("span",{staticClass:"line-number"},[t._v("20")]),e("br"),e("span",{staticClass:"line-number"},[t._v("21")]),e("br"),e("span",{staticClass:"line-number"},[t._v("22")]),e("br"),e("span",{staticClass:"line-number"},[t._v("23")]),e("br"),e("span",{staticClass:"line-number"},[t._v("24")]),e("br"),e("span",{staticClass:"line-number"},[t._v("25")]),e("br"),e("span",{staticClass:"line-number"},[t._v("26")]),e("br"),e("span",{staticClass:"line-number"},[t._v("27")]),e("br"),e("span",{staticClass:"line-number"},[t._v("28")]),e("br"),e("span",{staticClass:"line-number"},[t._v("29")]),e("br"),e("span",{staticClass:"line-number"},[t._v("30")]),e("br"),e("span",{staticClass:"line-number"},[t._v("31")]),e("br"),e("span",{staticClass:"line-number"},[t._v("32")]),e("br"),e("span",{staticClass:"line-number"},[t._v("33")]),e("br")])]),e("p",[t._v("Then you can get metrics data as follows")]),t._v(" "),e("ol",[e("li",[t._v("Enable metrics switch in "),e("code",[t._v("iotdb-metric.yml")])]),t._v(" "),e("li",[t._v("You can just stay other config params as default.")]),t._v(" "),e("li",[t._v("Start/Restart your IoTDB server/cluster")]),t._v(" "),e("li",[t._v("Open your browser or use the "),e("code",[t._v("curl")]),t._v(" command to request "),e("code",[t._v("http://servier_ip:9091/metrics")]),t._v(",then you will get metrics data like follows:")])]),t._v(" "),e("div",{staticClass:"language- line-numbers-mode"},[e("pre",{pre:!0,attrs:{class:"language-text"}},[e("code",[t._v('...\n# HELP file_count\n# TYPE file_count gauge\nfile_count{name="wal",} 0.0\nfile_count{name="unseq",} 0.0\nfile_count{name="seq",} 2.0\n# HELP file_size\n# TYPE file_size gauge\nfile_size{name="wal",} 0.0\nfile_size{name="unseq",} 0.0\nfile_size{name="seq",} 560.0\n# HELP queue\n# TYPE queue gauge\nqueue{name="flush",status="waiting",} 0.0\nqueue{name="flush",status="running",} 0.0\n# HELP quantity\n# TYPE quantity gauge\nquantity{name="timeSeries",} 1.0\nquantity{name="storageGroup",} 1.0\nquantity{name="device",} 1.0\n# HELP logback_events_total Number of error level events that made it to the logs\n# TYPE logback_events_total counter\nlogback_events_total{level="warn",} 0.0\nlogback_events_total{level="debug",} 2760.0\nlogback_events_total{level="error",} 0.0\nlogback_events_total{level="trace",} 0.0\nlogback_events_total{level="info",} 71.0\n# HELP mem\n# TYPE mem gauge\nmem{name="storageGroup",} 0.0\nmem{name="mtree",} 1328.0\n...\n')])]),t._v(" "),e("div",{staticClass:"line-numbers-wrapper"},[e("span",{staticClass:"line-number"},[t._v("1")]),e("br"),e("span",{staticClass:"line-number"},[t._v("2")]),e("br"),e("span",{staticClass:"line-number"},[t._v("3")]),e("br"),e("span",{staticClass:"line-number"},[t._v("4")]),e("br"),e("span",{staticClass:"line-number"},[t._v("5")]),e("br"),e("span",{staticClass:"line-number"},[t._v("6")]),e("br"),e("span",{staticClass:"line-number"},[t._v("7")]),e("br"),e("span",{staticClass:"line-number"},[t._v("8")]),e("br"),e("span",{staticClass:"line-number"},[t._v("9")]),e("br"),e("span",{staticClass:"line-number"},[t._v("10")]),e("br"),e("span",{staticClass:"line-number"},[t._v("11")]),e("br"),e("span",{staticClass:"line-number"},[t._v("12")]),e("br"),e("span",{staticClass:"line-number"},[t._v("13")]),e("br"),e("span",{staticClass:"line-number"},[t._v("14")]),e("br"),e("span",{staticClass:"line-number"},[t._v("15")]),e("br"),e("span",{staticClass:"line-number"},[t._v("16")]),e("br"),e("span",{staticClass:"line-number"},[t._v("17")]),e("br"),e("span",{staticClass:"line-number"},[t._v("18")]),e("br"),e("span",{staticClass:"line-number"},[t._v("19")]),e("br"),e("span",{staticClass:"line-number"},[t._v("20")]),e("br"),e("span",{staticClass:"line-number"},[t._v("21")]),e("br"),e("span",{staticClass:"line-number"},[t._v("22")]),e("br"),e("span",{staticClass:"line-number"},[t._v("23")]),e("br"),e("span",{staticClass:"line-number"},[t._v("24")]),e("br"),e("span",{staticClass:"line-number"},[t._v("25")]),e("br"),e("span",{staticClass:"line-number"},[t._v("26")]),e("br"),e("span",{staticClass:"line-number"},[t._v("27")]),e("br"),e("span",{staticClass:"line-number"},[t._v("28")]),e("br"),e("span",{staticClass:"line-number"},[t._v("29")]),e("br"),e("span",{staticClass:"line-number"},[t._v("30")]),e("br"),e("span",{staticClass:"line-number"},[t._v("31")]),e("br"),e("span",{staticClass:"line-number"},[t._v("32")]),e("br")])]),e("h3",{attrs:{id:"_5-2-integrating-with-prometheus-and-grafana"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_5-2-integrating-with-prometheus-and-grafana"}},[t._v("#")]),t._v(" 5.2. Integrating with Prometheus and Grafana")]),t._v(" "),e("p",[t._v("As above descriptions,IoTDB provides metrics data in standard Prometheus format,so we can integrate with Prometheus and Grafana directly.")]),t._v(" "),e("p",[t._v("The following picture describes the relationships among IoTDB, Prometheus and Grafana")]),t._v(" "),e("p",[e("img",{attrs:{src:"https://raw.githubusercontent.com/apache/iotdb-bin-resources/main/docs/UserGuide/System%20Tools/Metrics/iotdb_prometheus_grafana.png",alt:"iotdb_prometheus_grafana"}})]),t._v(" "),e("ol",[e("li",[t._v("Along with running, IoTDB will collect its metrics continuously.")]),t._v(" "),e("li",[t._v("Prometheus scrapes metrics from IoTDB at a constant interval (can be configured).")]),t._v(" "),e("li",[t._v("Prometheus saves these metrics to its inner TSDB.")]),t._v(" "),e("li",[t._v("Grafana queries metrics from Prometheus at a constant interval (can be configured) and then presents them on the graph.")])]),t._v(" "),e("p",[t._v("So, we need to do some additional works to configure and deploy Prometheus and Grafana.")]),t._v(" "),e("p",[t._v("For instance, you can config your Prometheus as follows to get metrics data from IoTDB:")]),t._v(" "),e("div",{staticClass:"language-yaml line-numbers-mode"},[e("pre",{pre:!0,attrs:{class:"language-yaml"}},[e("code",[e("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("job_name")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" pull"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("-")]),t._v("metrics\n"),e("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("honor_labels")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token boolean important"}},[t._v("true")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("honor_timestamps")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token boolean important"}},[t._v("true")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("scrape_interval")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" 15s\n"),e("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("scrape_timeout")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" 10s\n"),e("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("metrics_path")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" /metrics\n"),e("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("scheme")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" http\n"),e("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("follow_redirects")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token boolean important"}},[t._v("true")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("static_configs")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("\n"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("-")]),t._v(" "),e("span",{pre:!0,attrs:{class:"token key atrule"}},[t._v("targets")]),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),t._v("\n "),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v("-")]),t._v(" localhost"),e("span",{pre:!0,attrs:{class:"token punctuation"}},[t._v(":")]),e("span",{pre:!0,attrs:{class:"token number"}},[t._v("9091")]),t._v("\n")])]),t._v(" "),e("div",{staticClass:"line-numbers-wrapper"},[e("span",{staticClass:"line-number"},[t._v("1")]),e("br"),e("span",{staticClass:"line-number"},[t._v("2")]),e("br"),e("span",{staticClass:"line-number"},[t._v("3")]),e("br"),e("span",{staticClass:"line-number"},[t._v("4")]),e("br"),e("span",{staticClass:"line-number"},[t._v("5")]),e("br"),e("span",{staticClass:"line-number"},[t._v("6")]),e("br"),e("span",{staticClass:"line-number"},[t._v("7")]),e("br"),e("span",{staticClass:"line-number"},[t._v("8")]),e("br"),e("span",{staticClass:"line-number"},[t._v("9")]),e("br"),e("span",{staticClass:"line-number"},[t._v("10")]),e("br"),e("span",{staticClass:"line-number"},[t._v("11")]),e("br")])]),e("p",[t._v("The following documents may help you have a good journey with Prometheus and Grafana.")]),t._v(" "),e("p",[e("a",{attrs:{href:"https://prometheus.io/docs/prometheus/latest/getting_started/",target:"_blank",rel:"noopener noreferrer"}},[t._v("Prometheus getting_started"),e("OutboundLink")],1)]),t._v(" "),e("p",[e("a",{attrs:{href:"https://prometheus.io/docs/prometheus/latest/configuration/configuration/#scrape_config",target:"_blank",rel:"noopener noreferrer"}},[t._v("Prometheus scrape metrics"),e("OutboundLink")],1)]),t._v(" "),e("p",[e("a",{attrs:{href:"https://grafana.com/docs/grafana/latest/getting-started/getting-started/",target:"_blank",rel:"noopener noreferrer"}},[t._v("Grafana getting_started"),e("OutboundLink")],1)]),t._v(" "),e("p",[e("a",{attrs:{href:"https://prometheus.io/docs/visualization/grafana/#grafana-support-for-prometheus",target:"_blank",rel:"noopener noreferrer"}},[t._v("Grafana query metrics from Prometheus"),e("OutboundLink")],1)]),t._v(" "),e("h3",{attrs:{id:"_5-3-apache-iotdb-dashboard"}},[e("a",{staticClass:"header-anchor",attrs:{href:"#_5-3-apache-iotdb-dashboard"}},[t._v("#")]),t._v(" 5.3. Apache IoTDB Dashboard")]),t._v(" "),e("p",[t._v("We provide the Apache IoTDB Dashboard, and the rendering shown in Grafana is as follows:")]),t._v(" "),e("p",[e("img",{attrs:{src:"https://github.com/apache/iotdb-bin-resources/blob/main/docs/UserGuide/System%20Tools/Metrics/dashboard.png",alt:"Apache IoTDB Dashboard"}})]),t._v(" "),e("p",[t._v("How to get Apache IoTDB Dashboard:")]),t._v(" "),e("ol",[e("li",[t._v("You can obtain the json files of Dashboards corresponding to different iotdb versions in the grafana-metrics-example folder.")]),t._v(" "),e("li",[t._v("You can visit "),e("a",{attrs:{href:"https://grafana.com/grafana/dashboards/",target:"_blank",rel:"noopener noreferrer"}},[t._v("Grafana Dashboard official website"),e("OutboundLink")],1),t._v(", search for "),e("code",[t._v("Apache IoTDB Dashboard")]),t._v(" and use")])]),t._v(" "),e("p",[t._v("When creating Grafana, you can select the json file you just downloaded to "),e("code",[t._v("Import")]),t._v(" and select the corresponding target data source for Apache IoTDB Dashboard.")])])}),[],!1,null,null,null);e.default=_.exports}}]);