In SmartEvents, an Action
is the ability to "do something" when an Event
is matched by a Filter of a Processor
.
Processors containing actions are called "sink processors".
It is not possible to create a processor containing an Action
and a Source at the same time.
When a new sink Processor
is requested using the endpoint /api/smartevents_mgmt/v1/bridges/{id}/processors
you must specify the Action
that should be invoked, should the Filter of
the Processor
match. It is possible to Transform the original Event
structure before your Action
is invoked, otherwise the Event
will be passed to your Action
unchanged.
Each Action
has 2 parameters to specify:
type
: the type of theAction
. This must be one of the supportedAction
types listed below- Attempting to use an unknown
Action
type will result in an Error from the Bridge API.
- Attempting to use an unknown
parameters
: A key/value map of configuration parameters for theAction
- Only string for the
key
andvalue
of the parameters are supported. - The required parameters are
Action
specific and documented in the list of supportedActions
- Only string for the
The following Actions
are currently supported by Event Bridge:
Allows you to send an Event
to a Kafka Topic on a RHOSAK Kafka Cluster
topic
- The topic name to send the Event to. The topic must exists already. It won't be created automatically.kafka_broker_url
- The RHOSAK Broker URLkafka_client_id
- The Client Id part of the credentials to authenticate to Kafka. It is recommended the client has no 'admin' rights.kafka_client_secret
- The Client Secret part of the credentials to authenticate to Kafka
To send an Event to the Kafka Topic myRequestedTopic
on the Kafka Server kafka-server-url:443
with the credentials clientId
and clientSecret
{
"action": {
"type": "kafka_topic_sink_0.1",
"parameters": {
"topic": "myRequestedTopic",
"kafka_broker_url": "kafka-server-url:443",
"kafka_client_id": "clientId",
"kafka_client_secret": "clientSecret"
}
}
}
Allows you to send a WebHook to an endpoint of your choice. The configured endpoint will be called via an HTTP POST.
endpoint
- The FQDN of the endpoint to invoke for the WebHook
To send an HTTP POST to https://example.com/my-webhook-endpoint
:
{
"action": {
"type": "webhook_sink_0.1",
"parameters": {
"endpoint": "https://example.com/my-webhook-endpoint"
}
}
}
Allows you to forward an Event to any SmartEvents Instance in your account. Sending events to an SmartEvents instance not in your account is not currently supported.
bridgeId
- Set theid
of the bridge instance to forward the Event to
WARNING: There is currently no circuit breaker and your event could end up in an infinite loop.
Please do not use the bridgeId
omission without a transformation in your processor.
To send an event to bridge with id foo
in my account:
{
"action": {
"type": "send_to_bridge_sink_0.1",
"parameters": {
"bridgeId": "foo"
}
}
}
Allows you to send a message to a Slack Channel of your choice
slack_channel
- The Slack Channel to send the message toslack_webhook_url
- The webhook URL for the Slack Channel
To send an Event to channel foo
with webhook URL https://example.com
:
{
"action": {
"type": "slack_sink_0.1",
"parameters": {
"slack_channel": "foo",
"slack_webhook_url": "https://example.com"
}
}
}