Skip to content
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

Show if devices have not connected in a long time #7703

Closed
SixFive7 opened this issue May 21, 2021 · 11 comments
Closed

Show if devices have not connected in a long time #7703

SixFive7 opened this issue May 21, 2021 · 11 comments
Labels
enhancement New features or improvements of some kind, as opposed to a problem (bug) frozen-due-to-age Issues closed and untouched for a long time, together with being locked for discussion ui Issues related to the graphical user interface
Milestone

Comments

@SixFive7
Copy link

SixFive7 commented May 21, 2021

Currently folders that are up to date are shown like this:
image

However, the second folder has not been syncing for at least a year!
A problem that is not directly apparent from the overview. Only after inspecting the list of devices synced with this folder and then opening each device to look at the "last seen" value might it become clear that this folder has not been synced in a long time.

To help get trustworthy status update at first glance (something that instills trust in Syncthing) I suggest the above to be changed to:
image

The threshold for when a folder is considered possibly stale could be some high value by default but editable in the advanced settings of the folder. Let's say a default of 14 days as not all use cases have at least 1 devices online always every second. However, if a folder has not synced (not seen a single device) for weeks; I'd consider that something most people would want to know.

Update: This warning would align with the other similar orange warning when Syncthing knows it can't ever be synced:
image

@SixFive7 SixFive7 added enhancement New features or improvements of some kind, as opposed to a problem (bug) needs-triage New issues needed to be validated labels May 21, 2021
@bt90
Copy link
Contributor

bt90 commented May 21, 2021

Not really a fan of this concept as the duration for something to be considered stale is highly subjective. This could be anything between minutes and months.

And it's not a useful information in a multi node cluster. The real source could have been long gone and the other nodes would happily keep it synced.

An additional timestamp detail like "last modified" would probably have more value.

@SixFive7
Copy link
Author

I agree the timing is highly subjective. However I still think any information is better then nothing. To clarify in light of a multi node cluster scenario:

  • The warming should not show if a folder has at least 1 peer that has been online (syncing or not).
  • The warning should not appear on a folder if there is a problem with just one of it's peers.
  • The warning should only appear on a folder if that folder on that device has not synced with any of its peers in weeks (adjustable).
  • Maybe we can even extend this and show a stale warning on the peers gui if a peer has not been seen in weeks?

A real life example from one of my setups. For a folder I had the topology:
image

Then my computer had to be replaced and I went about reinstalling everything. Syncthing was not my only priority at the time so I made a mistake and forgot the link to the storage server for this folder:
image

I do check the health of my storage server by glancing oer the 30+ folders on the syncthing dashboard of my storage server once in a while. However, because I forgot to replace the link the storage server kept showing "Up to Date" for this folder even though it had not seen my old PC (and thus any peer) in almost a year. As a consequence I've not enjoyed file versioning for that year.

Now I do realize that on the storage server I could see my old pc be "offline". However, there are many peers (more so than folders) all sometimes online, offline or unused and with different naming schemes making it not really useful to look at and quickly get a feel of the state. And even when I do notice the peer it will just be offline. In practice one looks at the page scanning for warnings (in color) to determine the health of the system. Is there something red or something yellow; then I'll take a look at it. Only this would have draw attention.
Thus it would have been really helpful if Syncthing would have notified me with such warning if it hadn't seen any peer for a long time. It has the information readily available already.

Maybe something like this:
image

Update: Maybe tombstoned is the wrong wording here. What about this:
image

@AudriusButkevicius
Copy link
Member

AudriusButkevicius commented May 21, 2021

To be honest, I feel this is your observability issue due to nature of your setup (a lot of devices yada yada), and not syncthing Issue.

If you have a large setup, I'd expect you to invest time into monitoring it or building tools that help you monitor it.

As it stands I feel you to asking us to solve your observability problems.

I am not against the idea, but I feel it will be of no use or even an annoyance for most users, and seems implementing like that would have a non-trivial engineering.

@SixFive7
Copy link
Author

SixFive7 commented May 21, 2021

You misunderstand. I don't expect anybody to solve my observability problems. And laying out this feature request in detail and in good faith is my attempt at investing time in better tools to help monitor Syncthing.

If my humble suggestion resonates with other power users and is accepted by the team I'd even put in the time to get acquainted with Go to try and make a good pull request.

If not, consider the issue closed.

@imsodin
Copy link
Member

imsodin commented May 31, 2021

A label for devices we haven't seen in ages seems reasonable. I think this could/should live entirely in the web UI code, as you have all the needed info there (last connected time), no need to expand the API. If configuration is necessary, that can also be stored in local storage on the web UI.

And it should clearly happen at device level: For folders there's no clear criterium, as any amount of devices are involved (and they might get up-to-date via a third device we don't know about, and possible other cases). I took the liberty to rename the issue.

@imsodin imsodin added ui Issues related to the graphical user interface and removed needs-triage New issues needed to be validated labels May 31, 2021
@imsodin imsodin changed the title Show if folders are stale Show if devices have not connected in a long time May 31, 2021
@AudriusButkevicius
Copy link
Member

But isn't this the same thing as the existing "last seen" row?

I think this needs a better proposal fleshed out, as an outright "I have not seen a device for 7 days lets start flashing warnings" is definitely just going to cause a ton of noise with zero value.

@imsodin
Copy link
Member

imsodin commented May 31, 2021

But isn't this the same thing as the existing "last seen" row?

I basically interpret this as a way to make that more discoverable, respectively pull attention to it.

Changing the folder status to orange/warning and then maybe highlighting the last seen row somehow (or whatever else) doesn't seem that noisy to me. I do personally agree it doesn't add much value (at least it wont for me), but it seems some people want it enough to get their hands dirty, and I don't see it as detrimental/noisy. Just my stance, I don't have much investment in this question beyond liking (good) contributions :)

@AudriusButkevicius
Copy link
Member

What happens if I startup my device after 7 days? Everything is orange?

@bt90
Copy link
Contributor

bt90 commented May 31, 2021

IMHO adding a Last change timestamp is less noisy and we don't need to come up with an arbitrary threshold for a warning. I know that we already have that information but it's hidden in the mouseover of the Latest change and suffers from bad discoverability.

@imsodin
Copy link
Member

imsodin commented May 31, 2021

What happens if I startup my device after 7 days? Everything is orange?

Yep. Until the device connects. Doesn't seem so bad to me, but that's something better discussed between you and @SixFive7 - I really don't mind if it's this variant, no change at all or another variant (well here I might mind depending on what it turns out to be).

And I don't see how last change has anything to do with this.

tomasz1986 added a commit to tomasz1986/syncthing that referenced this issue Sep 11, 2022
…hing#7703)

Currently, a disconnected device is marked as just "Disconnected"
without any consideration whether it has been in the state for just a
short period of time or rather much longer.

This commit adds a new state called "Disconnected (Stale)" which is
shown for devices that have been disconnected for longer than a month.
It also changes the "Last seen" information, so that "Never" is used
only when the device hasn't connected at all, and it displays the exact
date otherwise. Additionally, when the date is older than 1 month, it
shows that information below in orange, and when it is older than a
year, it shows it in red. This provides the user with a visual clue that
something may potentially be wrong and needs their intervention.

Signed-off-by: Tomasz Wilczyński <twilczynski@naver.com>
tomasz1986 added a commit to tomasz1986/syncthing that referenced this issue Sep 11, 2022
…hing#7703)

Currently, a disconnected device is marked as just "Disconnected"
without any consideration whether it has been in the state for just a
short period of time or rather much longer.

This commit adds a new state called "Disconnected (Stale)" which is
shown for devices that have been disconnected for longer than a month.
It also changes the "Last seen" information, so that "Never" is used
only when the device hasn't connected at all, and it displays the exact
date otherwise. Additionally, when the date is older than 1 month, it
shows that information below in orange, and when it is older than a
year, it shows it in red. This provides the user with a visual clue that
something may potentially be wrong and needs their intervention.

Signed-off-by: Tomasz Wilczyński <twilczynski@naver.com>
tomasz1986 added a commit to tomasz1986/syncthing that referenced this issue Sep 11, 2022
…hing#7703)

Currently, a disconnected device is marked as just "Disconnected"
without any consideration whether it has been in the state for just a
short period of time or rather much longer.

This commit adds a new state called "Disconnected (Stale)" which is
shown for devices that have been disconnected for longer than a month.
It also changes the "Last seen" information, so that "Never" is used
only when the device hasn't connected at all, and it displays the exact
date otherwise. Additionally, when the date is older than 1 month, it
shows that information below in orange, and when it is older than a
year, it shows it in red. This provides the user with a visual clue that
something may potentially be wrong and needs their intervention.

Signed-off-by: Tomasz Wilczyński <twilczynski@naver.com>
tomasz1986 added a commit to tomasz1986/syncthing that referenced this issue Sep 11, 2022
…hing#7703)

Currently, a disconnected device is marked as just "Disconnected"
without any consideration whether it has been in the state for just a
short period of time or rather much longer.

This commit adds a new state called "Disconnected (Stale)" which is
shown for devices that have been disconnected for longer than a month.
It also changes the "Last seen" information, so that "Never" is used
only when the device hasn't connected at all, and it displays the exact
date otherwise. Additionally, when the date is older than 1 month, it
shows that information below in orange, and when it is older than a
year, it shows it in red. This provides the user with a visual clue that
something may potentially be wrong and needs their intervention.

Signed-off-by: Tomasz Wilczyński <twilczynski@naver.com>
tomasz1986 added a commit to tomasz1986/syncthing that referenced this issue Sep 11, 2022
…hing#7703)

Currently, a disconnected device is marked as just "Disconnected"
without any consideration whether it has been in the state for just a
short period of time or rather much longer.

This commit adds a new state called "Disconnected (Stale)" which is
shown for devices that have been disconnected for longer than a month.
It also changes the "Last seen" information, so that "Never" is used
only when the device hasn't connected at all, and it displays the exact
date otherwise. Additionally, when the date is older than 1 month, it
shows that information below in orange, and when it is older than a
year, it shows it in red. This provides the user with a visual clue that
something may potentially be wrong and needs their intervention.

Signed-off-by: Tomasz Wilczyński <twilczynski@naver.com>
tomasz1986 added a commit to tomasz1986/syncthing that referenced this issue Sep 11, 2022
…hing#7703)

Currently, a disconnected device is marked as "Disconnected" without any
consideration whether the state is just temporary or rather it has been
like that for a long time, potentially requiring user intervention.

This commit adds a new state called "Disconnected (Stale)" which is
shown for devices that have been disconnected for longer than a week. It
also changes the "Last seen" information, so that "Never" is used only
when the device hasn't connected at all, and the exact date is displayed
otherwise.

Additionally, when the date is older than 1 week, a note about that is
displayed below the date. Furthermore, when the date becomes older than
1 month, the note text colour changes to orange, and when it exceeds 1
year, the colour changes again to red. This is done to provide the user
with a visual clue that something may potentially be wrong and requires
a manual fix.

Signed-off-by: Tomasz Wilczyński <twilczynski@naver.com>
@tomasz1986
Copy link
Contributor

I've given this a shot in #8530. I deliberately haven't changed device state colour though, as I didn't really feel that it was necessary, and I rather just added "(Stale)" to the "Disconnected" state instead (similarly to the already used "Disconnect (Unused)"). This way it seems much less intrusive for those that don't care about the information while still providing the necessary tip for the concerned users.

Please let me know what you think and if this is enough.

tomasz1986 added a commit to tomasz1986/syncthing that referenced this issue Sep 19, 2022
…hing#7703)

Currently, a disconnected device is marked as "Disconnected" without any
consideration whether the state is just temporary or rather it has been
like that for a long time, potentially requiring user intervention.

This commit adds a new state called "Disconnected (Inactive)" which is
shown for devices that have been disconnected for longer than a week. It
also changes the "Last seen" information, so that "Never" is used only
when the device hasn't connected at all, and the exact date is displayed
otherwise.

Additionally, when the date is older than 1 week, a note about that is
displayed below the date. Furthermore, when the date becomes older than
1 month, the note text colour changes to orange, and when it exceeds 1
year, the colour changes again to red. This is done to provide the user
with a visual clue that something may potentially be wrong and requires
a manual fix.

Signed-off-by: Tomasz Wilczyński <twilczynski@naver.com>
@calmh calmh closed this as completed in d8296ce Nov 3, 2022
calmh added a commit to imsodin/syncthing that referenced this issue Nov 8, 2022
* main: (36 commits)
  lib/protocol: Ignore inode time when xattr&ownership is ignored (fixes syncthing#8654) (syncthing#8655)
  lib/fs: Try to remove read only Windows files (fixes syncthing#3744) (syncthing#8650)
  gui: Add copy to clipboard, share by email, and share by SMS buttons to device IDs (fixes syncthing#2771, ref syncthing#3868) (syncthing#7984)
  gui, man, authors: Update docs, translations, and contributors
  build: Add GitHub actions build for Windows (syncthing#8627)
  gui: Fix connection type icon width (fixes syncthing#8592) (syncthing#8644)
  gui: Adjust connection type icon size scaling and alignment (syncthing#8645)
  docker: Use healthcheck endpoint (syncthing#8640)
  lib/connections: Use adaptive write size for rate limited connections (fixes syncthing#8630) (syncthing#8631)
  gui: Mark devices that haven't connected for a long time (fixes syncthing#7703) (syncthing#8530)
  gui: Fix rescan interval when add encrypted folder with watch for changes enabled (fixes syncthing#8570) (syncthing#8571)
  gui: Always show Out of Sync Items for remote devices (syncthing#8632)
  lib/fs: Let xattr test avoid non-test attributes (fixes syncthing#8601) (syncthing#8628)
  build: Add GitHub actions build for Windows
  gui, man, authors: Update docs, translations, and contributors
  gui: Display folder and device count number (syncthing#8615)
  gui, man, authors: Update docs, translations, and contributors
  lib/model, lib/protocol: Fix file comparisons (fixes syncthing#8594) (syncthing#8603)
  lib/scanner: More sensible debug output (syncthing#8596)
  gui: Allow automatic device ID selection on WebKit browsers (ref syncthing#8544) (syncthing#8597)
  ...
@calmh calmh added this to the v1.22.2 milestone Nov 9, 2022
calmh added a commit to calmh/syncthing that referenced this issue Nov 22, 2022
* main: (23 commits)
  lib/fs: Optimize WindowsInvalidFilename (syncthing#8687)
  gui, man, authors: Update docs, translations, and contributors
  cmd/syncthing: Use main logger in generate subcommand (fixes syncthing#8682) (syncthing#8685)
  build: Update all dependencies (fixes syncthing#8679) (syncthing#8680)
  gui, man, authors: Update docs, translations, and contributors
  lib/model: Correctly set xattrs on temp files (fixes syncthing#8667) (syncthing#8670)
  gui: Automatically dismiss authentication reminder when in LDAP mode (fixes syncthing#8661) (syncthing#8663)
  lib/model: Correctly handle xattrs on directories (fixes syncthing#8657) (syncthing#8658)
  lib/protocol: Ignore inode time when xattr&ownership is ignored (fixes syncthing#8654) (syncthing#8655)
  lib/fs: Try to remove read only Windows files (fixes syncthing#3744) (syncthing#8650)
  gui: Add copy to clipboard, share by email, and share by SMS buttons to device IDs (fixes syncthing#2771, ref syncthing#3868) (syncthing#7984)
  gui, man, authors: Update docs, translations, and contributors
  build: Add GitHub actions build for Windows (syncthing#8627)
  gui: Fix connection type icon width (fixes syncthing#8592) (syncthing#8644)
  gui: Adjust connection type icon size scaling and alignment (syncthing#8645)
  docker: Use healthcheck endpoint (syncthing#8640)
  lib/connections: Use adaptive write size for rate limited connections (fixes syncthing#8630) (syncthing#8631)
  gui: Mark devices that haven't connected for a long time (fixes syncthing#7703) (syncthing#8530)
  gui: Fix rescan interval when add encrypted folder with watch for changes enabled (fixes syncthing#8570) (syncthing#8571)
  gui: Always show Out of Sync Items for remote devices (syncthing#8632)
  ...
@st-review st-review added the frozen-due-to-age Issues closed and untouched for a long time, together with being locked for discussion label Nov 3, 2023
@syncthing syncthing locked and limited conversation to collaborators Nov 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New features or improvements of some kind, as opposed to a problem (bug) frozen-due-to-age Issues closed and untouched for a long time, together with being locked for discussion ui Issues related to the graphical user interface
Projects
None yet
Development

No branches or pull requests

7 participants