Trigger Provider¶
Overview¶
Trigger Providers define methods for receiving and processing triggers that create work orders in Digital Rebar. They are read-only objects provided by the server or trigger plugins that specify how triggers are invoked (webhooks, scheduled events, system events).
Trigger Providers work with Trigger objects to automate work order creation based on external events, time schedules, or system conditions.
Prerequisites¶
- Digital Rebar Provision endpoint with appropriate permissions
drpcliinstalled and configured- Understanding of Triggers and Work Orders
Architecture¶
A Trigger Provider defines:
- Method: HTTP method for webhook-based providers (typically POST)
- URL endpoint: Generated webhook URL (unless NoURL is true)
- Parameters: Required and optional parameters for trigger configuration
- Integration logic: How incoming requests/events are processed
When a Trigger Provider receives an event:
- Event data is validated against required/optional parameters
- Trigger object is matched to the provider
- Work order is created using the trigger's blueprint and configuration
- Work order executes on available runners
Common Use Cases¶
Time-Based Automation¶
Use cron-trigger for scheduled tasks.
Example: Run maintenance tasks every night at 2 AM
drpcli triggers create - <<EOF
{
"Name": "nightly-maintenance",
"TriggerProvider": "cron-trigger",
"Blueprint": "maintenance-workflow",
"Params": {
"cron-trigger/schedule": "0 2 * * *"
}
}
EOF
Webhook Integration¶
Use webhook-based providers for external service integration.
Example: GitHub push webhook triggers content rebuild
# Get the webhook URL
drpcli triggers show github-content-rebuild | jq -r '.Meta.URL'
# Configure in GitHub repository settings:
# Settings > Webhooks > Add webhook
# Payload URL: https://drp-endpoint/api/v3/triggers/github-content-rebuild
# Content type: application/json
# Events: Push events
Create the trigger:
drpcli triggers create - <<EOF
{
"Name": "github-content-rebuild",
"TriggerProvider": "github-trigger-webhook-push",
"Blueprint": "content-publish",
"Params": {
"github-trigger-webhook-push/repository": "myorg/myrepo"
}
}
EOF
Event-Based Triggers¶
Use event-trigger for DRP internal events.
Example: Trigger workflow when machine enters specific stage
drpcli triggers create - <<EOF
{
"Name": "stage-change-handler",
"TriggerProvider": "event-trigger",
"Blueprint": "post-stage-workflow",
"Filter": "Stage=production-ready",
"Params": {
"event-trigger/event-type": "machines.update"
}
}
EOF
Available Trigger Providers¶
Time-Based¶
cron-trigger: Execute on cron schedule
Required Parameters: cron-trigger/schedule
Event-Based¶
event-trigger: DRP internal events (machine updates, job completion, etc.)
Required Parameters: event-trigger/event-type
Version Control Webhooks¶
github-trigger-webhook-push: GitHub repository push eventsgithub-trigger-webhook-pr: GitHub pull request eventsgitlab-trigger-webhook-push: GitLab repository push eventsgit-lab-trigger-mr-webhook: GitLab merge request eventsbitbucket-trigger-webhook-push: Bitbucket push eventsbitbucket-trigger-webhook-pr: Bitbucket pull request eventsvsts-trigger-push-webhook: Azure DevOps push eventsvsts-trigger-pr-webhook: Azure DevOps pull request events
Monitoring & Alerting¶
prometheus-trigger-alert-webhook: Prometheus AlertManager webhooksdatadog-trigger-alert_webhook: Datadog alert webhooksazure-monitor-trigger-alert-webhook: Azure Monitor alertspager-duty-trigger-incident_webhook: PagerDuty incidentsdynatrace-trigger-alert_webhook: Dynatrace alertszabbix-trigger-webhook: Zabbix alertslogic-monitor-trigger-alert-webhook: LogicMonitor alertsapp-optics-trigger-alert-webhook: AppOptics alertsoci-monitoring-trigger-alert-webhook: OCI Monitoring alertspingdom-trigger-webhook-alert: Pingdom alertssumologic-trigger-alert-webhook: Sumo Logic alertslogzio-trigger-alert_webhook: Logz.io alertsepsagon-trigger-alert_webhook: Epsagon alertsprtg-trigger-post-notification: PRTG Network Monitor notifications
Collaboration & Workflow¶
slack-button-trigger-webhook-button: Slack interactive button webhooksjira-trigger-new-issue-webhook: JIRA new issue eventsjira-trigger-issue-update-webhook: JIRA issue update eventszendesk-trigger-webhook: Zendesk ticket eventsmonday-trigger-status_update_webhook: Monday.com status updates
Form & Automation Tools¶
zapier-trigger-webhook-post: Zapier webhookselementor-trigger-form-submit: Elementor form submissionsunbounce-trigger-webhook-submit: Unbounce form submissionsjson-trigger-webhook: Generic JSON webhooksend-grid-trigger-event: SendGrid email events
Security & Identity¶
okta-trigger-alert: Okta security alertsokta-trigger-verify: Okta verification webhookskaholo-trigger-lacework-alert-webhook: Lacework security alerts
Procedures¶
List Available Trigger Providers¶
Filter by name pattern:
View Trigger Provider Details¶
Get Webhook URL¶
For webhook-based providers, retrieve the generated URL:
Creating a Custom Trigger Provider¶
Custom trigger providers are typically created via plugins. This example shows the structure.
Plugin YAML Definition:
---
Name: custom-alert-trigger
Description: Custom alerting system webhook
Method: POST
RequiredParameters:
- custom-alert-trigger/alert-severity
- custom-alert-trigger/alert-source
OptionalParameters:
- custom-alert-trigger/alert-name-pattern
- custom-alert-trigger/tags
Meta:
color: orange
icon: bell
Documentation: |
Receives alerts from custom monitoring system.
Webhook payload must include:
- severity: alert severity level
- source: alert source identifier
- timestamp: ISO8601 timestamp
Using the Custom Provider:
drpcli triggers create - <<EOF
{
"Name": "custom-alerts",
"TriggerProvider": "custom-alert-trigger",
"Blueprint": "alert-response-workflow",
"Filter": "Available=true",
"Params": {
"custom-alert-trigger/alert-severity": "critical",
"custom-alert-trigger/alert-source": "production-cluster"
}
}
EOF
Validation¶
Verify Trigger Provider Exists¶
Test Webhook Trigger¶
Send test payload to webhook URL:
WEBHOOK_URL=$(drpcli triggers show my-webhook-trigger | jq -r '.Meta.URL')
curl -X POST "$WEBHOOK_URL" \
-H "Content-Type: application/json" \
-d '{"test": "payload"}'
Check work orders created:
Verify Cron Trigger Schedule¶
Validate cron expression syntax:
Troubleshooting¶
Trigger Not Firing¶
Check trigger configuration:
Verify: - TriggerProvider name is correct - Required parameters are set - Filter matches intended machines/conditions
Check trigger provider availability:
Webhook Returns 404¶
Verify trigger exists and URL is correct:
Check endpoint accessibility:
Work Orders Not Created¶
Check runner availability:
Verify blueprint exists:
Review trigger logs:
Parameter Validation Errors¶
List required parameters for provider:
Verify all required parameters are set:
Field Reference¶
| Field | Definition |
|---|---|
| Description | Description is a string for providing a simple description |
| Documentation | Documentation is a string for providing additional in depth information. |
| Meta | Meta contains the meta data of the object. The type of this field is a key / value map/dictionary. The key type is string. The value type is also string. The general content of the field is undefined and can be an arbritary store. There are some common known keys: color - The color the UX uses when displaying icon - The icon the UX uses when displaying * title - The UX uses this for additional display information. Often the source of the object. Specific Object types use additional meta data fields. These are described at: https://docs.rackn.io/stable/redirect/?ref=rs_object_metadata |
| Method | Method defines the method used on that URL |
| Name | Name is the key of this particular TriggerProvider. required: true |
| NoURL | NoURL indicates that a URL should NOT be created |
| OptionalParameters | OptionalParameters define the optional values that can be in Params on the Trigger |
| Params | Params holds the values of parameters on the object. The field is a key / value store of the parameters. The key is the name of a parameter. The key is of type string. The value is the value of the parameter. The type of the value is defined by the parameter object. If the key doesn't reference a parameter, the type of the object can be anything. The system will enforce the named parameter's value's type. Go calls the "anything" parameters as "interface {}". Hence, the type of this field is a map[string]interface{}. |
| Profiles | Profiles is an array of profiles to apply to this object in order when looking for a parameter during rendering. |
| RequiredParameters | RequiredParameters define the values that must be in Params on the Trigger |
References¶
- Trigger Object - Define triggers that use providers
- Work Orders - Execution units created by triggers
- Blueprints - Workflows executed by triggered work orders
- Execution Objects - Overview of execution model