Hi, I’m a beginner with telegraf and have been using with elasticsearch for days which worked fine, but I’m attempting to put data into MariaDB for some reasons. I ran telegraf without applying any plugins and below error occured
2022-11-30T05:49:59Z I! Starting Telegraf 1.12.6
2022-11-30T05:49:59Z E! [telegraf] Error running agent: Error parsing /telegraf/tel-vs.conf, Undefined but requested output: sql
so I’ve been researching for a couple of days and found alot about internal plugins but not a chance with external plugins. Below configuration is what I’m trying to run with .
Is there any guides for applying external plugins to use [[outputs.sql]] ?
Thanks in advance!
[global_tags]
[agent]
interval = "5s"
round_interval = true
metric_batch_size = 1000
metric_buffer_limit = 10000
collection_jitter = "0s"
flush_interval = "5s"
flush_jitter = "0s"
precision = ""
debug = true
quiet = false
logfile = "/home/logs/telegraf/tel-vs.log"
logfile_rotation_interval = "24h"
logfile_rotation_max_archives = 7
hostname = "localhost"
omit_hostname = false
[[inputs.snmp]]
agents = ["192.168.xxx.xx:161"]
version = 2
community = "test"
name="test"
[inputs.snmp.tags]
tag1="test"
[[inputs.snmp.table]]
name = "test"
[[inputs.snmp.table.field]]
oid = "temp"
name = "temp_name"
[[outputs.sql]]
## Database driver
## Valid options: mssql (Microsoft SQL Server), mysql (MySQL), pgx (Postgres),
## sqlite (SQLite3), snowflake (snowflake.com) clickhouse (ClickHouse)
driver = "mysql"
data_source_name = "xxxx:xxxx@tcp(127.0.0.1:3306)/testdata"
table_template = 'CREATE TABLE "test_table"({COLUMNS})'
init_sql = "SET sql_mode='ANSI_QUOTES';"