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.
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.
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/
I also see
log-file
option. Is it possible to log both to a file (for later inspection) and to stderr?It is not possible to log to both. I’m sure there is some Unix trick to do both, but I don’t know.