4
submitted 1 year ago* (last edited 1 year ago) by loving_ntfy@lemm.ee to c/ntfy@discuss.ntfy.sh

I do POSTs from a backend app to a self-hosted ntfy instance (docker). The POSTs do not fail and I also save them in local db. I now compare the notifications cached in /var/cache/ntfy/cache.db against the ones I save in my local db and I see that ntfy is missing a lot. As an example, today for example I have POSTed 540 times and in cache.db I see only 60 of them. The skipped ones are not even at regular intervals.

Is there a logfile I can check in the ntfy service? The output of the ntfy process itself only shows the expected INFO Server stats... message but not errors.

Is there any reason ntfy may not be registering some of the POSTed notifications?

Best regards.

Edit: I can also confirm on the mobile app that I did not receive the skipped ones; I have only received indeed the ones that I see in ntfy's cache.db.

top 4 comments
sorted by: hot top controversial new old
[-] loving_ntfy@lemm.ee 2 points 1 year ago

Nevermind. I found the problem. It was not NTFY's fault. Some of the notifications that were POSTed to NTFY, didn't follow the correct syntax (was sending "attach" in the JSON as string[] instead of a single string).

Would be nice though if NTFY could provide a debug log to catch such cases.

[-] binwiederhier@discuss.ntfy.sh 2 points 1 year ago

That's a great username, dude. 😎 Glad you solved your problem.

Next time, check out this page to help you increase the log levels: https://docs.ntfy.sh/troubleshooting/

[-] loving_ntfy@lemm.ee 1 points 1 year ago

I also see log-file option. Is it possible to log both to a file (for later inspection) and to stderr?

[-] binwiederhier@discuss.ntfy.sh 1 points 1 year ago

It is not possible to log to both. I'm sure there is some Unix trick to do both, but I don't know.

this post was submitted on 09 Jul 2023
4 points (100.0% liked)

ntfy

335 readers
9 users here now

ntfy (pronounced notify) is a simple HTTP-based pub-sub notification service. You can use it to send push notifications to your phone via HTTP PUT/POST.

ntfy website β€’ Documentation β€’ GitHub β€’ Google Play β€’ F-Droid β€’ Discord β€’ App Store β€’ Matrix

If you'd like to become a sponsor, I would be humbled to accept your donation via GitHub Sponsors or Liberapay πŸ’ΈπŸ’°.

founded 1 year ago
MODERATORS