跳到主要内容
版本:1.x

Jdbc

Input plugin : Jdbc

Description

Read data from an external data source via JDBC.

Options

nametyperequireddefault value
driverstringyes-
passwordstringyes-
tablestringyes-
table_namestringyes-
urlstringyes-
userstringyes-
driver [string]

Class name of jdbc driver.

password [string]

Password.

table [string]

Table name.

table_name [string]

Registered table name of input data.

url [string]

The url of JDBC. For example: jdbc:postgresql://localhost/test

user [string]

Username.

Example

jdbc {
driver = "com.mysql.jdbc.Driver"
url = "jdbc:mysql://localhost:3306/info"
table = "access"
table_name = "access_log"
user = "username"
password = "password"
}

Read data from MySQL with jdbc.