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

Stateful Channel Plugins #128

Open
julianbrost opened this issue Nov 21, 2023 · 3 comments
Open

Stateful Channel Plugins #128

julianbrost opened this issue Nov 21, 2023 · 3 comments
Labels
enhancement New feature or request

Comments

@julianbrost
Copy link
Collaborator

Probably not the best title, so let me try to explain what I mean by that.

It would be nice if notifications for the same incident could be grouped together, so that for example, with e-mail, follow-up notifications show up as a response to the previous e-mail and for a chat, messages for the same incident are within one thread.

In order to achieve this, it's probably necessary to provide some mechanism to notification plugins to keep some state, like for example the Message-ID of the last and/or first e-mail for an incident or some thread reference for other messengers.

The goal of this issue is to evaluate what exactly would be needed to achieve this and suggest how this could be implemented.

@oxzi
Copy link
Member

oxzi commented Jul 22, 2024

The channels are currently designed to be stateless. They are receiving notification events and contacts, but are unable to handle custom long-lived data without handling their own database. As an example, some channel might link Icinga Notifications with a ticket system and needs to map Icinga Notifications incident IDs to ticket IDs. In the current architecture, such a channel plugin would need to create this database by itself.

Giving channel plugins access to a key-value-store API to store their additionally needed state would ease channel development.

(Originally posted as #232 (comment))

@oxzi
Copy link
Member

oxzi commented Jul 22, 2024

At the moment, the RPC communication follows a request-response pattern unidirectional from Icinga Notifications to the channel plugin. Such a change would require altering this architecture, also allowing requests from the channel to Icinga Notifications.

When thinking about the effect of those changes, it would be possible to enable channels to perform further actions. For example, a channel could create an acknowledgement or downtime. This might be useful for a channel interacting with an "interactive" chat protocol, like XMPP, Matrix, or Telegram. Actually, I got the inspiration after watching Maxim Shchukin's Icinga Summit talk "Telegram Bot as a password-free monitoring front-end" about their interactive Telegram bot.

(Originally posted as #232 (comment))

@oxzi
Copy link
Member

oxzi commented Jul 22, 2024

When thinking about the effect of those changes, it would be possible to enable channels to perform further actions. For example, a channel could create an acknowledgement or downtime.

By the way, that's an idea that's already floating around. This was also one of the considerations when implementing the RPC mechanism, many existing JSON-RPC implementations were ruled out because they wouldn't allow bidirectional calls.

(Originally posted by @julianbrost as #232 (comment))

@oxzi oxzi changed the title Stateful notifications Stateful Channel Plugins Jul 22, 2024
@oxzi oxzi added the enhancement New feature or request label Jul 22, 2024
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