All Products
Search
Document Center

Elasticsearch:Configure third-party libraries

Last Updated:Nov 19, 2024

If you want to specify driver files in the configuration file of an Alibaba Cloud Logstash cluster, you can use the Third-party Libraries feature to upload the driver files. The Third-party Libraries feature also allows you to manage the uploaded driver files.

Procedure

  1. Go to the Logstash Clusters page of the Alibaba Cloud Elasticsearch console.
  2. Navigate to the desired cluster.
    1. In the top navigation bar, select the region where the cluster resides.
    2. On the Logstash Clusters page, find the cluster and click its ID.
  3. In the left-side navigation pane of the page that appears, click Cluster Configuration.

  4. In the Third-party Libraries section, click Manage on the right side of Upload.

  5. In the lower part of the Modify Configuration panel, click Configure.

  6. Click Upload. Then, in the dialog box that appears, select the files that you want to upload.

    You can upload multiple driver files at a time. The file name extension of each driver file must be .jar, and each file name cannot exceed 100 characters in length. The system checks file names and MD5 checksum values before the files are uploaded. If the check fails, the system displays an error message, which indicates that the files cannot be uploaded.

    The following table lists the driver files that are supported by Logstash.

    Driver type

    Driver file

    MySQL JDBC driver

    JDBC driver of PolarDB for Oracle

    JDBC driver of PolarDB for Oracle.zip

    Note

    Alibaba Cloud PolarDB for Oracle provides JDBC drivers that are compatible with Java 6, Java 7, or Java 8. The following driver files are provided:

    • polardb-jdbc16.jar

    • polardb-jdbc17.jar

    • polardb-jdbc18.jar

    You can select a JDBC driver based on the Java Development Kit (JDK) version that is used by your application.

    PostgreSQL JDBC driver

    Warning

    After you upload driver files for a cluster, the system restarts the cluster. This may affect your services. Proceed with caution.

  7. Click Save.

    Then, the system restarts the cluster. After the cluster is restarted, the third-party libraries are configured.

  8. Optional:Click Manage on the right side of Upload to view the information about the third-party libraries in the Modify Configuration panel.

    The information of the third-party libraries contains File Name and File Path. If you want to use the third-party libraries when you configure a pipeline, you can obtain the paths of the third-party libraries from the File Path column and specify the paths in the configuration file of the pipeline. For more information, see Use Logstash to synchronize data from ApsaraDB RDS for MySQL to Elasticsearch.

    Important
    • For security purposes, if you specify a JDBC driver when you configure a pipeline, you must add allowLoadLocalInfile=false&autoDeserialize=false at the end of the jdbc_connection_string parameter, such as jdbc_connection_string => "jdbc:mysql://xxx.drds.aliyuncs.com:3306/test-database?allowLoadLocalInfile=false&autoDeserialize=false". Otherwise, when you add a configuration file for the Logstash pipeline, the system displays an error message that indicates a check failure.

    • To remove a file that you no longer use, go to the Modify Configuration panel, click Configure in the lower part, find the file, and then click the Delete icon.

References

  • API operation used to query the third-party libraries configured for a Logstash cluster: ListExtendfiles

  • API operation used to update the third-party libraries configured for a Logstash cluster: UpdateExtendfiles