blob: 7a6b297bde7b94aaf1140e83d95d5ff83283a52d [file] [log] [blame]
import{_ as n,r,o as s,c as l,b as t,d as e,a as o,e as i}from"./app-Bx8hKGcu.js";const d={},c=i('<h1 id="_1-monitoring-board-install-and-deploy" tabindex="-1"><a class="header-anchor" href="#_1-monitoring-board-install-and-deploy"><span>1 Monitoring Board Install and Deploy</span></a></h1><p>From the IoTDB 1.0 version, we introduced the system monitoring module, you can complete the IoTDB important operational indicators for monitoring, this article describes how to open the system monitoring module in the IoTDB distribution, and the use of Prometheus + Grafana way to complete the visualisation of the system monitoring indicators.</p><h2 id="_1-1-pre-preparation" tabindex="-1"><a class="header-anchor" href="#_1-1-pre-preparation"><span>1.1 pre-preparation</span></a></h2><h3 id="_1-1-1-software-requirement" tabindex="-1"><a class="header-anchor" href="#_1-1-1-software-requirement"><span>1.1.1 software requirement</span></a></h3>',4),p=t("li",null,"IoTDB: version 1.0 and above, you may contact your sales for the relevant installer",-1),h={href:"https://prometheus.io/download/",target:"_blank",rel:"noopener noreferrer"},g={href:"https://grafana.com/grafana/download",target:"_blank",rel:"noopener noreferrer"},m=t("li",null,"IoTDB Dashboards: IoTDB Dashboard is a tool for Enterprise IoTDB, and you may contact your sales for the relevant installer.",-1),u=i(`<h3 id="_1-1-2-start-confignode" tabindex="-1"><a class="header-anchor" href="#_1-1-2-start-confignode"><span>1.1.2 Start ConfigNode</span></a></h3><ol><li>Enter the <code>iotdb-enterprise-1.x.x.x-bin</code> package</li><li>Modify the configuration file <code>conf/iotdb-confignode.properties</code> and modify the following configuration. Other configurations remain unchanged:</li></ol><div class="language-properties line-numbers-mode" data-ext="properties" data-title="properties"><pre class="language-properties"><code><span class="token key attr-name">cn_metric_reporter_list</span><span class="token punctuation">=</span><span class="token value attr-value">PROMETHEUS</span>
<span class="token key attr-name">cn_metric_level</span><span class="token punctuation">=</span><span class="token value attr-value">IMPORTANT</span>
<span class="token key attr-name">cn_metric_prometheus_reporter_port</span><span class="token punctuation">=</span><span class="token value attr-value">9091</span>
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><ol start="3"><li>Run the script to start ConfigNode: <code>./sbin/start-confignode.sh</code>. If the following prompt appears, the startup is successful:</li></ol><figure><img src="https://spricoder.oss-cn-shanghai.aliyuncs.com/Apache IoTDB/metric/cluster-introduce/1.png" alt="" tabindex="0" loading="lazy"><figcaption></figcaption></figure>`,5),f={start:"4"},b={href:"http://localhost:9091/metrics",target:"_blank",rel:"noopener noreferrer"},v=i(`<figure><img src="https://spricoder.oss-cn-shanghai.aliyuncs.com/Apache IoTDB/metric/cluster-introduce/2.png" alt="" tabindex="0" loading="lazy"><figcaption></figcaption></figure><ol start="5"><li>Similarly, the other two ConfigNode nodes can be configured to ports 9092 and 9093 respectively.</li></ol><h3 id="_1-1-3-start-datanode" tabindex="-1"><a class="header-anchor" href="#_1-1-3-start-datanode"><span>1.1.3 Start DataNode</span></a></h3><ol><li>Enter the <code>iotdb-enterprise-1.x.x.x-bin</code> package</li><li>Modify the configuration file <code>conf/iotdb-datanode.properties</code> and modify the following configuration. Other configurations remain unchanged:</li></ol><div class="language-properties line-numbers-mode" data-ext="properties" data-title="properties"><pre class="language-properties"><code><span class="token key attr-name">dn_metric_reporter_list</span><span class="token punctuation">=</span><span class="token value attr-value">PROMETHEUS</span>
<span class="token key attr-name">dn_metric_level</span><span class="token punctuation">=</span><span class="token value attr-value">IMPORTANT</span>
<span class="token key attr-name">dn_metric_prometheus_reporter_port</span><span class="token punctuation">=</span><span class="token value attr-value">9094</span>
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><ol start="3"><li>Run the script to start DataNode: <code>./sbin/start-datanode.sh</code>. If the following prompt appears, the startup is successful:</li></ol><figure><img src="https://spricoder.oss-cn-shanghai.aliyuncs.com/Apache IoTDB/metric/cluster-introduce/3.png" alt="" tabindex="0" loading="lazy"><figcaption></figcaption></figure><ol start="4"><li>Enter the <code>http://localhost:9094/metrics</code> URL in the browser, and you can view the following monitoring item information:</li></ol><figure><img src="https://spricoder.oss-cn-shanghai.aliyuncs.com/Apache IoTDB/metric/cluster-introduce/4.png" alt="" tabindex="0" loading="lazy"><figcaption></figcaption></figure><ol start="5"><li>Similarly, the other two DataNodes can be configured to ports 9095 and 9096.</li></ol><h3 id="_1-1-4-clarification" tabindex="-1"><a class="header-anchor" href="#_1-1-4-clarification"><span>1.1.4 clarification</span></a></h3><p>Please confirm that the IoTDB cluster has been started before performing the following operations.</p><p>This doc will build the monitoring dashboard on one machine (1 ConfigNode and 1 DataNode) environment, other cluster configurations are similar, users can adjust the configuration according to their own cluster situation (the number of ConfigNode and DataNode). The basic configuration information of the cluster built in this paper is shown in the table below.</p><table><thead><tr><th>NODETYPE</th><th>NODEIP</th><th>Monitor Pusher</th><th>Monitor Level</th><th>Monitor Port</th></tr></thead><tbody><tr><td>ConfigNode</td><td>127.0.0.1</td><td>PROMETHEUS</td><td>IMPORTANT</td><td>9091</td></tr><tr><td>ConfigNode</td><td>127.0.0.1</td><td>PROMETHEUS</td><td>IMPORTANT</td><td>9092</td></tr><tr><td>ConfigNode</td><td>127.0.0.1</td><td>PROMETHEUS</td><td>IMPORTANT</td><td>9093</td></tr><tr><td>DataNode</td><td>127.0.0.1</td><td>PROMETHEUS</td><td>IMPORTANT</td><td>9094</td></tr><tr><td>DataNode</td><td>127.0.0.1</td><td>PROMETHEUS</td><td>IMPORTANT</td><td>9095</td></tr><tr><td>DataNode</td><td>127.0.0.1</td><td>PROMETHEUS</td><td>IMPORTANT</td><td>9096</td></tr></tbody></table><h2 id="_1-2-configure-prometheus-capture-monitoring-metrics" tabindex="-1"><a class="header-anchor" href="#_1-2-configure-prometheus-capture-monitoring-metrics"><span>1.2 configure Prometheus capture monitoring metrics</span></a></h2><ol><li>Download the installation package. Download the Prometheus binary package locally, unzip it and go to the corresponding folder:</li></ol><div class="language-Shell line-numbers-mode" data-ext="Shell" data-title="Shell"><pre class="language-Shell"><code>tar xvfz prometheus-*.tar.gz
cd prometheus-*
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div></div></div><ol start="2"><li>Modify the configuration. Modify the Prometheus configuration file prometheus.yml as follows:<br> a. Added confignode task to collect monitoring data from ConfigNode<br> b. Add datanode task to collect monitoring data from DataNode</li></ol><div class="language-YAML line-numbers-mode" data-ext="YAML" data-title="YAML"><pre class="language-YAML"><code>global:
scrape_interval: 15s
scrape_configs:
- job_name: &quot;prometheus&quot;
static_configs:
- targets: [&quot;localhost:9090&quot;]
- job_name: &quot;confignode&quot;
static_configs:
- targets: [&quot;localhost:9091&quot;, &quot;localhost:9092&quot;, &quot;localhost:9093&quot;]
honor_labels: true
- job_name: &quot;datanode&quot;
static_configs:
- targets: [&quot;localhost:9094&quot;, &quot;localhost:9095&quot;, &quot;localhost:9096&quot;]
honor_labels: true
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div><div class="line-number"></div></div></div><ol start="3"><li>Start Promethues. the default expiration time for Prometheus monitoring data is 15d. in production environments, it is recommended to adjust the expiration time to 180d or more in order to track historical monitoring data for a longer period of time, as shown in the following startup command:</li></ol><div class="language-Shell line-numbers-mode" data-ext="Shell" data-title="Shell"><pre class="language-Shell"><code>./prometheus --config.file=prometheus.yml --storage.tsdb.retention.time=180d
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div></div></div>`,21),_={start:"4"},y={href:"http://localhost:9090",target:"_blank",rel:"noopener noreferrer"},w=i(`<p><img src="https://alioss.timecho.com/docs/img/1a.PNG" alt="" loading="lazy"><br><img src="https://alioss.timecho.com/docs/img/2a.PNG" alt="" loading="lazy"></p><h2 id="_1-3-using-grafana-to-view-monitoring-data" tabindex="-1"><a class="header-anchor" href="#_1-3-using-grafana-to-view-monitoring-data"><span>1.3 Using Grafana to View Monitoring Data</span></a></h2><h3 id="_1-3-1-step1-grafana-installation-configuration-and-startup" tabindex="-1"><a class="header-anchor" href="#_1-3-1-step1-grafana-installation-configuration-and-startup"><span>1.3.1 Step1:Grafana Installation, Configuration and Startup</span></a></h3><ol><li>Download the binary package of Grafana locally, unzip it and go to the corresponding folder:</li></ol><div class="language-Shell line-numbers-mode" data-ext="Shell" data-title="Shell"><pre class="language-Shell"><code>tar -zxvf grafana-*.tar.gz
cd grafana-*
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div><div class="line-number"></div></div></div><ol start="2"><li>Start Grafana and enter:</li></ol><div class="language-Shell line-numbers-mode" data-ext="Shell" data-title="Shell"><pre class="language-Shell"><code>./bin/grafana-server web
</code></pre><div class="line-numbers" aria-hidden="true"><div class="line-number"></div></div></div>`,7),D={start:"3"},k={href:"http://localhost:3000",target:"_blank",rel:"noopener noreferrer"},T=t("li",null,"First we configure the Data Source in Configuration to be Prometheus.",-1),S=i('<figure><img src="https://alioss.timecho.com/docs/img/3a.png" alt="" tabindex="0" loading="lazy"><figcaption></figcaption></figure><ol start="5"><li>When configuring the Data Source, pay attention to the URL where Prometheus is located, and click Save &amp; Test after configuration, the Data source is working prompt appears, then the configuration is successful.</li></ol><figure><img src="https://alioss.timecho.com/docs/img/4a.png" alt="" tabindex="0" loading="lazy"><figcaption></figcaption></figure><h3 id="_1-3-2-step2-import-the-iotdb-dashboards" tabindex="-1"><a class="header-anchor" href="#_1-3-2-step2-import-the-iotdb-dashboards"><span>1.3.2 Step2:Import the IoTDB Dashboards</span></a></h3><ol><li>Enter Grafana,click Browse of Dashboards</li></ol><figure><img src="https://alioss.timecho.com/docs/img/5a.png" alt="" tabindex="0" loading="lazy"><figcaption></figcaption></figure><ol start="2"><li>Click the Import button on the right</li></ol><figure><img src="https://alioss.timecho.com/docs/img/6a.png" alt="" tabindex="0" loading="lazy"><figcaption></figcaption></figure><ol start="3"><li>Select a way to import Dashboard<br> a. Upload the Json file of the downloaded Dashboard locally<br> b. Paste the contents of the Dashboard&#39;s Json file</li></ol><figure><img src="https://alioss.timecho.com/docs/img/7a.png" alt="" tabindex="0" loading="lazy"><figcaption></figcaption></figure><ol><li>Select Prometheus in the Dashboard as the Data Source you just configured and click Import</li></ol><figure><img src="https://alioss.timecho.com/docs/img/8a.png" alt="" tabindex="0" loading="lazy"><figcaption></figcaption></figure><ol start="5"><li>Then enter the Apache ConfigNode Dashboard and see the following monitoring panel</li></ol><figure><img src="https://alioss.timecho.com/docs/img/confignode.png" alt="" tabindex="0" loading="lazy"><figcaption></figcaption></figure><ol start="6"><li>Similarly, we can import Apache DataNode Dashboard and see the following monitoring panel:</li></ol><figure><img src="https://alioss.timecho.com/docs/img/datanode.png" alt="" tabindex="0" loading="lazy"><figcaption></figcaption></figure><ol start="7"><li>Similarly, we can import the Apache Performance Overview Dashboard and see the following monitoring panel:</li></ol><figure><img src="https://alioss.timecho.com/docs/img/performance.png" alt="" tabindex="0" loading="lazy"><figcaption></figcaption></figure><ol start="8"><li>Similarly, we can import the Apache System Overview Dashboard and see the following monitoring panel:</li></ol><figure><img src="https://alioss.timecho.com/docs/img/system.png" alt="" tabindex="0" loading="lazy"><figcaption></figcaption></figure><h3 id="_1-3-3-step3-creating-a-new-dashboard-for-data-visualisation" tabindex="-1"><a class="header-anchor" href="#_1-3-3-step3-creating-a-new-dashboard-for-data-visualisation"><span>1.3.3 Step3:Creating a new Dashboard for data visualisation</span></a></h3><ol><li>First create the Dashboard, then create the Panel.</li></ol><figure><img src="https://alioss.timecho.com/docs/img/11a.png" alt="" tabindex="0" loading="lazy"><figcaption></figcaption></figure><ol start="2"><li>After that, you can visualize the monitoring-related data in the panel according to your needs (all relevant monitoring metrics can be filtered by selecting confignode/datanode in the job first).</li></ol><figure><img src="https://alioss.timecho.com/docs/img/12a.png" alt="" tabindex="0" loading="lazy"><figcaption></figcaption></figure><ol start="3"><li>Once the visualisation of the monitoring metrics selected for attention is complete, we get a panel like this:</li></ol><figure><img src="https://alioss.timecho.com/docs/img/13a.png" alt="" tabindex="0" loading="lazy"><figcaption></figcaption></figure>',27);function I(x,M){const a=r("ExternalLinkIcon");return s(),l("div",null,[c,t("ol",null,[p,t("li",null,[e("Prometheus: version 2.30.3 and above, download from the official website: "),t("a",h,[e("https://prometheus.io/download/"),o(a)])]),t("li",null,[e("Grafana: version 8.4.2 and above, download from the official website: "),t("a",g,[e("https://grafana.com/grafana/download"),o(a)])]),m]),u,t("ol",f,[t("li",null,[e("Enter the "),t("a",b,[e("http://localhost:9091/metrics"),o(a)]),e(" URL in the browser, and you can view the following monitoring item information:")])]),v,t("ol",_,[t("li",null,[e("Confirm the startup is successful. Enter "),t("a",y,[e("http://localhost:9090"),o(a)]),e(" in the browser to enter Prometheus, click to enter the Target interface under Status (Figure 1 below), when you see State are Up, it means the configuration is successful and connected (Figure 2 below), click the link on the left side to jump to the webpage monitoring.")])]),w,t("ol",D,[t("li",null,[e("Enter "),t("a",k,[e("http://localhost:3000"),o(a)]),e(" in your browser to access Grafana, the default initial username and password are both admin.")]),T]),S])}const P=n(d,[["render",I],["__file","Monitoring-Board-Install-and-Deploy.html.vue"]]),B=JSON.parse('{"path":"/UserGuide/latest/Deployment-and-Maintenance/Monitoring-Board-Install-and-Deploy.html","title":"1 Monitoring Board Install and Deploy","lang":"en-US","frontmatter":{"description":"1 Monitoring Board Install and Deploy From the IoTDB 1.0 version, we introduced the system monitoring module, you can complete the IoTDB important operational indicators for mon...","head":[["link",{"rel":"alternate","hreflang":"zh-cn","href":"https://iotdb.apache.org/zh/UserGuide/latest/Deployment-and-Maintenance/Monitoring-Board-Install-and-Deploy.html"}],["meta",{"property":"og:url","content":"https://iotdb.apache.org/UserGuide/latest/Deployment-and-Maintenance/Monitoring-Board-Install-and-Deploy.html"}],["meta",{"property":"og:site_name","content":"IoTDB Website"}],["meta",{"property":"og:title","content":"1 Monitoring Board Install and Deploy"}],["meta",{"property":"og:description","content":"1 Monitoring Board Install and Deploy From the IoTDB 1.0 version, we introduced the system monitoring module, you can complete the IoTDB important operational indicators for mon..."}],["meta",{"property":"og:type","content":"article"}],["meta",{"property":"og:image","content":"https://spricoder.oss-cn-shanghai.aliyuncs.com/Apache%20IoTDB/metric/cluster-introduce/1.png"}],["meta",{"property":"og:locale","content":"en-US"}],["meta",{"property":"og:locale:alternate","content":"zh-CN"}],["meta",{"property":"og:updated_time","content":"2024-04-08T07:45:55.000Z"}],["meta",{"property":"article:modified_time","content":"2024-04-08T07:45:55.000Z"}],["script",{"type":"application/ld+json"},"{\\"@context\\":\\"https://schema.org\\",\\"@type\\":\\"Article\\",\\"headline\\":\\"1 Monitoring Board Install and Deploy\\",\\"image\\":[\\"https://spricoder.oss-cn-shanghai.aliyuncs.com/Apache%20IoTDB/metric/cluster-introduce/1.png\\",\\"https://spricoder.oss-cn-shanghai.aliyuncs.com/Apache%20IoTDB/metric/cluster-introduce/2.png\\",\\"https://spricoder.oss-cn-shanghai.aliyuncs.com/Apache%20IoTDB/metric/cluster-introduce/3.png\\",\\"https://spricoder.oss-cn-shanghai.aliyuncs.com/Apache%20IoTDB/metric/cluster-introduce/4.png\\",\\"https://alioss.timecho.com/docs/img/1a.PNG\\",\\"https://alioss.timecho.com/docs/img/2a.PNG\\",\\"https://alioss.timecho.com/docs/img/3a.png\\",\\"https://alioss.timecho.com/docs/img/4a.png\\",\\"https://alioss.timecho.com/docs/img/5a.png\\",\\"https://alioss.timecho.com/docs/img/6a.png\\",\\"https://alioss.timecho.com/docs/img/7a.png\\",\\"https://alioss.timecho.com/docs/img/8a.png\\",\\"https://alioss.timecho.com/docs/img/confignode.png\\",\\"https://alioss.timecho.com/docs/img/datanode.png\\",\\"https://alioss.timecho.com/docs/img/performance.png\\",\\"https://alioss.timecho.com/docs/img/system.png\\",\\"https://alioss.timecho.com/docs/img/11a.png\\",\\"https://alioss.timecho.com/docs/img/12a.png\\",\\"https://alioss.timecho.com/docs/img/13a.png\\"],\\"dateModified\\":\\"2024-04-08T07:45:55.000Z\\",\\"author\\":[]}"]]},"headers":[{"level":2,"title":"1.1 pre-preparation","slug":"_1-1-pre-preparation","link":"#_1-1-pre-preparation","children":[{"level":3,"title":"1.1.1 software requirement","slug":"_1-1-1-software-requirement","link":"#_1-1-1-software-requirement","children":[]},{"level":3,"title":"1.1.2 Start ConfigNode","slug":"_1-1-2-start-confignode","link":"#_1-1-2-start-confignode","children":[]},{"level":3,"title":"1.1.3 Start DataNode","slug":"_1-1-3-start-datanode","link":"#_1-1-3-start-datanode","children":[]},{"level":3,"title":"1.1.4 clarification","slug":"_1-1-4-clarification","link":"#_1-1-4-clarification","children":[]}]},{"level":2,"title":"1.2 configure Prometheus capture monitoring metrics","slug":"_1-2-configure-prometheus-capture-monitoring-metrics","link":"#_1-2-configure-prometheus-capture-monitoring-metrics","children":[]},{"level":2,"title":"1.3 Using Grafana to View Monitoring Data","slug":"_1-3-using-grafana-to-view-monitoring-data","link":"#_1-3-using-grafana-to-view-monitoring-data","children":[{"level":3,"title":"1.3.1 Step1:Grafana Installation, Configuration and Startup","slug":"_1-3-1-step1-grafana-installation-configuration-and-startup","link":"#_1-3-1-step1-grafana-installation-configuration-and-startup","children":[]},{"level":3,"title":"1.3.2 Step2:Import the IoTDB Dashboards","slug":"_1-3-2-step2-import-the-iotdb-dashboards","link":"#_1-3-2-step2-import-the-iotdb-dashboards","children":[]},{"level":3,"title":"1.3.3 Step3:Creating a new Dashboard for data visualisation","slug":"_1-3-3-step3-creating-a-new-dashboard-for-data-visualisation","link":"#_1-3-3-step3-creating-a-new-dashboard-for-data-visualisation","children":[]}]}],"git":{"createdTime":1692104943000,"updatedTime":1712562355000,"contributors":[{"name":"CritasWang","email":"critas@outlook.com","commits":1},{"name":"ZhangHongYin","email":"46039728+SpriCoder@users.noreply.github.com","commits":1},{"name":"wanghui42","email":"105700158+wanghui42@users.noreply.github.com","commits":1}]},"readingTime":{"minutes":3.63,"words":1090},"filePathRelative":"UserGuide/latest/Deployment-and-Maintenance/Monitoring-Board-Install-and-Deploy.md","localizedDate":"August 15, 2023","autoDesc":true}');export{P as comp,B as data};