Losgstash output to influxdb


(Sharath Chandra Parashara) #1

HI All,

kindly help me on below time series data
{
"data_points": "{"HOST-4B1811DD3A99AEEE":[[1480407000000,7.572072347005208],[1480407300000,10.174551391601563],[1480407600000,11.274533081054688],[1480407900000,10.918942260742188],[1480408200000,11.165498860677083],[1480408500000,12.441584269205729],[1480408800000,11.620009358723959],[1480409100000,10.936544799804688],[1480409400000,13.7223388671875],[1480409700000,15.466360473632813],[1480410000000,13.74994608561198],[1480410300000,25.30794881184896],[1480410600000,29.360233561197916],[1480410900000,25.552915445963542],[1480411200000,25.630643717447917],[1480411500000,25.520517985026043],[1480411800000,24.68827107747396],[1480412100000,25.88740234375],[1480412400000,28.047538248697915],[1480412700000,25.476920572916665],[1480413000000,23.688818359375],[1480413300000,25.253739420572916],[1480413600000,26.68292236328125],[1480413900000,24.790008544921875],[1480414200000,23.175630696614583],[1480414500000,23.067995198567708],[1480414800000,23.284574381510417],[1480415100000,23.381075032552083],[1480415400000,24.796771240234374],[1480415700000,22.373063151041666],[1480416000000,19.74171346028646],[1480416300000,17.12442423502604],[1480416600000,14.862820434570313],[1480416900000,14.27531026204427],[1480417200000,15.174294026692708],[1480417500000,14.063817342122396],[1480417800000,13.039839680989584],[1480418100000,11.54337666829427],[1480418400000,10.644316609700521],[1480418700000,11.700492350260417],[1480419000000,12.348042805989584],[1480419300000,15.036073811848958],[1480419600000,13.42550048828125],[1480419900000,13.601542154947916],[1480420200000,11.275023396809896],[1480420500000,11.725129191080729],[1480420800000,13.450543212890626],[1480421100000,13.408186848958334],[1480421400000,12.885349527994792],[1480421700000,13.035353597005209],[1480422000000,13.520041910807292],[1480422300000,14.239255777994792],[1480422600000,16.1342041015625],[1480422900000,16.958610026041665],[1480423200000,15.611937459309896],[1480423500000,16.179959360758463],[1480423800000,13.90454559326172],[1480424100000,12.223073959350586],[1480424400000,12.759731038411458],[1480424700000,12.182673136393229],[1480425000000,11.70749766031901],[1480425300000,15.980795288085938],[1480425600000,15.608455912272136],[1480425900000,16.412744140625],[1480426200000,16.08203125],[1480426500000,16.527525329589842],[1480426800000,16.206462097167968],[1480427100000,16.41839116414388],[1480427400000,16.33049138387044],[1480427700000,14.75553461710612],[1480428000000,13.061280314127604],[1480428300000,46.26294072469076],[1480428600000,null]]}",
"tags": []
}

I need to send the above time,memory utilization data to influx db ? kindly help me in parsing data to influx db as well as with logstash confligration


(Magnus Bäck) #2

Use a json filter to process the JSON string in the data_points field, then perhaps you can use a split filter to split the data points into multiple events.

There might not be that many folks with InfluxDB experience here, so you might get better help if you can be more specific in what you want to transform the event above to.


(Sharath Chandra Parashara) #3

Hi Magnusbeck,

Thanks for your response.

The above data is a time series data from cloud dynatrace using rest api .

As per the requirement i need to visualize this time series data in grafana using infuxdb or else i need to use elastic search with kibana. Each array consist of time (1480407000000) and average cpu utilization (7.572072347005208) that is represent as above [1480407000000,7.572072347005208] . The above data is a streaming data for every 1min i will get new records. Kindly help me in processing and visualize this time series data


(Magnus Bäck) #4

Okay. Then use a json filter to deserialize the JSON payload in the data_points field. Then use the split filter on the HOST-4B1811DD3A99AEEE field. Since I suspect that the name of the HOST-4B1811DD3A99AEEE field is dynamic you may have to use a ruby filter to give it a consistent name first.

Sorry for the lack of details but I don't have time to write up an example.


(system) #5

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.