Integrate Spike with Imperva Cloud WAF
Send Imperva Cloud WAF (Incapsula) alerts to Spike so a DDoS attack, BGP session loss or degraded connection alerts your on-call team right away.
Imperva Cloud WAF (formerly Incapsula) sits in front of your websites and networks, filtering attacks, absorbing DDoS traffic and monitoring the connections that carry your traffic. Imperva can send each of its account notifications to a webhook.
Point a webhook connection at a Spike integration URL and an Imperva DDoS attack, BGP session loss or connection performance problem pages your on-call rotation the moment Imperva raises it. Repeats of the same alert land on the incident already open, and the incident resolves itself when Imperva sends the matching recovery notification.
Nothing is installed. One webhook connection and a notification policy, configured once in the Imperva console, cover the whole account.
What Spike does with each event
Every delivery carries event_metadata.event_type, and that field decides what Spike does with it.
Events that open an incident and page
event_type
What happened
WebsiteDdosStart
DDoS attack on a protected website
WebsiteProtectNetworkTrafficDdosStart
DDoS attack on a website group (network traffic protection)
SingleIpDdosStart
DDoS attack on a single protected IP
IpRangeDdosStart
DDoS attack on a protected IP range
BgpDown
BGP session to Imperva is down
PerformanceDegraded
A connection's performance is degraded
MonitoringAttackStartCritical
Critical attack detected
TrafficStartDivert
Traffic diverted to Imperva
Events that resolve an incident
event_type
Resolves
WebsiteDdosStop
WebsiteDdosStart
WebsiteProtectNetworkTrafficDdosStop
WebsiteProtectNetworkTrafficDdosStart
SingleIpDdosStop
SingleIpDdosStart
IpRangeDdosStop
IpRangeDdosStart
BgpUp
BgpDown
PerformanceRestored
PerformanceDegraded
MonitoringAttackStartCritical and TrafficStartDivert are one-shot: they open an incident and Imperva sends no matching recovery, so you resolve them in Spike.
Everything else
Any other event_type, such as a new site being added, expected overage or a certificate expiry, opens an incident matched by its title and is never resolved automatically. HelloWorldTest, which the console's Test Webhook button sends, creates nothing.
Incident identity
Spike identifies the incident by the Imperva asset the event is about, event_metadata.asset_id, within the Imperva account in event_metadata.account_id. The asset id is the same on an attack's start and its stop, so one attack reads as one Spike incident: it pages once, repeats join it, and the stop resolves it. Two websites under attack at once are two incidents. A DDoS start and a BGP down on the same asset are separate incidents too, because the kind of event is part of the identity.
If an event carries no asset_id, Spike falls back to the first of extended_parameters.site_name, range, ip_range with slice_name, or connection_name. If it carries none of those either, the incident is identified by the kind of event and the account alone, so every such event of one kind in one account shares an incident. account_id is there because one Spike integration can receive events from several Imperva accounts or sub-accounts.
A stop resolves an incident only when it is the stop for that incident's start (a BgpUp never closes a DDoS incident) and names the same account and the same asset. event_type is compared without regard to letter case.
Incident title
The title is Imperva's own sentence, event_title, with HTML stripped and whitespace collapsed, capped at 200 characters:
When event_title is empty, the title is the first sentence of event_details.event_body. When both are empty it is built from the event type and where it happened:
An event with nothing usable at all is titled Imperva alert with no details. Spike adds no ids, URLs, dates or traffic readings of its own; Imperva's sentence is used as Imperva wrote it, and the rest of the payload is on the incident page.
A stop event is shown with its own sentence, for example DDoS attack ended on checkout.acme.com. It still resolves the right incident, because a known event is matched by its kind, account and asset, not by its title. Only an event_type Spike does not know is matched by title.
Severity
Spike does not read a severity from the Imperva payload, so incidents open at your integration's default. To route by attack type or site, write an alert rule. Read more about priority and severity.
Prerequisites
An Imperva account with permission to manage account settings and webhook connections
An Imperva integration in Spike and its webhook URL
Nothing to open on your own network. Imperva calls out to Spike
Step 1 — Create the integration in Spike
In Spike, go to Integrations → Add integration → Imperva Cloud WAF, attach it to a service and an escalation policy, and copy the webhook URL. It looks like https://hooks.spike.sh/<your-token>/push-events.
Step 2 — Add a webhook connection in Imperva
Sign in to the Imperva Cloud Security Console and go to Account → Account Management → Webhook Connections.
Select Add webhook connection and fill in the name and URL. Both are required:
Name: something your team will recognise, for example
SpikeURL: the webhook URL from Step 1
Leave authentication empty. Imperva can add a secure code to the webhook header, but Spike does not check it; the token in the URL is the credential. Treat the URL like a password. If it leaks, archive the integration in Spike, create a new one and update the URL in Imperva.
Save the connection.
Step 3 — Choose the notifications that feed it
In the same console, open the account's Notification Settings and create or edit a notification policy.
Select the events to send, for example the DDoS attack, BGP and connection performance notifications.
Choose the webhook connection from Step 2 as the destination and save.
Back on Webhook Connections, select Test Webhook.
Always select the stop or recovery notification that matches each start you select. A DDoS start without its stop pages your rotation and leaves the incident open until somebody resolves it by hand. A resolve timer is a reasonable backstop, not a replacement.
The test delivery has event_type HelloWorldTest. Spike accepts it and opens nothing, so a quiet incident list after the test is the expected result. To see an incident open, use the replay in Step 4.
Step 4 — Confirm it end to end
Imperva cannot fabricate an attack, so replay the payloads below against your webhook URL to see all three moments:
The start payload opens an incident titled
DDoS attack started on checkout.acme.com, on your service, escalating through your policy.Sending it again with different readings lands on the same incident without paging again.
The stop payload resolves it, and
DDoS attack ended on checkout.acme.comappears on the event list.
Payload reference
Imperva sends its own payload and there is no template to edit. Spike receives one event per request. Fields are readable in alert rules and the Title Remapper as data.body.<field>.
event_metadata.event_type
Decides whether the event opens, resolves or is ignored
event_metadata.account_id
Scopes the identity to one Imperva account
event_metadata.asset_id
The asset the event is about; the incident identity
event_title
The incident title
event_details.event_body
The title when event_title is empty
extended_parameters.site_name
Website DDoS events: where, and identity fallback
extended_parameters.range
IP and IP range DDoS events: where, and identity fallback
extended_parameters.ip_range
Website group DDoS events: where, and identity fallback
extended_parameters.slice_name
Website group DDoS events: paired with ip_range
extended_parameters.connection_name
BGP and performance events: where, and identity fallback
extended_parameters.network_prefix
One-shot events: where in a built title
Other fields, such as sub_type, main_category, event_date, webhook_id, the attack readings and the dashboard links, are kept on the incident page but not read. account_id and asset_id may be numbers or strings.
An attack start, which opens the incident:
The matching stop, which resolves it:
Last updated

