Skip to content

Latest commit

 

History

History
51 lines (34 loc) · 4.55 KB

SQL_DRIVERS_INPUT.md

File metadata and controls

51 lines (34 loc) · 4.55 KB

Available SQL drivers for the SQL input plugin

This is a list of available drivers for the SQL input plugin. The data-source-name (DSN) is driver specific and might change between versions. Please check the driver documentation for available options and the format.

database driver aliases example DSN comment
CockroachDB cockroach postgres or pgx see postgres driver uses PostgresQL driver
MariaDB maria mysql see mysql driver uses MySQL driver
Microsoft SQL Server sqlserver mssql username:password@host/instance?param1=value&param2=value uses newer sqlserver driver
MySQL mysql [username[:password]@][protocol[(address)]]/dbname[?param1=value1&...&paramN=valueN] see driver docs for more information
PostgreSQL postgres pgx [user[:password]@][netloc][:port][,...][/dbname][?param1=value1&...] see postgres docs for more information
SQLite sqlite filename see driver docu for more information
TiDB tidb mysql see mysql driver uses MySQL driver
ClickHouse clickhouse tcp://host:port[?param1=value&...&paramN=value]" see clickhouse-go docs for more information

Comments

Driver aliases

Some database drivers are supported though another driver (e.g. CockroachDB). For other databases we provide a more obvious name (e.g. postgres) compared to the driver name. For all of those drivers you might use an alias name during configuration.

Example data-source-name DSN

The given examples are just that, so please check the driver documentation for the exact format and available options and parameters. Please note that the format of a DSN might also change between driver version.

Type conversions

Telegraf relies on type conversion of the database driver and/or the golang sql framework. In case you find any problem, please open an issue!

Help

If nothing seems to work, you might find help in the telegraf forum or in the chat.

The documentation is wrong

Please open an issue or even better send a pull-request!

I found a bug

Please open an issue or even better send a pull-request!

My database is not supported

We currently cannot support CGO drivers in telegraf! Please check if a pure Go driver for the golang sql framework exists. If you found such a driver, please let us know by opening an issue or even better by sending a pull-request!