omnt / OpenMobileNetworkToolkit

OpenMobileNetworkToolkit
BSD 3-Clause Clear License
22 stars 4 forks source link

Local InfluxDB #10

Closed nickvsnetworking closed 3 months ago

nickvsnetworking commented 3 months ago

G'day team,

Finally got some time to play with this, but I can't seem to get the local InfluxDB connection to come up on the Debug or Release builds.

IIRC in the talk at OSMNC you mentioned logging Influx data to a file and the importing it - Is this this functionality?

I did a bit of debugging and it looks like when you tap "Setup Local DB" it tries to connect to an InfluxDB server running on localhost, but I can't find much online about running an InfluxDB server on Android, are you able to give me a point in the right direction here?

My use case is logging data on the phone and then uploading to InfluxDB when we have connectivity again, so pushing directly in Influx Cloud isn't an option.

333771772-295df05f-2bde-41d4-ad3e-efaa57a91a11

hajoha commented 3 months ago

Hi,

what we have done so far, was to download Influx from here for the right ABI and then start the binary via adb shell. I tried to integrate an InfluxDB via JNI (like we did with iPerf3) into the App but that wasn't very successful so far.

But you don't need all this for your use case; just enable Log file this will generate a file under /sdcard/documents/omnt/log. In this file each new line is a point. Either you upload the file via Influx GUI or write a short script that uploads those files. It is on our roadmap to have a list of generated files and to upload at a later point via App. image

PS: I advice to set a tag device=DEVICENAME and measurement name (the naming is quite confusing since InfluxDB uses _measurement). image

hajoha commented 3 months ago

With Rel. 0.3, we finally wrote some doc!