All Products
Search
Document Center

Connect OpenFalcon to TSDB

Last Updated: Sep 04, 2020

Open-Falcon is an open source and enterprise-level monitoring system that is developed by Xiaomi Corporation&amp. It is widely used by many Internet enterprises in China. Integrated with a variety of components, Open-Falcon can collect, distribute, and archive monitoring data. It also allows you to query monitoring data and can generate alerts. However, Open-Falcon requires an external time series database to store the monitoring data. Currently, Alibaba Cloud Time Series Database (TSDB) can store the monitoring data that is collected by Open-Falcon in TSDB instances.

This topic describes how to store the monitoring data that is collected by an Open-Falcon cluster in TSDB. The following figure shows the architecture in which TSDB is connected to the Open-Falcon cluster.

Prerequisites

This topic uses Open-Falcon v0.2 as an example to show how to connect Open-Falcon to TSDB. Assume that you have installed an Open-Falcon cluster by using the distributed installation method as introduced in Open-Falcon v0.2 documentation.

  • If you have deployed the Open-Falcon cluster in your on-premises data center, make sure that the following requirements are met:

    1. The transfer node in the Open-Falcon cluster can connect to the Internet.
    2. You have applied for a public IP address for the TSDB instance. Assume that the public IP address is ts_xxxx.hitsdb.rds.aliyuncs.com:3242.

      • The following figure shows the button for applying for a public IP address on the details page of the TSDB instance.
    3. You have added the public IP address of the transfer node to the whitelist of the TSDB instance.

  • If the Open-Falcon cluster are deployed on Alibaba Cloud ECS instances, make sure that the following requirements are met:

    1. The TSDB instance and the Open-Falcon cluster are connected to the same VPC.Assume that the VPC IP address of the TSDB instance is ts_xxxx.hitsdb.tsdb.aliyuncs.com:8242 .
    2. You have added the VPC IP address of the transfer node to the whitelist of the TSDB instance.

Considerations

Only TSDB instances of which the TSDB engine version is 2.5.3 or later can connect to Open-Falcon. Check your TSDB engine version before you proceed with the following steps.

You can run the following command to check the TSDB engine version.

  1. $curl ts_xxxx.hitsdb.tsdb.aliyuncs.com:8242/api/version
  2. {...( Omitted)...,"version":"2.5.3",...( Omitted)...}

Configure a transfer node to connect to TSDB

A transfer node receives the monitoring data that is collected by the Open-Falcon cluster, and forwards the monitoring data to TSDB. An Open-Falcon cluster can have multiple transfer nodes. This topic describes how to configure a transfer node to connect to the TSDB instance.

  1. Modify the configuration file of the transfer node. The default path of the file is /path/to/transfer/config/cfg.json.

    • Set the tsdb parameter to true. This operation enables TSDB for storing backend time series data.
    • Change the value of the address parameter to the public IP address or VPC IP address of the TSDB instance. The value depends on where you have deployed the Open-Falcon cluster. For more information, see the “Prerequisites” section.
    • The following figure shows a part of the configuration file of the transfer node to be connected to the TSDB instance.
    1. {
    2. ...( Omitted)...
    3. "tsdb": {
    4. "enabled": true,
    5. "batch": 200,
    6. "Timeout": 1000,
    7. "callTimeout": 5000,
    8. "maxConns": 32,
    9. "maxIdle": 32,
    10. "retry": 3,
    11. "address": "ts_xxxx.hitsdb.tsdb.aliyuncs.com:8242"
    12. }
    13. }
  2. Restart the transfer process.

  3. If multiple transfer nodes exist, repeat step 1 and step 2 to configure the remaining transfer nodes.

After the transfer nodes are configured, you can view the monitoring data that is collected by Open-Falcon on the Instance Monitoring page in the TSDB console. You can also connect the TSDB instance to Grafana. After this operation, Grafana can visualize and analyze the data in the TSDB instance. For more information, see Connect Grafana to TSDB.