kerberos-io / agent

An open and scalable video surveillance system for anyone making this world a better and more peaceful place.
https://kerberos.io
MIT License
642 stars 78 forks source link

Disable uploads #85

Closed Hooch76 closed 1 year ago

Hooch76 commented 1 year ago

Hi,

is there a way to disable uploading mp4 files?

2023-03-15T12:47:56+01:00 INF msg=UploadS3: Upload started for .mp4 2023-03-15T12:47:56+01:00 ERR msg=UploadS3: Uploading Failed, Bucket name cannot be empty

There are is nothing configured in Settings -> Persistence: Kerberos Hub and Persistence.

I am aware of the option "Offline mode", but that also disables MQTT (which is running locally) so this does not help.

Thanks.

cedricve commented 1 year ago

Good point, we will add that to our roadmap. Indeed offline is the current work-a-around, but that might not cover all scenarios (as what you use mentioned). Thanks for the feedback!

On 15 Mar 2023, at 12:54, Hooch76 @.***> wrote:

Hi,

is there a way to disable uploading mp4 files?

2023-03-15T12:47:56+01:00 INF msg=UploadS3: Upload started for .mp4 2023-03-15T12:47:56+01:00 ERR msg=UploadS3: Uploading Failed, Bucket name cannot be empty

There are is nothing configured in Settings -> Persistence: Kerberos Hub and Persistence.

I am aware of the option "Offline mode", but that also disables MQTT (which is running locally) so this does not help.

Thanks.

— Reply to this email directly, view it on GitHub https://github.com/kerberos-io/agent/issues/85, or unsubscribe https://github.com/notifications/unsubscribe-auth/AALZUG2YKNSPMLG67KLGB4TW4GUYRANCNFSM6AAAAAAV3WLGVY. You are receiving this because you are subscribed to this thread.

Icemic commented 1 year ago

notices this silent uploading too, which causing tranfer data up to 100GiB per day!

The target ip address is 35.187.121.96 which seems to be a proxy.

Where was it uploading to? And how you treat those data? Since I did NOT add any config of Kerberos Hub but keep it as default

cedricve commented 1 year ago

We will add a disable upload option asap, (similar to offline mode), or disable it if no credentials are set. https://github.com/kerberos-io/agent/blob/master/machinery/src/cloud/Cloud.go#L53

cedricve commented 1 year ago

I have added a fix, please pull latest release! ;) Thanks for opening this issue! https://github.com/kerberos-io/agent/commit/58c3e73f6f42ca72d78e7da2c5481a6f511b805e. Please close if sufficient.

Hooch76 commented 1 year ago

Hi,

I am using kerberos agent d9694ac and those lines are no longer appearing in the logs, so this seems to be fixed:

INF msg=UploadS3: Upload started for .mp4 ERR msg=UploadS3: Uploading Failed, Bucket name cannot be empty

I don't know if it is related, but now I see every 30s or so:

RR msg=HandleHeartBeat: (400) Something went wrong while sending to Kerberos Hub.

I've to wait for something moving in front of the camera to be able to tell if MQTT is still working though ;-)

Hooch76 commented 1 year ago

Update ... this is how it looks like now:

INF msg=HandleRecordStream: Synced file: 1679313244_6-967003_xxyyzz_200-200-400-400_1082_769.mp4 INF msg=HandleRecordStream: motion detected while recording. Expanding recording. INF msg=Received message with recording data, detected changes to save: 8999 ERR msg=UploadS3: Uploading Failed, as no credentials found ERR msg=UploadS3: Uploading Failed, as no credentials found ERR msg=UploadS3: Uploading Failed, as no credentials found INF msg=HandleStream: packet size 36379 INF msg=HandleRecordStream: Synced file: 1679313244_6-967003_xxyyzz_200-200-400-400_1082_769.mp4 INF msg=HandleRecordStream: motion detected while recording. Expanding recording. INF msg=Received message with recording data, detected changes to save: 7026 ERR msg=UploadS3: Uploading Failed, as no credentials found

cedricve commented 1 year ago

@Hooch76 let me check the heartbeat. Yes this is expected! We might get rid of the uploaded recordings if no credentials are set. I believe it will now keep uploading recordings.

cedricve commented 1 year ago

This has been fixed by https://github.com/kerberos-io/agent/commit/71cd315142a97f56596bfe3b56a3c5aadb45d592. Thanks @Hooch76