I want to subscribe custom data with influxdb.
But I have encounter some problems accomplishing this.
first , I create a database named ‘myDB’ with one measurement “temperature” in which these is one tag named “officename”, one field named “value” . I prepared some data for inserting operation like this.
INSERT temperature,officename=office1 value=5
INSERT temperature,officename=office1 value=62
And it works, the data is definitely stored into influxdb.
I can review it by SELECT clause in the client cmd.
Next I want to create my own subscription item.
I tried to follow influxdb subscription-management tutorial https://docs.influxdata.com/kapacitor/v1.5/administration/subscription-management/
and paste the below line to influx client cmd,
create subscription “mysub1” on “myDB”.“autogen” DESTINATIONS ALL ‘http://localhost:6770/’
I have already written a http server using node.js and listen 6770 port;
In order to see what influxdb would post to my http server.
I copy and paste the prepared INSERT commands to Influx client cmd which showed above one by one .
The INSERT operation is OK.
but what my node.js http server receive is like this.
and I searched in the request params ,this may be the only data that can be useful to determinate the operation I had performed like “/write?consistency=&db=myDB&precision=ns&rp=autogen”
but I want the influxdb to post data about measurements “temperature”, tag “officename” and field “value”. I think these datas may be in form of line protocal but there is nothing about the real data I have performed. What can I do to make it work so that
I can receive real data not only the meaningless data ,help me please!