Hi ,
I want to get the measurement data from influx to other server in real time . The one option I see is using rest API, but I feel this is very expensive to run continuously on servers . Please suggest if there is any better method to do it .
Hi ,
I want to get the measurement data from influx to other server in real time . The one option I see is using rest API, but I feel this is very expensive to run continuously on servers . Please suggest if there is any better method to do it .
@errishma the best way to get all data coming from InfluxDB is to use subscriptions.
CREATE SUBSCRIPTION "sub0" ON "mydb"."autogen" DESTINATIONS ALL 'http://example.com:9090'
This send all writes that InfluxDB receives to http://example.com:9090
in line protocol.
Aha. Thank you Michael. Let me test it. I will update this thread with the results.
Is the URL and port can be anything, like if I want to send the data to SQL server from influx, should I give the URL for that server and Port where sql is running?
Subscriptions write out with InfluxDB’s line protocol; a SQL server wouldn’t be able to understand that.
Perhaps consider an option such as Fluentd to ingest your data? Fluentd can output into many different services, including InfluxDB and SQL.
The URL and port can be anything, but as @luhn notes, it will only output line protocol. You could set up another server to consume that line protocol and translate it into SQL, or use another tool to just send the data that is generated to SQL and Influx.