Skip to main content

Monitoring Board Install and Deploy

About 3 min

Monitoring Board Install and Deploy

From the Apache IoTDB 1.0 version, we introduced the system monitoring module, you can complete the Apache IoTDB important operational indicators for monitoring, this article describes how to open the system monitoring module in the Apache IoTDB distribution, and the use of Prometheus + Grafana way to complete the visualisation of the system monitoring indicators.

pre-preparation

software requirement

  1. Apache IoTDB: version 1.0 and above, download from the official website: https://iotdb.apache.org/Download/open in new window
  2. Prometheus: version 2.30.3 and above, download from the official website: https://prometheus.io/download/open in new window
  3. Grafana: version 8.4.2 and above, download from the official website: https://grafana.com/grafana/downloadopen in new window
  4. IoTDB-Grafana installer: Grafana Dashboards is an TimechoDB(Enterprise Edition based on IoTDB) tool, and you may contact your sales for the relevant installer.

cluster requirement

Make sure that the IoTDB cluster is started before doing the following.

clarification

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.

NODETYPENODEIPMonitor PusherMonitor LevelMonitor Port
ConfigNode127.0.0.1PROMETHEUSIMPORTANT9091
DataNode127.0.0.1PROMETHEUSIMPORTANT9093

configure Prometheus capture monitoring metrics

  1. Download the installation package. Download the Prometheus binary package locally, unzip it and go to the corresponding folder:
tar xvfz prometheus-*.tar.gz
cd prometheus-*
  1. Modify the configuration. Modify the Prometheus configuration file prometheus.yml as follows:
    a. Added confignode task to collect monitoring data from ConfigNode
    b. Add datanode task to collect monitoring data from DataNode
global:
  scrape_interval: 15s

scrape_configs:
  - job_name: "prometheus"
    static_configs:
    - targets: ["localhost:9090"]
  - job_name: "confignode"
    static_configs:
    - targets: ["localhost:9091"]
    honor_labels: true
  - job_name: "datanode"
    static_configs:
    - targets: ["localhost:9093"]
    honor_labels: true
  1. 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:
./prometheus --config.file=prometheus.yml --storage.tsdb.retention.time=180d
  1. Confirm the startup is successful. Enter http://localhost:9090open in new window 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.


Using Grafana to View Monitoring Data

Step1:Grafana Installation, Configuration and Startup

  1. Download the binary package of Grafana locally, unzip it and go to the corresponding folder:
tar -zxvf grafana-*.tar.gz
cd grafana-*
  1. Start Grafana and enter:
./bin/grafana-server web 
  1. Enter http://localhost:3000open in new window in your browser to access Grafana, the default initial username and password are both admin.
  2. First we configure the Data Source in Configuration to be Prometheus.
  1. When configuring the Data Source, pay attention to the URL where Prometheus is located, and click Save & Test after configuration, the Data source is working prompt appears, then the configuration is successful.

Step2:Use the official Grafana dashboard provided by IoTDB

  1. Enter Grafana,click Browse of Dashboards
  1. Click the Import button on the right
  1. Select a way to import Dashboard
    a. Upload the Json file of the downloaded Dashboard locally
    b. Enter the URL or ID of the Dashboard obtained from the Grafana website
    c. Paste the contents of the Dashboard's Json file
  1. Select Prometheus in the Dashboard as the Data Source you just configured and click Import
  1. Then enter Dashboard,select job to be ConfigNode,then following monitoring dashboard will be seen:
  1. Similarly, we can import the Apache DataNode Dashboard, select job as DataNode,then following monitoring dashboard will be seen:

Step3:Creating a new Dashboard for data visualisation

  1. First create the Dashboard, then create the Panel.
  1. 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).
  1. Once the visualisation of the monitoring metrics selected for attention is complete, we get a panel like this:

Copyright © 2024 The Apache Software Foundation.
Apache and the Apache feather logo are trademarks of The Apache Software Foundation

Have a question? Connect with us on QQ, WeChat, or Slack. Join the community now.

We use Google Analytics to collect anonymous, aggregated usage information.