Integrate Spike with PA Server Monitor
Send PA Server Monitor (Power Admin) alerts to Spike so a failing monitor alerts your on-call team, and the incident resolves when it is back to OK.
PA Server Monitor (by Power Admin) watches Windows and Linux servers with monitors for disk space, CPU, services, event logs, ping and more. When a monitor finds a problem it runs the actions you attached to it. One Call URL action posts that alert to Spike, and the same action in the monitor's error resolved actions tells Spike when the monitor is back to normal.
Spike opens one incident per monitor on one computer. A repeat from the same monitor lands on the incident already open instead of paging again, and the incident resolves itself when PA Server Monitor reports the monitor as OK.
Incident identity and title
Spike identifies the incident by monitor_key. You build it from two PA Server Monitor variables as $Machine$/$MonitorTitle$, so one monitor on one computer has the same key on its error delivery, every escalation re-delivery and its resolved delivery, for example SQL-PROD-02/Disk Space C:. Spike compares it as text: letter case counts, spaces around the value do not, and 42 matches "42".
monitor_key is not an id when it is empty, or when it still contains a variable PA Server Monitor did not expand: a $Name$ token anywhere in it ($Machine$/$MonitorTitle$, SQL-PROD-02/$MonitorTitle$), or a value that is only $name, ${name}, {{name}} or %name%. Two alerts that both carry an unexpanded key are two incidents. When there is no usable key, Spike matches the next event by title instead.
The title is your own monitor message, monitor_message ($MonitorMsg$, the sentence you write per monitor in Advanced Monitor Options), with whitespace collapsed:
Low free space on the system drive, check SQL log growth on SQL-PROD-02on {machine}is appended unless the sentence already names the computer as a whole word.When
monitor_messageis empty or unexpanded, the title is{monitor_title} on {machine}, for exampleDisk Space C: on SQL-PROD-02.When that is not available either, the title is
{monitor_title}alone, thenPA Server Monitor alert on {machine}, thenPA Server Monitor alert with no details.A recovery is titled
{monitor_title} on {machine} is back to OK(orPA Server Monitor alert on {machine} is back to OK, orPA Server Monitor alert is back to OK).A value that is empty or an unexpanded variable counts as missing.
The title is capped at 200 characters. The
on {machine}part is kept whole and the rest is cut back to a word boundary with....
The title never holds details, time_in_error, date, time, alert_id or status. Those change between deliveries of the same alert and are shown on the incident page only. alert_id, status_text, group, machine_ip and monitor_type are shown on the incident page as well.
What each status does
status is PA Server Monitor's $Status$ code, compared without regard to case or surrounding spaces.
status
What happens in Spike
msOK, msUNACKNOWLEDGED
Resolves the open incident
msALERT, msALERT_RED, msALERT_GREEN, msERROR, msCANTMONITOR, msUNLICENSED, msWRONG_EDITION, msOWNING_SATELLITE_DISCONNECTED
Opens an incident, or joins the open one with the same monitor_key
A missing, unexpanded or unknown value
Treated as an alert, so a misconfigured body still pages
msSUPPRESSED_ALERT, msSUPPRESSED_ERROR, msDISABLED, msRUNNING, msINIT, msPAUSING, msSKIPPINGACTIONS, msCANTMONITORNOW, msTRAINING, msMAINTENANCE, msEXCLUSION_PERIOD, msDEPENDENCY_NOT_MET, msSERVER_DISABLED
Joins an open incident only. It never opens or resolves one, and is dropped when nothing is open
A recovery that arrives when no incident is open is dropped, not turned into a new incident.
Prerequisites
A PA Server Monitor installation where you can edit Actions and the monitors that use them
A PA Server Monitor integration in Spike and its webhook URL
The PA Server Monitor server must be able to reach
hooks.spike.shover HTTPS
Step 1 — Create the integration in Spike
In Spike, go to Integrations → Add integration → PA Server Monitor, 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 — Create the Call URL action
One action sends both the alert and the recovery.
In the PA Server Monitor console, create a Call URL action. Either select All Actions in the left pane, right-click Call URL Action and choose Add Action, or open a monitor's Actions dialog and click New ... above the list of global actions. Name it, for example,
Spike.Set URL to call to the webhook URL from Step 1 and pass the parameters as Custom POST, with
application/jsonas the encoding. Plain POST sends name/value pairs as a form post and cannot carry this body.Paste the template below into the Parameters section. Keep the field names exactly as written.
Press the action's Test button. It builds the real request and sends it to Spike. Spike answers a body that is not valid JSON with HTTP 400 and opens nothing; see the warning below. A valid body with an alert status opens a test incident, which you can resolve afterwards. PA Server Monitor does not document which
$Status$a test sends, and a recovery status opens nothing, so a test that opens no incident does not on its own prove the body is invalid.Save the action.
monitor_key
$Machine$/$MonitorTitle$
Required. Identity of the incident
status
$Status$
Required. Alert or recovery, see above
machine
$Machine$
The computer, in the title
monitor_title
$MonitorTitle$
The monitor, in the title
monitor_message
$MonitorMsg$
The incident title when set
details
$Details_Single_Line$ with double quotes replaced by spaces and backslashes by /
Incident page only
status_text
$StatusText$
Incident page only
alert_id
$AlertID$
Incident page only
group
$Group$
Incident page only
machine_ip
$MachineIP$
Incident page only
monitor_type
$MonitorType$
Incident page only
time_in_error
$TimeInError$
Incident page only
date
$Date$
Incident page only
time
$Time$
Incident page only
monitor_key and status are the required fields. Without monitor_message, monitor_title or machine, the title falls back to the generic forms above.
Step 3 — Attach the action to your monitors
Open the monitor you want to page on and go to its Actions dialog.
Move
Spikefrom the global action list into the node that runs when the monitor fails. Current versions label it Do Immediately; older versions and some guides call it Error Actions. Monitors with escalation also show escalation nodes, which you can leave as they are.Add the same
Spikeaction to the monitor's error resolved actions, labelled Error Resolved Actions, Resolved Actions or Fixed Actions depending on the version.$Status$should then expand tomsOKand$StatusText$toOK.Under Advanced Monitor Options, write the monitor's message. It becomes the incident title.
Repeat for each monitor you want to page on.
Step 4 — Test it
Lower a monitor's threshold until it alerts, then restore it, and check that:
An incident opens in Spike with the monitor's message as its title.
A second alert from the same monitor lands on that incident without paging again.
When the monitor returns to normal, the incident resolves.
Example payloads
An alert, which opens the incident titled Low free space on the system drive, check SQL log growth on SQL-PROD-02:
The recovery for the same monitor, which resolves it and is titled Disk Space C: on SQL-PROD-02 is back to OK:
Spike keeps the whole body on the incident, so alert rules and the Title Remapper can read any field as data.body.<field>.
Troubleshooting
Disclaimer: These integration instructions are offered independently by Spike.sh, and Spike.sh is not affiliated with nor a partner of Power Admin LLC.
Last updated

