FluentD not accepting inline data from InfluxDB

Hi,
I have saved some measurement values in InfluxDB. I want to send these values from InfluxDB to FleuntD.

time Value Name host


1573531320000000000 28 temperature localhost
1573531420000000000 30 temperature localhost
1573531520000000000 29 temperature localhost
1573531620000000000 31 temperature localhost

The above measurement values are in Telegraf database.

I created a FluentD container with the following configuration in docker and listening on the port 9880.

/tmp/fluentd.conf

@type http port 9880 bind 0.0.0.0 @type stdout

I have created a subscription on this telegraf database in InfluxDB as follows.

CREATE SUBSCRIPTION “myfluentd” ON “telegraf”.“autogen” DESTINATIONS ALL ‘http://172.17.0.4:9880/influx

I inserted some more values in telegraf database. Here, InfluxDB sends data to FluentD in inline data format. FleuntD is not accepting the data and rejects the request stating as bad request.

I found the following log in the InfluxDB.
ts=2019-11-19T09:21:30.046330Z lvl=info msg=“400 Bad Request\n’json’ or ‘msgpack’ parameter is required\n” log_id=0JCbhj10000 service=subscriber

FleuntD expecting data in json format or msgpack. so, it is rejecting the request.

This curl request is accepted and prints the json mesages on stdout.
curl -X POST -d ‘json={“Name”:“Ramakrishna”}’ http://172.17.0.4:9880/influx

How to send data from InfluxDB to FleuntD?

Thanks
Ramakrishna

Hello @rpotluru,
Thanks for your question. Have you considered just using the fluentd input telegaf plugin or output plugin (giving you both resources just in case :wink: ) ? Alternatively, it looks like some people solved a similar issue in this thread.

Thanks for the reply. I want to pull the already saved data in Influxdb using FluentD.
Here, Telegraf and Influxdb are in my local machine. FluentD is in the remote machine.
is there anyway FluentD can pull the data from the remote Influxdb?

@rpotluru,
Did the input plugin I linked not work? you should be able to run telegraf and influxdb remotely and pull data from fluentD into InfluxDB with that plugin.

I want to pull the data that is already in InfluxDB.
You are saying how to save data into InfluxDB using FleuntD.
But my question is , is there any way to pull the data from InfluxDB using FleuntD.

My apologies! I got confused the second time. Have you taken a look at the output plugin I sent above?

Thanks. I am not writing data to influxDB using FluentD. here, I want to read data from influxDB using FluentD.