Integrate Spike with Port
Send Port automation webhooks to Spike so a degraded catalog entity pages your on-call rotation, and the incident resolves when the entity recovers.
Port is an internal developer portal. Its software catalog holds your services, repositories and other entities, and its automations can call a webhook when an entity changes.
Create two automations that call a Spike integration URL: one that detects the degradation and one that detects the recovery. The first pages your on-call rotation. The second resolves the incident.
What Spike does with each event
The status field, which you type into each automation, decides what Spike does with a delivery.
status
What Spike does
firing
Opens an incident, or joins the open one with the same alert_id.
resolved
Resolves the open incident with the same alert_id. If none is open, the delivery is dropped.
Anything else, or missing
Treated as firing, so an unexpected value still pages.
status is compared after trimming and ignoring case. Port has no status field of its own: this one is Spike's, and you write it as a literal in each automation's body.
Set up instructions
Step 1: Create a Port integration in the Spike dashboard and copy the webhook URL.
Create integration and service on our dashboardStep 2:
Prerequisites:
A Port account where you can create automations.
The blueprint whose entities you want to watch, and a clear condition for "degraded" and for "recovered" (for example a
statusproperty that changes betweenHealthyandUnhealthy).
Create the firing automation:
In Port, open the Automations page (
https://app.port.io/settings/automations).Click + Automation in the top-right corner.
On the Basic Details tab, give it a title, for example
Page Spike when service health degrades.On the Trigger tab, choose Entity update and select your blueprint.
At the bottom of the Trigger tab, add a Condition that fires only on the change into the degraded state, not on every update while it stays degraded:
{
"type": "JQ",
"expressions": [
".diff.before.properties.status != \"Unhealthy\"",
".diff.after.properties.status == \"Unhealthy\""
],
"combinator": "and"
}On the Backend tab, choose Webhook.
Set Endpoint URL to the Spike webhook URL copied in Step 1.
Leave Method as
POST.Set Body to the JSON below. Port renders each
{{ ... }}template when the automation runs. Typestatus,ruleandseverityas literal text; adjust thesummarypath to your blueprint's properties.
Save the automation.
Create the recovery automation: repeat the steps above with a title such as Resolve Spike incident when service health recovers, a Condition that fires only on the change out of the degraded state, and the same body with "status": "resolved" and your own rule text, for example Service health recovered. Keep alert_id identical in both automations.
Fields:
status
Yes
firing in the degradation automation, resolved in the recovery automation. Typed as a literal.
alert_id
Yes
Identifies one alert across firing and recovery, for example service/checkout-api. It must be the same in both automations.
summary
Recommended
Your sentence saying what is wrong. It becomes the incident title.
rule
Recommended
The name of the automation, typed as a literal. Used in the title when summary is empty.
entity
Recommended
The display title of the entity. Used in the title when summary is empty.
blueprint
Optional
The blueprint of the entity. Shown on the incident page only.
severity
Optional
critical, high, warning or info. Sets the severity badge.
triggered_at
Optional
When Port fired the automation. Different on every delivery and never part of the title.
Test the Integration:
Trigger the degradation on a test entity, or run the firing automation against it.
Verify an incident appears in Spike titled with your
summary, for exampleCheckout API changed from Healthy to Unhealthy.Trigger the recovery and verify the incident resolves.
Event payload structure
When the entity degrades, Port sends:
When it recovers, the recovery automation sends:
Incident title
The title is your summary, with whitespace collapsed and cut to 200 characters. When summary is empty or still contains an unexpanded template, Spike uses the first of these that has a value:
{rule} on {entity}, for exampleService health degraded on Checkout API{rule}{entity}Port alert with no details
Over 200 characters, on {entity} is kept whole and the rest is cut at a word boundary.
Limitations
A deletion automation (trigger Entity deletion) has no
.event.diff.after, sosummaryandentitycan be empty and the title falls back as above.Spike does not verify Port's request signature.
This format is Spike's own, built from Port's JQ templating. If a template renders empty or as the text
null, check the path against your blueprint.
Last updated

