Documentation ¶
Overview ¶
Entry point to the notification service.
The purpose of this service is to enable sending automatic email notifications and ServiceLog events to users for all serious issues found in their OpenShift clusters. The "instant" mode of this service runs as a cronjob every fifteen minutes, and it sends a sequence of events to the configured Kafka topic so that the notification backend can process them and create email notifications based on the provided events.
Additionally ServiceLog events are created, these can be displayed on cluster pages. Currently the events are only created for the *important* and *critical* issues found in the new_reports table of the configured PostgreSQL database. Once the reports are processed, the DB is updated with info about sent events by populating the reported table with the corresponding information. For more info about initialising the database and perform migrations, take a look at the https://github.com/RedHatInsights/ccx-notification-writer.
In the instant notification mode, one email will be received for each cluster with important or critical issues.
Additionally this service exposes several metrics about consumed and processed messages. These metrics can be aggregated by Prometheus and displayed by Grafana tools.
Directories ¶
Path | Synopsis |
---|---|
Package conf contains definition of data type named ConfigStruct that represents configuration of Notification service.
|
Package conf contains definition of data type named ConfigStruct that represents configuration of Notification service. |
Package differ contains core of CCX Notification Service.
|
Package differ contains core of CCX Notification Service. |
Package ocmclient contains implementation of OCMClient interface.
|
Package ocmclient contains implementation of OCMClient interface. |
Package producer contains interface that can be used to produce (that is send) messages to properly configured Kafka broker.
|
Package producer contains interface that can be used to produce (that is send) messages to properly configured Kafka broker. |
disabled
Package disabled contains an empty implementation of Producer interface.
|
Package disabled contains an empty implementation of Producer interface. |
kafka
Package kafka contains an implementation of Producer interface that can be used to produce (that is send) messages to properly configured Kafka broker.
|
Package kafka contains an implementation of Producer interface that can be used to produce (that is send) messages to properly configured Kafka broker. |
servicelog
Package servicelog contains an implementation of Producer interface that can be used to produce (that is send) messages to Service Log.
|
Package servicelog contains an implementation of Producer interface that can be used to produce (that is send) messages to Service Log. |
tests
|
|
mocks
Package mocks contains various mock objects used by unit test: Producer mock, Storage mock, and OCMClient mock.
|
Package mocks contains various mock objects used by unit test: Producer mock, Storage mock, and OCMClient mock. |
Package types contains declaration of various data types (usually structures) used elsewhere in the CCX Notification Service code.
|
Package types contains declaration of various data types (usually structures) used elsewhere in the CCX Notification Service code. |