Primer Monitors app

The Primer Monitors app gives you a trigger to react to new monitor events from our Monitors product. Now you have complete control to build your own notification flows however you want - send yourself a web request, a Slack message, an email, or immediately create an incident.

Trigger outputs

The Monitor event created trigger returns two objects: the monitor object, and the monitor event object. Some fields are only returned for static monitors, and some only for dynamic monitors.

Monitor

OutputTypeDescription
IDnumberThe monitor Id.
NametextThe custom name given to the monitor.
MetrictextThe metric used for this monitor, for example Payment.paymentsDeclinedCount.
TypetextTHRESHOLD for static monitors or ANOMALY for dynamic monitors.
Threshhold valuenumberDefine the value that should trigger the monitor when compared to the measured value.
Threshhold directiontextDefine if the monitor should trigger when the measured value is ABOVE or BELOW the threshold value.
Minimum number of samplesnumberIf this is greater than zero, the monitor will only trigger when at least this many payments are in the event window.

Monitor Events

OutputTypeDescription
Event IDnumberThe ID for the specific event, can be used to construct a deeplink to Primer's dashboard.
Event datedatetimeDatetime in UTC when this event was created.
Event window startdatetimeDatetime in UTC for the start of the observed period.
Event window enddatetimeDatetime in UTC for the end of the observed period.
Measured valuenumberMeasured value in this event window.
Lower boundnumberThe lower end of the expected range for this window, depending on the metric used. Only returned for dynamic monitors.
Upper boundnumberThe upper end of the expected range for this window, depending on the metric used. Only returned for dynamic monitors.
SamplesnumberThe amount of payments within this event window.

Example flow

Here is an example for a workflow using this trigger: whenever a new monitor event is created, a web request is sent notifying a dedicated endpoint. Afterwards, depending on the metric used, an incident is created via PagerDuty when too many payments start failing, a Slack message is sent when potential 3DS issues are observed, and an email is sent for any other metric. All within one notification flow:

Escalation flow

Workflow Runs

Workflow Runs are automatically available for any workflow that was executed using this trigger.