Webhook Collector
The Webhook Collector microservice exposes a custom endpoint on a specified port and forwards data to a configured Apache Pulsar topic.
This microservice is a supporting microservice that can participate in any microservice pipeline. See Understanding Microservice Pipelines in Unified Assurance Concepts for conceptual information about microservice pipelines.
This microservice provides additional Prometheus monitoring metrics. See Webhook Collector Self-Monitoring Metrics.
Webhook Collector Prerequisites
Before deploying the microservice, confirm that the following prerequisites are met:
-
A microservice cluster is set up. See Microservice Cluster Setup.
-
The Pulsar microservice is deployed. See Pulsar.
Deploying Webhook Collector
To deploy the microservice, run the following commands:
su - assure1
export NAMESPACE=<namespace>
export WEBFQDN=<WebFQDN>
a1helm install <microservice-release-name> assure1/webhook-collector -n $NAMESPACE --set global.imageRegistry=$WEBFQDN
In the commands:
-
<namespace> is the namespace where you are deploying the microservice. The default namespace is a1-zone1-pri, but you can change the zone number and, when deploying to a redundant cluster, change pri to sec.
-
<WebFQDN> is the fully-qualified domain name of the primary presentation server for the cluster.
-
<microservice-release-name> is the name to use for the microservice instance. Oracle recommends using the microservice name (webhook-collector) unless you are deploying multiple instances of the microservice to the same cluster.
You can also use the Unified Assurance UI to deploy microservices. See Deploying a Microservice by Using the UI for more information.
Changing Webhook Collector Configuration Parameters
When running the install command, you can optionally change default configuration parameter values by including them in the command with additional --set arguments. You can add as many additional --set arguments as you need.
For example, set a parameter described in Default Webhook Collector Configuration by adding --set configData.<parameter_name>=<parameter_value>. For example, --set configData.LOG_LEVEL=DEBUG.
Default Webhook Collector Configuration
The following table describes the default configuration parameters found in the Helm chart under configData for the microservice.
Name | Default Value | Possible Values | Notes |
---|---|---|---|
LOG_LEVEL | INFO | FATAL, ERROR, WARN, INFO, DEBUG | The logging level used by the microservice. |
STREAM_OUTPUT | "persistent://assure1/event/sink" | Text | The Pulsar topic to send messages to. |
WEBHOOK_ENDPOINT | "/webhook" | Text | The endpoint exposed to receive messages. |
Webhook Collector Self-Monitoring Metrics
The Webhook Collector microservice exposes the self-monitoring metrics described in the following table to Prometheus.
Metric Name | Type | Description |
---|---|---|
webhook_received_payload_count | Counter | The total number of payloads received on the webhook. |
webhook_to_pulsar_payload_count | Counter | The total number of payloads sent to Pulsar. |
total_errors_occurred | Counter | The total number of errors occurred in the webhook. |
Note:
Metric names in the database include a prefix that indicates the service that inserted them. The prefix is prom_ for metrics inserted by Prometheus. For example, total_errors_occurred is stored as total_errors_occurred in the database.