question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Problem with Push Monitor Notifications

See original GitHub issue

Is it a duplicate question? No.

Describe your problem @louislam - thanks a lot for this new push monitor functionality and API! I’ve had some success with getting this working for uptime monitoring of a system behind a Firewall/NAT. After setting up the Push Monitor (with Retries set to 1) and adapting the URL, I setup a cron job on the remote system like this:

* * * * * wget --quiet -O /dev/null https://[MYUKDOMAIN]/push/WZx29LBXFB?msg=OK&ping=100

What seems weird is that:

  • The ping value doesn’t populate in the Monitor (shows as N/A) - as you can see I’m passing in a static value for testing
  • If I comment out the cron job above and wait 2 minutes, the monitor status moves to PENDING and then a DOWN notification is sent as expected and the monitor event for DOWN is logged
  • If I then uncomment the cron job and wait 1 minute, the monitor status does change to UP as expected, however no notification is sent and no monitor event gets logged

Do these seem like bugs to you too?

Info Uptime Kuma Version: 1.8.0 Using Docker?: No Docker Version: N/A Node.js Version (Without Docker only): v14.18.0 OS: Ubuntu 20.04 LTS Server Browser: Chrome

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
markdesilvacommented, Oct 13, 2021

& is a special char in linux that move job to background, and You need to escape this char if You want to pass ping value. https://[MYUKDOMAIN]/push/WZx29LBXFB?msg=OK&ping=100 I have tested this, and It should bring monitor to OK, but will not pass static ping value.

Actually if you enclose the url in " " you don’t have to escape the &.

“https://[MYUKDOMAIN]/push/WZx29LBXFB?msg=OK&ping=100”

I use curl (-k -s) with “” around the whole url and I pass a previously captured ping value to the url as a variable:

ttl=`ping -c 1 MY.UK.DOMAIN | tail -1 | cut -d '/' -f 5`
curl -k -s "https://[MYUKDOMAIN]/push/WZx29LBXFB?msg=OK&ping=$ttl"

This is a scripted method.

For a one liner in your crontab you could do:

* * * * * ping -c 1 MY.UK.DOMAIN | tail -1 | cut -d '/' -f 5 | xargs -I []  curl -k -s "https://[MYUKDOMAIN]/push/WZx29LBXFB?msg=OK&ping=[]"
3reactions
MrEddXcommented, Oct 12, 2021

This monitor type is AWESOME! Thank You @louislam!

  • Does your green “pill” bar shows the percentage for this monitor type? On my instance it is stuck on 0%.
Capture
Read more comments on GitHub >

github_iconTop Results From Across the Web

Troubleshooting Web Push Notifications: Why I'm I not Getting ...
Why you're not getting web push notifications · 1. You are browsing in incognito mode · 2. You haven't allowed notifications from the...
Read more >
Problems with push notifications - Threema
If you experience problems with push notifications, i.e., if incoming messages show up late or only when opening the app (and/or if you...
Read more >
Why don't I get notifications from PRTG? What are the Top 5 ...
Top 1: Misconfigured Notification Settings ... Log in to the PRTG web interface, choose Setup | Account Settings | Notifications from the main...
Read more >
Push Notifications Not Working on Locked Screen in Samsung ...
In this video today we will see why push notifications not working on Locked Screen in Samsung Device. We will see some ways...
Read more >
Windows Push Notification User Service always crashing
For the past week, I've continually found this critical error in my reliability monitor - Windows Push Notifications User Service stopped ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found