Messaging and Alerting
- Supported Message Types
- Messaging Service Configuration
- Enabling Messaging Services
- String Templates
- Triggering Messages and Alerts
- Messaging and Alerting Pipeline Stages
- Setting Properties Upstream
Fusion’s messaging services provide implementations to send messages and alerts to any application or device capable of displaying the supported message types. Read a primer on Fusion’s messaging services on our blog.
Supported Message Types
Fusion supports these types of messages and alerts:
Messaging Service Configuration
The Message Services as a whole can be configured via the Configurations API with these attributes:
The time, in milliseconds, to wait between sending messages on a per-second basis. This does not synchronize throttling between requests.
Boolean flag that indicates whether messages should be indexed and stored. By default, only scheduled messages are stored, as they need to be retrieved by the scheduler at a later time. Storing all messages can be useful for auditing the system, but it will have an impact on the system storage requirements.
Enabling Messaging Services
The logging service is enabled by default, but Slack, email, and PagerDuty messaging services must be explicitly enabled.
You can do this through the UI at Applications > System > Messaging Services, or through the Messaging API.
curl -u <user>:<pass> http://localhost:8764/api/apollo/messaging/service
String templates are libraries used for structured text generation outputs. They are a powerful way of doing variable substitution into a provided template using values contained in documents, requests, and contexts. String templates are made available in the Messaging Service System setup, where users can fill in these portions with document or query values from the working system.
See Messaging Services Templates for details.
Triggering Messages and Alerts
The messaging services can be invoked in several ways:
|By default, only scheduled messages are stored. To configure Fusion to store all messages, see Messaging Service Configuration above. The default collection for message storage is system_messages, which is created on startup.|
Messaging and Alerting Pipeline Stages
The Messaging Service supports these pipeline stages:
The pipeline stages above send messages and alerts when specific conditions are met. Conditions can be specified using regular expressions, database lookups, and more. Any upstream stage can affect how Fusion behaves when a match occurs, so pay special attention to the order in which stages occur.
Additionally, the Set Property Index Stage allows conditions to be specified before messages are sent.
Setting Properties Upstream
Fusion includes two index pipeline stages that are useful for setting properties on indexed documents so that you can evaluate those properties in one of the messaging stages, either downstream in the index pipeline or in a query pipeline: