| name | castai-webhooks-events |
| description | Configure CAST AI webhook notifications for cluster events and audit logs.
Use when setting up alerts for node scaling, cost threshold events,
or integrating CAST AI events with Slack, PagerDuty, or custom endpoints.
Trigger with phrases like "cast ai webhooks", "cast ai notifications",
"cast ai slack alerts", "cast ai events".
|
| allowed-tools | Read, Write, Edit, Bash(curl:*) |
| version | 1.4.0 |
| license | MIT |
| author | Jeremy Longshore <jeremy@intentsolutions.io> |
| tags | ["saas","kubernetes","cost-optimization","castai"] |
| compatibility | Designed for Claude Code |
CAST AI Webhooks & Events
Overview
CAST AI emits events for node lifecycle changes, autoscaler decisions, and security findings. Configure webhook endpoints or use the audit log API to track all cluster operations. Integrates with Slack, PagerDuty, and custom HTTP endpoints.
Prerequisites
- CAST AI cluster connected and active
- HTTPS endpoint for receiving webhooks (or Slack webhook URL)
- API key with Full Access
Instructions
Step 1: Configure Notification Channels in Console
Navigate to console.cast.ai > your cluster > Notifications. Available channels:
- Slack: Webhook URL integration
- Email: Per-user notifications
- PagerDuty: Incident escalation
- Custom webhook: Any HTTPS endpoint
Step 2: Query Audit Log via API
curl -s -H "X-API-Key: ${CASTAI_API_KEY}" \
"https://api.cast.ai/v1/kubernetes/clusters/${CASTAI_CLUSTER_ID}/audit-log?limit=20" \
| jq '.items[] | {
time: .createdAt,
action: .action,
initiator: .initiatedBy,
details: .details
}'
Step 3: Build a Custom Notification Handler
import express from "express";
const app = express();
app.use(express.json());
interface CastAIEvent {
eventType: string;
clusterId: string;
clusterName: string;
timestamp: string;
data: {
nodeName?: string;
?: ;
?: ;
?: ;
?: ;
};
}
app.(, (req, res) => {
: = req.;
(event.) {
:
.(
);
(
);
;
:
.();
;
:
.();
(, event);
;
:
.();
;
:
.();
}
res.().({ : });
});
(): <> {
(process..!, {
: ,
: { : },
: .({
: ,
}),
});
}
app.(, .());