Set up on-call calls to your iPhone
Pair your iPhone with the console, put it in an on-call target, and point an uptime check or an App Monitoring rule at the target, so an alert rings your phone like a call.
An alert can call your iPhone: the phone shows the system call screen, rings through silent mode, and reads the alert aloud when you answer. No phone number is involved. How a page rings and escalates is in How on-call works.
Prerequisites
- An iPhone with iOS 17 or later and the On-call app installed.
- Permission for
monitoring:CreateOnCallPairing,monitoring:CreateOnCallTargetandmonitoring:UpdateCheckonrn:ews::<organization id>:monitoring:*, andmonitoring:DescribeOnCallPagesto open On-call in the console (andmonitoring:DescribeOnCallDevicesfor its Devices tab). - To acknowledge from the phone, your own permissions must allow
monitoring:AcknowledgeOnCallPage: the phone acts as you, and never with more than you have.
Pair the phone
- Open Monitoring, then On-call, then Devices, and choose Pair device.
- On the iPhone, open On-call and scan the QR code, or scan it with the Camera app. The code works once, for ten minutes.
- Allow notifications when the app asks. The dialog in the console closes when the phone is paired.
dcloud monitoring oncall-pairings createThe answer's qrPayload is what the QR code encodes; show it as a QR code to the phone, for
example with qrencode -t ansiutf8.
curl -X POST Deutsche Cloud Console/monitoring/api/oncall/pairings \
-H "Authorization: EWS-ACCESS-KEY $KEY_ID:$SECRET"Pairing gives the phone an access key of yours, named "On-call device: name" in your access keys. It can read targets and pages, acknowledge, resolve and escalate pages, and change or unpair its own device, nothing else. Deleting the key unpairs the phone.
Create a target
A target is who to ring. One step with one device rings one phone; one step with several devices rings them together; several steps escalate: the next step rings when nobody acknowledged within the step's wait.
- In On-call, open Targets and choose Create target.
- For Name, enter Primary.
- In step 1, choose your phone. To escalate, add a step with another phone, and set the first step's wait (the default is 5 minutes).
- Choose Create target.
dcloud monitoring oncall-targets create --name Primary \
--steps '{"deviceIds":["<device id>"],"waitMinutes":5}' \
--steps '{"deviceIds":["<second device id>"]}'curl -X POST Deutsche Cloud Console/monitoring/api/oncall/targets \
-H "Authorization: EWS-ACCESS-KEY $KEY_ID:$SECRET" -H 'Content-Type: application/json' \
-d '{"name":"Primary","steps":[{"deviceIds":["<device id>"],"waitMinutes":5},{"deviceIds":["<second device id>"]}]}'Point an alert at the target
- Uptime check: in the check's form, choose the target under On-call target, or
dcloud monitoring checks update <check id> --oncall-target-id <target id>. A DOWN rings the target; UP again resolves the page. - App Monitoring alert rule: in the rule's actions, choose On-call target, or add the
action
{"kind": "oncall", "targetId": "<target id>"}.
Test it
In Devices, choose Test call on your phone (dcloud monitoring oncall-devices test <device id>).
The phone rings; answer and choose Acknowledge. Pages shows the test page and what Apple
answered for each push.