Skip to content

channel: use real jsonrpc & cleanup package - #473

Open
yhabteab wants to merge 2 commits into
mainfrom
jsonrpc-channels
Open

channel: use real jsonrpc & cleanup package#473
yhabteab wants to merge 2 commits into
mainfrom
jsonrpc-channels

Conversation

@yhabteab

Copy link
Copy Markdown
Member

This PR is a follow-up to the previous PR of mine, which introduced the jsonrpc package in Icinga Go Library (see the requires section below). This PR now makes use of the jsonrpc package and cleans up the channel package a bit. It was a bit messy before because we didn't change anything in that package since its initial implementation. There is no behavior change in this PR apart from the following two changes:

  1. Since the new jsonrpc package allows for a bidirectional communication, Icinga Notifications acts now as a JSON-RPC client and server at the same time. Meaning, for the former case, it will continue to send JSON-RPC requests to the channel plugins, and for the latter case, it will now also be able to receive JSON-RPC requests from the channel plugins. Currently, it only implements a Log method, which allows channel plugins to send log messages with fine-grained log level and ontexts to Icinga Notifications. This is useful for debugging purposes, as it allows channel plugins to log messages directly to the Icinga Notifications log as opposed to the currently used stderr mechanism to report errors.
  2. The second behavior change is that Icinga Notifications will not restart the channel plugins with each config change anymore. Instead, it will just call the SetConfig method on the channel plugins, which allows them to replace their configs without restarting. The only time a channel plugin will be restarted is when it crashes or when the channel.type changes in the config.

Requires

@yhabteab yhabteab self-assigned this Jul 27, 2026
@cla-bot cla-bot Bot added the cla/signed CLA is signed by all contributors of a PR label Jul 27, 2026
@yhabteab yhabteab moved this from Todo to In progress in Icinga Notifications 1.0 Jul 27, 2026
@yhabteab
yhabteab requested a review from oxzi July 27, 2026 12:49
@yhabteab yhabteab added this to the 1.0 milestone Jul 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla/signed CLA is signed by all contributors of a PR

Projects

Status: In progress

Development

Successfully merging this pull request may close these issues.

1 participant