This plugin displays PagerDuty information about an entity such as if there are any active incidents and what the escalation policy is.
There is also an easy way to trigger an alarm directly to the person who is currently on-call.
This plugin requires that entities are annotated with an integration key. See more further down in this document.
This plugin provides:
- A list of incidents
- A way to trigger an alarm to the person on-call
- Information details about the person on-call
Install the plugin:
yarn add @backstage/plugin-pagerduty
Add it to the app in plugins.ts
:
export { plugin as Pagerduty } from '@backstage/plugin-pagerduty';
Add it to the EntityPage.tsx
:
import {
isPluginApplicableToEntity as isPagerDutyAvailable,
EntityPagerDutyCard,
} from '@backstage/plugin-pagerduty';
// add to code
{
isPagerDutyAvailable(entity) && (
<Grid item md={6}>
<EntityPagerDutyCard />
</Grid>
);
}
If you want to override the default URL for events, you can add it to app-config.yaml
.
In app-config.yaml
:
pagerduty:
eventsBaseUrl: 'https://events.pagerduty.com/v2'
In order for the client to make requests to the PagerDuty API it needs an API Token.
Add the proxy configuration in app-config.yaml
proxy:
...
'/pagerduty':
target: https://api.pagerduty.com
headers:
Authorization: Token token=${PAGERDUTY_TOKEN}
Then start the backend passing the token as an environment variable:
$ PAGERDUTY_TOKEN='Token token=<TOKEN>' yarn start
This will proxy the request by adding Authorization
header with the provided token.
The information displayed for each entity is based on the integration key.
If you want to use this plugin for an entity, you need to label it with the below annotation:
annotations:
pagerduty.com/integration-key: [INTEGRATION_KEY]