-
-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Support for Telegram #33
Comments
Perhaps consider using a library like https://github.com/nikoksr/notify ? |
Might want to look at apprise. Pretty large library of supported options. |
apprise is a Python module, so can't use that sadly. |
Shoutrrr is another alternative written in go. It does not have as many services, but might also be worth a look. |
Using a library like notify lets you avoid all the implementation details and use a simple interface in your own code. The alternative is learning the minutiae of every single service's request formats and the like. |
This looks more preferable to notify (imo). Thinking I'll replace service:
release-argus/argus:
....
notify:
slack_example:
type: slack
token: xyz
channel: something
params:
botname: argus
color: #ff8000
icon: github
title: New release
params:
- key: botname
value: argus
- key: color
value: #ff8000
- key: icon
value: github
- key: title
value: New release |
It would be nice if we could specify multiple different notification targets, but that’s just a nice to have. |
What do you mean by 'different notification targets'? You can (and will still) be able to setup multiple of each type of notification to go to different places. |
@djmattyg007 Look into mailrise. It is an SMTP gateway that uses apprise under the covers. Use Shoutrr to send email to mailrise and use mailrise to then forward. It allows you to setup different email addresses. Each can have one or more destinations. I use this for all of my apps. Each app has its own channel in Discord and Gotifty. Some I send emails. You then have one config for all of your apps. If you change email addresses, you have one place to go to change all of your apps. Or if you want to change from Slack to Discord, one place to go. No longer have to remember every place you have to go make changes. Also opens up a lot more options of places to send. |
After too many commits, I'd say that this is about ready in #63. Have implemented conversions of
|
Right I've done a bunch more testing and finally merged the PR. Tried to get conversions to handle places where you may have had a I'd appreciate some of you testing this and reporting back to me (with the log) if ur config fails with this new image. |
@JosephKav So Gotify notification would now look something like this using the shourtrr format for url's?
And each service would look like:
|
notify:
GOTIFY_NOTIFICATION:
type: gotify
options:
message: '{{ service_id }} - {{ version }} released.'
delay: 0s
max_tries: 3
url_fields:
host: ip_address
port: 443
token: <gotify_token>
params:
title: Argus Notification
priority: 5 Forgot to link the updated docs, sorry! https://deploy-preview-13--release-argus.netlify.app/docs/config/notify/#gotify |
I updated config.yml and built and deployed a new local image. No errors in the logs. Will let you know what happens once an app is updated. |
Ideally, you should have been able to use the existing config. Did you try that? You can test the notifiers with |
I did not, but easy enough for me to roll back the config.yml. Argus starts fine with no errors. I see if added _gotify to my notification name. When I test it, I do get an error. It is trying to send an https request to an http server. |
What |
I'm guessing (and hoping) one without |
just |
Ah, so you'll need |
I added
|
@samcro1967 What are you using as host in that one? Odd that it's got two ports |
|
There is one for port, it just defaults to host: 192.168.1.104
port: 8132 The https bit isn't my code, Argus calls Shoutrrr with ❯ make go-build && ./argus -config.file config.yml -test.notify gotify -log.level debug
>> compressing assets
>> building binaries
>> restoring assets
INFO: Testing (gotify),
DEBUG: gotify, Sending "TEST - NAME_OF_SERVICE - MAJOR.MINOR.PATCH released" to "gotify://gotify.example.io:444/<redacted>" with params=map["disabletls":"yes"] |
Totally missed the port in the docs. I updated and it is now trying to get to |
Yeah, I've pushed a fix for that. The |
FYI, you can track the build of |
Test notification worked with the latest version and the new syntax. Do you want me to roll the config back to the old syntax and test that as well? |
That'd be nice, but only if you wouldn't mind and it's not too much hassle 😄 |
The old config gave me the https to an http message.
Here is the old config:
|
🤦 |
Something else I should try? |
Not that I can think of? I'm saying it's all working as far as I can see w.r.t Gotify and HTTP. My command log was just to show that it did pick it up as http and disabletls, so tried http://. It's meant to fail as I pointed it at a non-existant server as I disabled http on my one after the testing earlier worked |
So with the old config I specified |
Did you make sure to repull
|
Just rebuilt the container and retestd. It worked. I wonder if I pulled it too soon after you made the last commit. Not sure if Github uses a CDN and maybe I had not replicated yet from where I pulled it. I will test discord tomorrow. :-) |
Tested Discord and works as expected. Also tried email, but am getting an error which I am guessing it in my config, but I am not seeing it. I see MAILRISE_NOTIFICATION when I do a -config.check. config.xml global block
logs
|
Ah, that's an inconsistency between the code and my docs. The code is expecting it as "email". I'll do a commit now to fix that (code will read and use |
I built a new image and am now seeing this when I perform a test:
|
Ahh, Shoutrrr wants me to give |
Got beyond that error, but now getting this one:
|
as you may have seen from the Shoutrrr PR i mentioned you in, this is an inconsistency with the Shoutrrr docs that I've proposed a fix for. I'll keep Argus to using |
I built a new image this morning and tested again. I am seeing the toaddresses issue again after the usestarttls commit.
|
You need to make it I believe I originally put it as |
Yup, it is working now. I can confirm Discord, Gotify, and email are all working with the implementation of Shoutrr. Great work! |
Is your feature request related to a problem? Please describe.
I don't use Slack or Gotify.
Describe the solution you'd like
I'd like to be able to specify an arbitrary set of Telegram bot API credentials, as well as an arbitrary chat ID. Messages should arrive at that chat.
Describe alternatives you've considered
I tried looking for a Tekegram plugin for Gotify, but was unsuccessful.
The text was updated successfully, but these errors were encountered: