add FireHydrant plugin

Signed-off-by: Christine Yi <ohchristineyi@gmail.com>
This commit is contained in:
Christine Yi
2021-07-29 12:05:37 -04:00
parent c49b012d55
commit e6a53d79f0
22 changed files with 1207 additions and 0 deletions
+66
View File
@@ -0,0 +1,66 @@
# FireHydrant Plugin
## Overview
The [FireHydrant](https://firehydrant.io) plugin brings incident management to Backstage, and it displays service incidents information such as active incidents and incident analytics. There are also quick action links that let you create and view incidents in FireHydrant.
<img src="./doc/firehydrant_plugin_screenshot.png" alt="firehydrant plugin screenshot">
## Features
- View total active incidents for a service declared in FireHydrant
- Quick links to the top 5 most recent active incidents in FireHydrant
- View incident metrics for a given service within the last 30 days, including: healthiness, total time impacted, total number of incidents, and MTT* (Mean Time To *) data such as MTTD (detect), MTTA (acknowledge), MTTM (mitigate) and MTTR (resolve).
## Setup
1. Install the plugin:
```bash
# From your Backstage root directory
cd packages/app
yarn add @backstage/plugin-firehydrant
```
2. Add the plugin to `EntityPage.tsx`, inside the `const overviewContent`'s parent `<Grid>` component:
```ts
// In packages/app/src/components/catalog/EntityPage.tsx
import { FirehydrantPage } from '@backstage/plugin-firehydrant';
// Add to code as a grid item
<Grid item md={6}>
<FirehydrantPage />
</Grid>;
```
3. Add proxy configuration to `app-config.yaml`:
```yaml
proxy:
'/firehydrant/api':
target: 'https://api.firehydrant.io/v1/'
changeOrigin: true
headers:
# Supply the token you generated from https://app.firehydrant.io/organizations/bots
Authorization: Bearer ${FIREHYDRANT_BOT_TOKEN}
```
as well as the default url configuration to `app-config.yaml`:
```yaml
firehydrant:
baseUrl: https://api.firehydrant.io
```
Note: if you are not using environment variables, you can directly type the API Bot Token into `app-config.yaml`:
```yaml
proxy:
'/firehydrant/api':
target: 'https://api.firehydrant.io/v1/'
changeOrigin: true
headers:
# Supply the token you generated from https://app.firehydrant.io/organizations/bots
Authorization: Bearer fhb-e4911b22bcd788c4a4afeb0c111ffbfa
```