Import from Grafana OnCall¶
Copy your Grafana OnCall schedules, shifts, overrides, escalation chains and integrations into Argavon. Read Move from another tool first for the rules every import follows.
What is imported¶
| Grafana OnCall | Argavon | Notes |
|---|---|---|
| Users | Matched by email | Nobody is created. |
| Schedule (not iCal) | One schedule, same name and timezone | A schedule with no timezone uses UTC. |
Rotation shifts (rolling_users or a recurring event) |
Layers | Frequency hourly, daily or weekly with its interval becomes the shift unit and length. start_rotation_from_user_index sets who goes first. A shift's own timezone is kept. until becomes the layer end. |
| Shift level | Layer priority | A higher level wins, as in OnCall. |
by_day and a duration shorter than the period |
Per-day windows | Exact for any by_day list, daily shifts with interval 1 and weekly shifts with interval 1. |
| Override shifts and single-event shifts | Schedule overrides | |
| Escalation chains | Escalation policies | notify_persons and notify_on_call_from_schedule become step targets. wait becomes the wait after the step. notify_persons_next_each_time becomes a round-robin step. Each repeat_escalation step adds one repeat. |
| Integration default routes | One route for every service (*) |
Only when all integrations' default routes use the same chain. |
| Integrations | Sources | Only types that map to Prometheus/Alertmanager, Grafana, Zabbix or OpenTelemetry. |
What is not imported¶
Each of these appears as a warning in the preview:
- iCal schedules. Recreate them as layers.
- Shifts that repeat monthly, or with an unreadable start.
- Groups of several users on call together in one shift: Argavon has one person per layer, so the first user of each group is used.
- An override with several users: the first one is used.
- A shift that is active for only part of a period other than daily or weekly with interval 1: the whole period is used.
- Escalation steps of any other type (for example, notifying a user group or calling a webhook).
- More than 9 repeats: capped at 9.
- Routing when integrations send to different chains. OnCall routes by integration, Argavon routes by service, so no route is created. Add routes by service in Escalation.
- Integration types with no Argavon source type. Point that tool at a Argavon source by hand.
- Personal notification rules and contact methods.
Check repeats after importing
Each Repeat escalation step in an OnCall chain becomes one repeat of the Argavon policy. If your chain repeats several times, set Repeat on the imported policy to match.
Get an API token¶
The importer only reads. It calls the OnCall public API under <OnCall API URL>/api/v1/: users/, schedules/, on_call_shifts/, escalation_chains/, escalation_policies/ and integrations/. The token is sent as-is in the Authorization header.
Create an API token in Grafana OnCall settings.
In Grafana OnCall, an admin creates the token under Settings → API tokens; the same page shows the API URL. The importer only reads (GET requests).
The OnCall API URL is the base URL of your OnCall API, for example https://oncall.example.com. If OnCall is served under a path, include it; the importer keeps the path. It must be https.
Self-hosted OnCall on a private network: the Argavon server refuses private, loopback and link-local addresses and plain http unless it runs with NOTIFY_ALLOW_PRIVATE_TARGETS=true. See Configuration. Leave that off on a shared server.
Step by step in the web app¶
- Make sure everyone who is on call in OnCall has a Argavon account with the same email.
- Open Import, pick Grafana OnCall.
- Keep Read from the Grafana OnCall API selected. Paste the token into OnCall API token and the URL into OnCall API URL.
- Click Preview. Read the warnings about groups, monthly shifts and routing.
- Click Import.
- Copy any new ingest tokens from New ingest tokens, shown only now.
With the API¶
curl -s https://argavon.com.com/api/v1/imports/grafana-oncall/apply \
-H "Authorization: Bearer $NEUROOPS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"source": "api", "api_key": "'"$ONCALL_TOKEN"'", "api_base": "https://oncall.example.com"}'
api_base is required for Grafana OnCall. Use /plan instead of /apply for a preview.
Import from a file¶
Put each endpoint's results in one JSON document:
{
"users": [{"id": "U1", "email": "ann@example.com", "username": "ann"}],
"schedules": [{"id": "S1", "name": "Payments", "type": "web", "time_zone": "Europe/Berlin", "shifts": ["O1"]}],
"on_call_shifts": [{
"id": "O1", "name": "Weekly", "type": "rolling_users", "level": 1,
"start": "2026-11-02T09:00:00", "duration": 604800,
"frequency": "weekly", "interval": 1,
"rolling_users": [["U1"]]
}],
"escalation_chains": [{"id": "C1", "name": "Payments"}],
"escalation_policies": [
{"id": "E1", "escalation_chain_id": "C1", "position": 0, "type": "notify_on_call_from_schedule", "notify_on_call_from_schedule": "S1"},
{"id": "E2", "escalation_chain_id": "C1", "position": 1, "type": "wait", "duration": 900}
],
"integrations": [{"id": "I1", "name": "Alertmanager", "type": "alertmanager", "default_route": {"escalation_chain_id": "C1"}}]
}
Shift start times without a zone are read in the shift's timezone, or the schedule's.
What to check after the import¶
- On-Call: who is on call now matches OnCall for each schedule, especially schedules with several levels and restricted shifts split into
(part 1),(part 2)layers. - Escalation: round-robin steps and waits. Notify steps with no wait between them are merged into one step. Two waits in a row are added together. The last step waits 5 minutes unless a wait follows it, and a step directly followed by a round-robin step waits 1 minute.
- Escalation routes: if the import created a
*route, it catches every service. Add routes for specific services above it if you need them. See Escalation. - Send a test alert through each new source.
If it does not work¶
| Message | What to do |
|---|---|
api_base is required: the URL of your Grafana OnCall API, such as https://oncall.example.com |
Fill in OnCall API URL. |
api_base must be an https URL |
Use https://. Plain http needs NOTIFY_ALLOW_PRIVATE_TARGETS=true. |
could not reach <host>: ... |
The server cannot reach OnCall, or the address is private and blocked. |
the API returned a link to another host (...); stopped |
OnCall's paging link points at another host and has no /api/v1/ path to follow. Behind a reverse proxy, links that name OnCall's internal address are followed on the address you entered (the key is never sent anywhere else), so this only happens with an unusual proxy setup. Enter the URL OnCall itself uses for its links. |
<host> rejected the API key (HTTP 401) ... |
Wrong or expired token. |
<host> /api/v1/... answered HTTP 404: ... |
The URL is wrong, or misses the path OnCall is served under. |
See also the common errors in Move from another tool.