feat: ntfy alerts for monitor logs. Closes #664#667
feat: ntfy alerts for monitor logs. Closes #664#667regulartim merged 9 commits intointelowlproject:developfrom
Conversation
4091685 to
17a6eb5
Compare
|
Also: do you think you can write a test for that? |
|
And another thing: would you add headers to the request, such that the alerts have a prettier format? Suggestion (feel free to improve): headers={
"Title": "GreedyBear error",
"Tags": "warning"
}) |
17a6eb5 to
a1dba94
Compare
regulartim
left a comment
There was a problem hiding this comment.
Good job, I like it! 👍
Could you please add a set of test cases for send_ntfy_message?
Just to be sure, do you mean add a testing python script like the ones in the test folder? |
Yes, exactly. It should cover happy paths, failing paths, edge cases. Just take a look at a few existing tests to get an impression. |
regulartim
left a comment
There was a problem hiding this comment.
We are getting close! :) Just a few minor things left. Also: please fix the formatting such that the CI is happy.
|
@HARSHVARANDANI Fix the formatting such that the CI is happy, then we can merge. |
@regulartim I have already used pre-commit before every commit to check for the formatting Black, Flake and Isort, is there anything else there is supposed to be done for the formatting? |
|
Ok, that's strange. Maybe this is because of the ongoing migration to Ruff. I'll check and get back to you. |
| class SendNtfyMessageTests(SimpleTestCase): | ||
|
|
||
| @override_settings(NTFY_URL="https://ntfy.sh/greedybear") |
There was a problem hiding this comment.
I fond the issue, this is indeed because of the recent integration of ruff for linting. Please remove the empty line (14) here.
For future PRs, please use ruff as described in our contribution guidelines.
There was a problem hiding this comment.
Sure, will do 👍
|
Now ruff is unhappy with the import ordering and I don't know why. I cloned @HARSHVARANDANI 's repo and ran ruff using our |
|
I tried it locally and I correctly replicate the error reported by the CI. Ruff is working fine in my env. How did you install pre-commit/ruff in your env? So yes, the error must be fixed |
|
ah you know what? It could be that you executed the ruff linter instead of the ruff formatter. Those are 2 different commands. @regulartim |
|
Now the CI is happy! Thanks for your work @HARSHVARANDANI, I 'll merge now. |


Description
This feature extends the existing Slack-based alerting in MonitorLogs by also publishing notifications to a configured ntfy topic when errors are detected in monitored logs.
Related issues
Please add related issues.
Type of change
Please delete options that are not relevant.
Checklist
develop.Black,Flake,Isort) gave 0 errors. If you have correctly installed pre-commit, it does these checks and adjustments on your behalf.Important Rules