System Hooks let you run background actions in response to any activity across xyOps—user transactions, system events, job completions, alert triggers, and notices. Configure hooks inDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/pixlcore/xyops/llms.txt
Use this file to discover all available pages before exploring further.
config.json to send web requests, execute shell commands, send emails, or create tickets.
Overview
System Hooks differ from regular Actions:- Global scope - Fire for all activity, not just specific events or alerts
- Configuration-based - Defined in
config.json, not in the UI - Background execution - Run asynchronously without blocking the main activity
- Firehose capability - Can capture every transaction with a wildcard hook
Configuration
Define hooks inconfig.json under the hooks object:
~/workspace/source/docs/syshooks.md:11-37.
Activity types
System Hooks can trigger on any activity type ID. Common examples:User transactions
user_create,user_update,user_delete- User account changesevent_create,event_update,event_delete- Event managementworkflow_create,workflow_update,workflow_delete- Workflow changesalert_create,alert_update,alert_delete- Alert definitionssecret_create,secret_update,secret_delete- Secret managementsecret_access- When a secret is accessed by a job or plugin
System events
server_add,server_update,server_remove- Server changesconductor_primary- Conductor became primaryconductor_secondary- Conductor became secondary
Log levels
notice- Informational noticeswarning- Non-critical warningserror- Recoverable errorscritical- Critical failures requiring attention
Job and alert conditions
All action conditions fire system hooks with ajob_ or alert_ prefix:
job_start,job_complete,job_success,job_error,job_warning,job_critical,job_abortjob_tag:TAGID- Jobs with specific tagsalert_new,alert_cleared
Firehose hook
Capture all activity with a wildcard* key:
Hook action types
System Hooks support four action types. Combine multiple actions in a single hook—they all run in parallel.Web hook
Two options for sending HTTP requests: 1. Simple URL - POST activity payload as JSON:Shell exec
Execute a command on the primary conductor server. Activity payload is sent to STDIN as JSON:Debugging shell hooks
Search forSystem Shell Hook in /opt/xyops/logs/Action.log. Set debug_level: 9 in config.json for verbose logging.
Send email
Send a generic activity summary email:- Activity summary
- Full JSON payload
- Any details provided (common for
notice,warning,error,critical)
Create ticket
Automatically create tickets for activity:Payload format
All System Hooks receive an Activity payload:action- Activity type IDusername- User who triggered the action (orsystemfor automated actions)summary- Human-readable descriptiondate- Unix timestampdetails- Activity-specific data (varies by action type)
Examples
Alert all critical errors to Slack
Alert all critical errors to Slack
wmkd2yx4yw4ihh7lu is a Slack web hook configured in the xyOps UI.Log all secret access to a security log
Log all secret access to a security log
Create tickets for all job failures
Create tickets for all job failures
Email admins when servers disconnect
Email admins when servers disconnect
Multi-channel critical alert
Multi-channel critical alert
Best practices
Use configured web hooks
Reference web hook IDs instead of inline URLs for better control and templating support.
Avoid shell exec in production
Shell scripts run with full system privileges. Prefer web hooks and tickets for security.
Filter carefully
Firehose hooks execute constantly. Use specific activity types to reduce overhead.
Monitor hook performance
Check
/opt/xyops/logs/Action.log for slow hooks that block activity processing.Test with debug level 9
Enable verbose logging temporarily to troubleshoot hook execution.
Combine actions sparingly
Multiple actions per hook run in parallel. Ensure they don’t conflict or duplicate work.
Comparison: System Hooks vs Actions
| Feature | System Hooks | Actions |
|---|---|---|
| Scope | Global (all activity) | Scoped to events/alerts |
| Configuration | config.json | UI or API |
| Conditions | Activity type IDs | Job outcomes, alert states |
| Web hooks | Simple URL or ID reference | Full template control |
| Shell exec | Yes (conductor only) | No |
| Tickets | Yes | Yes |
| Generic summary | Templated with context | |
| Firehose | Yes (* wildcard) | No |
See also
- Actions - Event and alert action system
- Web Hooks - Detailed web hook configuration
- Tickets - Ticket creation and management
- Data Formats - Activity payload structure