Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

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-02
  • on {machine} is appended unless the sentence already names the computer as a whole word.

  • When monitor_message is empty or unexpanded, the title is {monitor_title} on {machine}, for example Disk Space C: on SQL-PROD-02.

  • When that is not available either, the title is {monitor_title} alone, then PA Server Monitor alert on {machine}, then PA Server Monitor alert with no details.

  • A recovery is titled {monitor_title} on {machine} is back to OK (or PA Server Monitor alert on {machine} is back to OK, or PA 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.sh over 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.

Create integration and service on our dashboard

Step 2 — Create the Call URL action

One action sends both the alert and the recovery.

  1. 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.

  2. Set URL to call to the webhook URL from Step 1 and pass the parameters as Custom POST, with application/json as the encoding. Plain POST sends name/value pairs as a form post and cannot carry this body.

  3. Paste the template below into the Parameters section. Keep the field names exactly as written.

  4. 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.

  5. Save the action.

Field
Value
Used for

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.

Spike has not seen a captured payload from PA Server Monitor. The body above is Spike's template built from PA Server Monitor's documented variables, so check the first real alert on the incident page, including that details expands as expected in your PA Server Monitor version.

Step 3 — Attach the action to your monitors

  1. Open the monitor you want to page on and go to its Actions dialog.

  2. Move Spike from 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.

  3. Add the same Spike action to the monitor's error resolved actions, labelled Error Resolved Actions, Resolved Actions or Fixed Actions depending on the version. $Status$ should then expand to msOK and $StatusText$ to OK.

  4. Under Advanced Monitor Options, write the monitor's message. It becomes the incident title.

  5. Repeat for each monitor you want to page on.

Attach the action to both lists on every monitor you want to page on. PA Server Monitor does not document whether $Machine$ and $MonitorTitle$ expand the same in the resolved action as in the error action, or that $Status$ is msOK there. If either differs, Spike cannot match the recovery and the incident stays open; compare monitor_key and status on both events if incidents do not resolve. Event-type monitors fire on every detection and never run resolved actions, so their repeats join the open incident until you resolve it by hand.

Step 4 — Test it

Lower a monitor's threshold until it alerts, then restore it, and check that:

  1. An incident opens in Spike with the monitor's message as its title.

  2. A second alert from the same monitor lands on that incident without paging again.

  3. 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

Nothing arrives in Spike

Check that the URL is the full webhook URL with nothing appended, that the action is set to Custom POST with application/json and the JSON template in Parameters, and that the monitor's Do Immediately (Error Actions) node includes the Spike action. If the body is not valid JSON (a backslash or double quote in an expanded value that no modifier replaced), Spike rejects the delivery; check it with the action's Test button and the warning in Step 2. Also check that the integration is not archived in Spike.

Incidents never resolve

Check that the Spike action is in the monitor's error resolved actions, that its status arrives as msOK, and that monitor_key is identical on the alert and the recovery.

Two alerts became one incident, or one alert became two

Check monitor_key on the incidents. A key that still contains $Machine$ or $MonitorTitle$ is not an id. Without a key, Spike matches by title, so give each monitor its own message in Advanced Monitor Options.

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