I’m using Telegraf in conjunction with QuestDB.
Relevant part of telegraf.conf:
[[outputs.influxdb]]
urls = [127.0.0.1: 9009"]
database = " qdb"
After starting Telegraf I get an error:
2021-12-21T19:23:48Z W! [outputs.influxdb] When writing to [http://127.0.0.1:9009]: database “qdb” creation failed: Post “http://127.0.0.1:9009/query”: context deadline exceeded (Client.Timeout exceeded while awaiting headers)
Any ideas?
P.A. I had to remove the http part in front of 127.0.0.1 because the forum engine told me that I can’t have more than one link in a post…
Per this page it looks like QuestDB supports using Telegraf, but you need to use UDP or TCP. See the page I linked to for the format of the URL to use.
Thank you for your reply!
I changed the configuration line:
urls = [“tcp://127.0.0.1:9009”]
i.e. I changed http to tcp
Now I get another error message:
2021-12-21T19:43:37Z E! [agent] Failed to connect to [outputs.influxdb], retrying in 15s, error was ‘unsupported scheme [“tcp://127.0.0.1:9009”]: “tcp”’
and after 15s:
2021-12-21T19:43:52Z E! [telegraf] Error running agent: connecting output outputs.influxdb: Error connecting to output “outputs.influxdb”: unsupported scheme [“tcp://127.0.0.1:9009”]: “tcp” server terminates
Best regards,
Bert
P.S.
After this I changed “tcp” to “udp” and the error went way, but I want TCP…
P.S.(2)
I replied too quickly. Instead I should have changed the config to: [[outputs.socket_writer]]
Write metrics to a local QuestDB instance over TCP
Just to be clear:
First I configured the [[outputs.influxdb]], but I should not have done that. Instead I should have configured [[outputs.socket_writer]].
So my new config looks like:
[[outputs.socket_writer]]
address = “tcp4://127.0.0.1:9009”
That seems to get rid of the error.
Now I have to solve the JSON parsing error I get…