-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Limit REST API upload failure alert and log to once a day #2858
Limit REST API upload failure alert and log to once a day #2858
Conversation
This has been tested setting the period to 15 minutes to speed up the test. I have chosen not to add yet one more setting to xDrip. |
So overall I agree with the problem you're trying to fix, but rather than annotate the PR I think it should be reworked. For your constants, make them I think it should log more frequently than once per day that there is a problem if the uploader is failing, say once per 6 hours. For the notification once per 24 hours is fine but for the structure of this I would say introduce another rate limit and use Overall this should reduce alerts to once per 24 hours and logs to once per 6 hours, so that if a user has a problem like "why isn't my nightscout working?" then there is a chance they will see the reason in the logs. If their uploads are failing constantly and their nightscout is dead then they should disable the uploader because its a waste of their phone resources not to so we do need to make sure they know. |
There is still something about this that needs to be tweaked. If someone has Nightscout as a part of their loop, whatever receives data from Nightscout should create a sound alert to inform the user that it is not receiving data; therefore, it cannot calculate how much insulin to inject. If someone is following someone through Nightscout, it's the follower that can receive a sound alert if they enable their missed readings alert. But, if I am uploading to Nightscout and have no followers and am not using a loop, why do I need to be woken up in the middle of the night to fix my Nightscout? I can fix it when I am awake. All the readings will be in the queue and as soon as Nightscout is up again, they will all be uploaded. It is not like a low alert that needs action right away. There are people that still are going to disable the alert I think if we don't make it a silent alert. |
Look at some of the other signatures for the |
The notification is now silent (no sound and no vibration). |
If you upload to Nightscout and have no internet access, you will get fail log once every 5 minutes until you have access to the internet again.
You will also receive an alert once every 30 minutes.
Many users just disable the alert.
We have Google Cloud Nightscout users who have not logged into their FreeDNS account for 6 months. As a result, their Nightscout has stopped working. But, they have no idea. The reason is that they have disabled this alert.
If this PR is merged, there will only be a single log once every 6 hours and a single alert only once a day if there is no internet access.
However, the uploaders status page still shows the failure immediately as this PR makes no change to that.
If Nightscout upload is failing, it could just be because you have no access to the internet. In that case, the alert has no value.
If your Nightscout server has gone down, you will need to fix it. Receiving an alert after 24 hours of failure, is not going to take the chance of fixing it away.
So, there is no reason to receive so many alerts and logs.
Please let me know if I am overlooking a scenario when a 5-minute log interval and a 30-minute alert interval is necessary.