Open-Falcon is an open source and enterprise-grade monitoring service. It is used by a large number of Internet enterprises in China. Open-Falcon incorporates a variety of components to provide multiple features. This service can collect, distribute, and archive monitoring data. It can also generate alerts and allows you to query the monitoring data. However, external time series databases are required to store the monitoring data generated by Open-Falcon. You can connect Alibaba Cloud Time Series Database (TSDB) to Open-Falcon to store the monitoring data in TSDB instances.

This topic describes how to store the monitoring data collected by an Open-Falcon cluster in TSDB.

Prerequisites

This topic describes how to connect Open-Falcon to TSDB. Open-Falcon V0.2 is used in the example. Before you begin, install and deploy an Open-Falcon cluster. For more information, see the description about the distributed installation method in the official documentation of Open-Falcon V0.2.

  • If the Open-Falcon cluster is deployed in your data center, ensure that the following requirements are met:

    1. The transfer nodes in the Open-Falcon cluster can access the Internet.
    2. You have applied for a public endpoint for the TSDB instance to be connected to Open-Falcon. The endpoint ts_xxxx.hitsdb.rds.aliyuncs.com:3242 is used in the example in this topic.

      The entry point for applying for an instance public endpoint on the instance management page in the TSDB console

    3. You have added the public endpoints of the transfer nodes to the whitelist of the TSDB instance.
  • If the Open-Falcon cluster is deployed on Elastic Compute Service (ECS) instances, ensure that the following requirements are met:

    1. The TSDB instance and the Open-Falcon cluster are connected to the same virtual private cloud (VPC). In the example, ts_xxxx.hitsdb.tsdb.aliyuncs.com:8242 is used as the VPC endpoint of the TSDB instance.
    2. You have added the VPC endpoints of the transfer nodes to the whitelist of the TSDB instance.

Note

Only TSDB instances with the engine version 2.5.3 or later can be connected to Open-Falcon. You can run the following command to check the TSDB engine version:

$curl ts_xxxx.hitsdb.tsdb.aliyuncs.com:8242/api/version
{...(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 configuration file is /path/to/transfer/config/cfg.json.
    • Set the tsdb parameter to true. This value indicates that Open-Falcon uses TSDB to store the time series data in the backend.
    • Set the address parameter to the public endpoint or VPC endpoint of the TSDB instance. If the Open-Falcon cluster is deployed on the Internet, set the parameter to the public endpoint. If the Open-Falcon cluster is deployed in a VPC, set the parameter to the VPC endpoint. For more information, see Prerequisites.
    • The following sample code provides an example on how to configure the transfer node to connect to the TSDB instance:
        {
            ...(Omitted)...
            "tsdb": {
                "enabled": true,
                "batch": 200,
                "Timeout": 1000,
                "callTimeout": 5000,
                "maxConns": 32,
                "maxIdle": 32,
                "retry": 3,
                "address": "ts_xxxx.hitsdb.tsdb.aliyuncs.com:8242"
            }
        }
  2. Restart the transfer process.
  3. If multiple transfer nodes exist, perform Steps 1 to 2 on the other transfer nodes.

After you complete the preceding operations, the monitoring data collected by Open-Falcon is written to the TSDB instance. You can view the data on the Instance Monitoring page in the TSDB console. You can also connect the TSDB instance to Grafana to perform visualized data analysis. For more information, see Connect Grafana to TSDB for InfluxDB®️.