OS2iot / OS2iot-backend

This repository contains the backend to the project OS2iot.
Mozilla Public License 2.0
10 stars 7 forks source link

When applying a decoder function. The data-package is saved in the log. #120

Closed aNorrah closed 2 years ago

aNorrah commented 2 years ago

Example without any sensitive information (emails names have been removed):

stdout,"[Nest] 18 - 10/07/2021, 1:58:51 PM [38 5 3m[PayloadDecoderExecutorService] Returned: '{""payload"":{""applicationID"":""1"",""applicationName"":""os2iot-2132e4b0-549d-4d39-9431-d1202889a1d6"",""deviceName"":""os2iot-70b3d563800001d5"",""devEUI"":""70b3d563800001d5"",""rxInfo"":[{""gatewayID"":""7276ff002e050870"",""uplinkID"":""c22d1d91-f063-4773-a187-f67aef492616"",""name"":""2074-LRW-01"",""time"":""2021-10-07T13:58:50.779646Z"",""rssi"":-115,""loRaSNR"":-7,""location"":{""latitude"":56.288482666015625,""longitude"":10.216209411621094,""altitude"":86}}],""txInfo"":{""frequency"":868500000,""dr"":3},""adr"":true,""fCnt"":10743,""fPort"":2,""data"":""00BA5FDC""},""metadata"":{""id"":11,""createdAt"":""2021-08-09T08:48:14.307Z"",""updatedAt"":""2021-08-09T08:48:14.307Z"",""name"":""70B3D563800001D5"",""location"":{""type"":""Point"",""coordinates"":[10.2282129,56.2363043]},""commentOnLocation"":null,""comment"":null,""metadata"":null,""type"":""LORAWAN"",""deviceEUI"":""70b3d563800001d5"",""chirpstackApplicationId"":1,""application"":{""id"":7,""createdAt"":""2021-08-06T11:10:55.750Z"",""updatedAt"":""2021-08-11T08:12:06.937Z"",""name"":""MTM - Cykelsti (udeklima)"",""description"":""OPI samarbejde med Sensade omkring måling af temperaturer i cykelstier. \n\nStatus: Projektforløb\n\nStart: primo 2020\nSlut: Forventet slutdato Q3 2021\n\nHardware: 8 x sensorer fra Sensade (+ 5 fra tidligere projekt der gerne må slettes når de løber tør)\nData: Temperatur\nForbindelsesteknologi: LoRaWan\n\nEjer: Drift @ MTM\n\nKontakt:\nITK, NAME OF PERSON, EMAIL OF SAID PERSON ""},""deviceModel"":null}}'","10/7/2021, 3:58:51.214 PM","aks-defaultpool-23477378-vmss000005","os2iot/os2iot-backend","7434902b-2a09-47cf-a6c2-3b1d327eb0ba/os2iot-backend",7ab8aced70f9d4ea71c76f438b9a9ed003f5add2df216c52190a3d998a947716

This is saved in the log. First of all, it's a lot to log. 8mb data from 4 hours. Purge that bad boy.

Second of all, the actual time-series data is saved in the log. Although we technically do not save the data as time-series, it is possible to recreate all data that have been sent through the platform through the log. This is problematic.

ramogens commented 2 years ago

Thank you once again, @aNorrah. We will start looking into a fix.

GufCab commented 2 years ago

When PR #127 has been merged, you are now able to set the log level globally through environment variables. Setting the log level to anything above 'debug' will make sure the package is not logged.

ramogens commented 2 years ago

Hi @GufCab - when do you expect to be able to merge PR #127 ? GovTech Midtjylland would like to get this fix included in a upcoming update of their installation and need to plan ahead.

GufCab commented 2 years ago

I was planning on Thursday, it is really only waiting on a review from @MadsSvejstrup If GovTech Midtjylland needs it sooner, I can try and prioritize it in tomorrow - I don't expect there to be many changes.

ramogens commented 2 years ago

Thursday will be fine. Thanks!