What gets imported
The template creates these catalog types, each from a Backstage kind or one of its fields.- Components: link to the group that owns them, their system, and the components they depend on
- Systems and Domains: link to their owning group, and systems to their domain
- Groups: link to their parent group, their Backstage users, and those users’ incident.io accounts
- Users: link to the groups they belong to, and to their incident.io user
Set up the sync
You need a machine that can reach both Backstage and incident.io, and an incident.io API key with the View catalog types and entries and Manage catalog types and edit catalog data permissions. Create one in Settings → API keys.Install the importer
incidentio/catalog-importer Docker image works anywhere Docker does.Copy the Backstage template
catalog-importer init, choose Backstage, and pick where to put it. It creates a backstage directory: run the remaining commands from inside it. The template comes with example entities, so you can try a sync straight away:Connect it to Backstage
importer.jsonnet, swap the local source for the backstage source below it, and point it at your Backstage’s /api/catalog/entities/by-query endpoint:filter: kinds.filter fetches only the kinds you import. See Authentication for the token.Preview, then sync
Run it on a schedule
Authentication
Backstage asks callers from outside it for a token. Configure the importer to match your Backstage:Choose what to import
kinds.libsonnet lists the Backstage kinds to import. Component, System, Domain, Group, and User are on by default: everything you need to route to the team that owns a service. To import API or Resource entities, uncomment them there. The same list sets the Backstage filter, the catalog types, and the attributes that link them, such as Provides APIs on components.
To narrow what comes in further, add conditions to the Backstage filter, such as metadata.namespace=default, or a JavaScript filter on an output, such as only groups whose type is team. Filtering in Backstage is faster, because excluded entities are never fetched. See Choose what to import in the template.
Use Backstage Groups as your teams
Make Backstage Group your team type, and each group becomes a team in incident.io: you can link schedules and escalation paths to it, filter incidents and alerts by it, and route alerts to it. See Setting up teams for everything teams power. The template sets Backstage Group up for this, with three attributes teams need:- Members: the incident.io users in the group, worked out from each Backstage user’s groups and email address
- Escalation paths: the escalation paths that page the team, which you fill in from incident.io
- Parent: the group above it, if you want a team hierarchy
- Go to Settings → Teams and open the Configuration tab
- Set Team type to Backstage Group. Members and Escalation paths switch to Backstage Group → Members and Backstage Group → Escalation paths
- Optionally, set Parent teams to Backstage Group → Parent
- Click Save
How the links stay current
Each sync updates the groups, users, and memberships from Backstage. You don’t need to repeat any of the steps above.- Members follow Backstage. When someone joins or leaves a group in Backstage, the next sync updates the team.
- Escalation paths and schedules you link to a team belong to incident.io, not Backstage. The importer never overwrites them, so they survive every sync.
- Renaming a group’s display name in Backstage renames the team and keeps its links. Entries are matched on their Backstage namespace and name, so changing
metadata.namemakes a new team instead. - Removing a group from Backstage, or filtering it out of the import, archives the team on the next sync, so it stops appearing in incident.io. If the group comes back with the same namespace and name, the team comes back with its links to schedules and escalation paths.
Route alerts with an on-call team
Ownership in Backstage doesn’t always match who’s on call. If you record an on-call team on each component, for example in an annotation, you can import it and route alerts with it. Say your components carry an annotation naming the group that’s paged for them:Import the annotation
pipelines/entries.jsonnet, the Component output has an On-call team attribute commented out. Uncomment it and set the annotation name:Give alerts a component
service tag. See Attributes, tags and priority.Escalate to the on-call team
Remove a kind you imported by mistake
If you imported a kind you don’t want, such as tens of thousands of APIs, delete its catalog type rather than its entries. Take the kind out ofkinds.libsonnet, then sync with --prune:
--prune deletes any catalog type this config created but no longer includes. incident.io removes the type straight away and archives its entries in the background, so this finishes quickly however large the type is.
FAQs
Can incident.io sync Backstage for me?
Can incident.io sync Backstage for me?
Why don't my groups or users appear after a sync?
Why don't my groups or users appear after a sync?
backstage.io/v1alpha1, but Backstage also allows backstage.io/v1beta1 for groups and
users. The current template matches on kind alone.Why can't I pick my Backstage groups when linking a schedule to a team?
Why can't I pick my Backstage groups when linking a schedule to a team?
Why is a sync slow?
Why is a sync slow?
kinds.libsonnet and the filter on
your Backstage source, and turn off kinds you don’t use. See Remove a kind you imported by
mistake to clean one up.Does this work with Roadie?
Does this work with Roadie?
https://api.roadie.so/api/catalog/entities/by-query as the endpoint, with a Roadie API token and sign_jwt: false.Why can't I edit these catalog types in the dashboard?
Why can't I edit these catalog types in the dashboard?
Can I import entities the template doesn't cover?
Can I import entities the template doesn't cover?
How do I connect Backstage users to incident.io users?
How do I connect Backstage users to incident.io users?