Skip to content
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

Feature: Multiple consumers for a single "Alerts" notifier #43

Open
freefd opened this issue May 4, 2024 · 1 comment
Open

Feature: Multiple consumers for a single "Alerts" notifier #43

freefd opened this issue May 4, 2024 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@freefd
Copy link
Contributor

freefd commented May 4, 2024

Sometimes it is necessary to make a broadcast message about the happened event to multiple consumers.
Not to break the top-level implementation and keep the base validations, below is a suggestion on how to augment the model by introducing a list to each of the notifier:

...
alerts:
  telegram:
  - enabled: true
    chatid: 123456789
    token: 123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11
  - enabled: true
    chatid: 987654321
    token: 654321:CBA-FED4321ghIkl-zyx57W2v1u123ew11
  - enabled: true
    chatid: ...
    token: ...
  gotify:
  - enabled: true
    server: gotify.alpha.domain.tld
    token: ABCDEF
    ignoressl: true
  - enabled: true
    server: gotify.beta.domain.tld
    token: CABFED
    ignoressl: true
...

For existing frigate-notify users, backward compatibility with current behavior (single-key approach) can also be kept.

Currently, a workaround to support multiple notifier consumers of the same kind is to run several instances of frigate-notify with different MQTT clientid in the configuration.

Thank you.

@0x2142 0x2142 self-assigned this May 5, 2024
@0x2142 0x2142 added the enhancement New feature or request label May 5, 2024
@0x2142 0x2142 added this to the v0.3.0 milestone May 5, 2024
@0x2142 0x2142 removed this from the v0.3.0 milestone Jun 3, 2024
@freefd
Copy link
Contributor Author

freefd commented Oct 11, 2024

Hi @0x2142, while frigate-notify is getting more and more features, I started to think that my initial approach was wrong and there should be something more complex.
For example, here's a quick-and-dirty information schema that could be implemented to support an abstract consumer with some notifier attributes and its own modifiers:

frigate_notify

The main idea is to allocate the consumer as a separate unit that has all the necessary attributes and can overwrite global settings (label filters, quiet hours, zones, etc).

  • 1 consumer == 1 account representation (type: telegram/ntfy/gotify/etc)
  • Multiple consumers can participate in the same type of notifier

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants