Kitz Forum

Broadband Related => Router Monitoring Software => Topic started by: boost on July 09, 2018, 02:42:26 PM

Title: dslstats datastore into dynamodb?
Post by: boost on July 09, 2018, 02:42:26 PM
I'm trying to work out the easiest way to get my dslstats 'datastore' data into ze cloud. Into DynamoDB in particular.

I've been messing around with some stuff and have managed a proof of concept of sorts with:

curl -v -H "Content-Type: application/json" -X POST --data @params.json https://9a5gct3cicx1.execute-api.eu-west-2.amazonaws.com/alpha/testdb

So that allowed me to send some basic stats, via HTTP, into AWS, via API gateway, into DynamoDB.

So now I'm looking at Stats.txt and wondering how I convert this into JSON (is this the best way?) so I can fire it up to AWS and then hopefully graph it with chartjs.

Code: [Select]
09/07/2018 14:37 40000 9997 19.4 14.4 13.3 -1.8 83812 23915 PTM 0.00 0.00 2.50 0.00 0 0 4665656 1 0 0 0 1296.016 21 0 0 7 0 0 18 0 0 7 0 0 0 0 0 16 1 0 208 0 0 0 0 0 0 0 0 4.3 12.8 19.7 0 8.3 17.6 24.0 4.3 0 19.9 0 11.9 17.8 24.0 14.5 0 14.4 0 19.4 19.3 19.4 16.8 0 0 0 0 0 0 Showtime 0 -1 L0 17a ON ON No Showtime 12.9 0.0 178 31 1 1 0 64 12 2 0.1424 0.1017 10727 2675 0 0 0 0 0 0 0 0 39991 0 V5 23 23 45.00 0.00 2.50 0.00 0 0 1 0 1791854 72 VDSL2 0 0 0 0 12.9 0.0 0 0 83812 23915 0 0 0 0 0 0

On the other end of the scale, I've managed to get a very basic looking line chart working which I'm probably far too proud with! :)

Any thoughts for this 'middle bit'? :)