Skip to content

Commit

Permalink
README.md: document Event Stream usage
Browse files Browse the repository at this point in the history
  • Loading branch information
oxzi committed Oct 31, 2023
1 parent 5604407 commit db8f8b7
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,21 @@ Additionally, it also requires you to manually insert items into the **source**
INSERT INTO source (id, type, name) VALUES (1, 'icinga2', 'Icinga 2')
```

Currently, there are two ways how notifications get communicated between Icinga 2 and Icinga Notifications.
Please select only one, whereby the first is recommended:

* Icinga Notifications can pull those from the Icinga 2 API when being configured in the YAML configuration file.
For each `source`, as inserted in the database above, an `icinga2-apis` endpoint must be defined.
* Otherwise, Icinga 2 can push the notifications to the Icinga Notification daemon.
Therefore, you need to copy the [Icinga 2 config](icinga2.conf) to `/etc/icinga2/features-enabled` on your master node(s) and restart the Icinga 2 service.
At the top of this file, you will find multiple configurations options that can be set in `/etc/icinga2/constants.conf`.
There are also Icinga2 `EventCommand` definitions in this file that will automatically match all your **checkables**, which may not work properly if the configuration already uses event commands for something else.

Then, you can launch the daemon with the following command.
```go
go run ./cmd/icinga-notifications-daemon --config config.yml
```

Last but not least, in order for the daemon to receive events from Icinga 2, you need to copy the [Icinga 2 config](icinga2.conf)
to `/etc/icinga2/features-enabled` on your master node(s) and restart the Icinga 2 service. At the top of this file,
you will find multiple configurations options that can be set in `/etc/icinga2/constants.conf`. There are also Icinga2
`EventCommand` definitions in this file that will automatically match all your **checkables**, which may not work
properly if the configuration already uses event commands for something else.

## License

Icinga Notifications is licensed under the terms of the [GNU General Public License Version 2](LICENSE).

0 comments on commit db8f8b7

Please sign in to comment.