# Last seen threshold warning notification with Pushover

**URL:** https://forum.syncthing.net/t/last-seen-threshold-warning-notification-with-pushover/25926
**Category:** General
**Created:** [December 22, 2025, 3:27pm UTC](https://forum.syncthing.net/t/last-seen-threshold-warning-notification-with-pushover/25926 "2025-12-22T15:27:51Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![vaupo](https://forum.syncthing.net/user_avatar/forum.syncthing.net/vaupo/32/20449_2.png) [@vaupo](https://forum.syncthing.net/u/vaupo)
#### Post date: [December 22, 2025, 3:27pm UTC](https://forum.syncthing.net/t/last-seen-threshold-warning-notification-with-pushover/25926/1 "2025-12-22T15:27:51Z")

</div>

Hello all!

I’m posting a bash script I’ve made for my own purposes that checks when the devices specified were last seen connecting to the device where this script is being run from:

[syncthing-check.sh](https://forum.syncthing.net/uploads/short-url/h1njaXNAKfChCK9xx9CN3pLpwZ8.sh) (2.9 KB)

Feel free to adapt it to your needs, but please use at your own risk. You can also add it to your crontab to be run on a schedule, should you so desire.

NOTE: You need jq for the script to parse properly.

---

<div class="post-metadata">

### Author: ![chaos](https://forum.syncthing.net/letter_avatar_proxy/v4/letter/c/9d8465/32.png) [@chaos](https://forum.syncthing.net/u/chaos)
#### Post date: [December 22, 2025, 5:49pm UTC](https://forum.syncthing.net/t/last-seen-threshold-warning-notification-with-pushover/25926/2 "2025-12-22T17:49:46Z")

</div>

Thanks for sharing that @vaupo !

I did something like that on one of my Win11 Devices with Task Scheduler and a batch file. I don’t care to use PowerShell.

```plaintext
for /f “delims=” %%i in (‘curl -sk -H “X-API-Key: %MONAPIKEY%” https://%MONTAILIP%:8384/rest/stats/device ^| jq .““%MONDEVID%”.lastSeen”’) do set “SLSMON=%%i”
if “%SLSMON:~21,5%” == “05:00” SET TZ=CDT
if “%SLSMON:~21,5%” == “06:00” SET TZ=CST
SET LSMONDATE=%SLSAPH:~1,10%
SET LSMONTIME=%SLSAPH:~12,8%
SET CXNMON=DOWN - Last Seen %LSMONDATE% at %LSMONTIME% %TZ%

```

Mine requires `jq` as well.

---

<div class="post-metadata">

### Author: ![tomasz86](https://forum.syncthing.net/letter_avatar_proxy/v4/letter/t/96bed5/32.png) [@tomasz86](https://forum.syncthing.net/u/tomasz86)
#### Post date: [December 22, 2025, 6:05pm UTC](https://forum.syncthing.net/t/last-seen-threshold-warning-notification-with-pushover/25926/3 "2025-12-22T18:05:12Z")

</div>

@chaos I think the forum software has messed up your quotes, and the script won’t work without fixing them first.

---

<div class="post-metadata">

### Author: ![chaos](https://forum.syncthing.net/letter_avatar_proxy/v4/letter/c/9d8465/32.png) [@chaos](https://forum.syncthing.net/u/chaos)
#### Post date: [December 22, 2025, 7:31pm UTC](https://forum.syncthing.net/t/last-seen-threshold-warning-notification-with-pushover/25926/4 "2025-12-22T19:31:12Z")

</div>

Sir, I went through it character by character. The quotes from this snippet are correct. The mixture of weird batch file limitations with `jq` make it look funky.

---

<div class="post-metadata">

### Author: ![tomasz86](https://forum.syncthing.net/letter_avatar_proxy/v4/letter/t/96bed5/32.png) [@tomasz86](https://forum.syncthing.net/u/tomasz86)
#### Post date: [December 22, 2025, 7:53pm UTC](https://forum.syncthing.net/t/last-seen-threshold-warning-notification-with-pushover/25926/5 "2025-12-22T19:53:13Z")

</div>

What I mean is that the forum has changed all vertical `"` and `'` quotation marks to their curly alternatives `“` and `”`, and `‘` and `’`, which I doubt will work in an actual batch script 😅.

---

<div class="post-metadata">

### Author: ![chaos](https://forum.syncthing.net/letter_avatar_proxy/v4/letter/c/9d8465/32.png) [@chaos](https://forum.syncthing.net/u/chaos)
#### Post date: [December 22, 2025, 9:05pm UTC](https://forum.syncthing.net/t/last-seen-threshold-warning-notification-with-pushover/25926/6 "2025-12-22T21:05:07Z")

</div>

I missed that! Thank you!
