@backstage-community/plugin-ilert 0.2.24

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,127 @@
1
+ # @backstage-community/plugin-ilert
2
+
3
+ ## Introduction
4
+
5
+ [iLert](https://www.ilert.com) is a platform for alerting, on-call management and uptime monitoring. It helps teams to reduce response times to critical incidents by extending monitoring tools with reliable alerting, automatic escalations, on-call schedules and other features to support the incident response process, such as informing stakeholders or creating tickets in external incident management tools.
6
+
7
+ ## Overview
8
+
9
+ This plugin gives an overview about ongoing iLert incidents, on-call and uptime monitor status.
10
+ See who is on-call, which incidents are active and trigger incidents directly from backstage for the configured alert sources.
11
+
12
+ In detail this plugin provides:
13
+
14
+ - Information details about the person on-call (all escalation levels of the current time)
15
+ - A way to override the current on-call person
16
+ - A list of active incidents
17
+ - A way to trigger a new incident
18
+ - A way to reassign/acknowledge/resolve an incident
19
+ - A way to trigger an incident action
20
+ - A way to trigger an immediate maintenance
21
+ - A way to disable/enable an alert source
22
+ - A list of uptime monitors
23
+
24
+ ## Setup instructions
25
+
26
+ Install the plugin:
27
+
28
+ ```bash
29
+ # From your Backstage root directory
30
+ yarn --cwd packages/app add @backstage-community/plugin-ilert
31
+ ```
32
+
33
+ Add it to the `EntityPage.tsx`:
34
+
35
+ ```ts
36
+ import {
37
+ isPluginApplicableToEntity as isILertAvailable,
38
+ EntityILertCard,
39
+ } from '@backstage-community/plugin-ilert';
40
+
41
+ // ...
42
+ <EntitySwitch>
43
+ <EntitySwitch.Case if={isILertAvailable}>
44
+ <Grid item sm={6}>
45
+ <EntityILertCard />
46
+ </Grid>
47
+ </EntitySwitch.Case>
48
+ </EntitySwitch>;
49
+ // ...
50
+ ```
51
+
52
+ > To force an iLert card for each entity just add the `<EntityILertCard />` component. An instruction card will appear if no integration key is set.
53
+
54
+ ## Add iLert explorer to the app sidebar
55
+
56
+ Modify your app routes in [`App.tsx`](https://github.com/backstage/backstage/blob/master/packages/app/src/App.tsx) to include the Router component exported by the plugin - for example:
57
+
58
+ ```tsx
59
+ import { ILertPage } from '@backstage-community/plugin-ilert';
60
+ <FlatRoutes>
61
+ // ...
62
+ <Route path="/ilert" element={<ILertPage />} />
63
+ // ...
64
+ </FlatRoutes>;
65
+ ```
66
+
67
+ Modify your sidebar in [`Root.tsx`](https://github.com/backstage/backstage/blob/master/packages/app/src/components/Root/Root.tsx) to include the icon component exported by the plugin - for example:
68
+
69
+ ```tsx
70
+ import { ILertIcon } from '@backstage-community/plugin-ilert';
71
+ <Sidebar>
72
+ // ...
73
+ <SidebarItem icon={ILertIcon} to="ilert" text="iLert" />
74
+ // ...
75
+ </Sidebar>;
76
+ ```
77
+
78
+ ## Client configuration
79
+
80
+ If you want to override the default URL for api calls and detail pages, you can add it to `app-config.yaml`.
81
+
82
+ In `app-config.yaml`:
83
+
84
+ ```yaml
85
+ ilert:
86
+ baseUrl: https://my-org.ilert.com/
87
+ ```
88
+
89
+ ## Providing the Authorization Header
90
+
91
+ In order to make the API calls, you need to provide a new proxy config which will redirect to the [iLert API](https://api.ilert.com/api-docs/) endpoint. It needs an [Authorization Header](https://api.ilert.com/api-docs/#section/Authentication).
92
+
93
+ Add the proxy configuration in `app-config.yaml`
94
+
95
+ ```yaml
96
+ proxy:
97
+ ...
98
+ '/ilert':
99
+ target: https://api.ilert.com
100
+ allowedMethods: ['GET', 'POST', 'PUT']
101
+ allowedHeaders: ['Authorization']
102
+ headers:
103
+ Authorization: ${ILERT_AUTH_HEADER}
104
+ ```
105
+
106
+ Then start the backend, passing the authorization header (bearer token or basic auth) as environment variable:
107
+
108
+ ```bash
109
+ $ ILERT_AUTH_HEADER='<ILERT_AUTH>' yarn start
110
+ ```
111
+
112
+ ## Integration Key
113
+
114
+ The information displayed for each entity is based on the alert source integration key.
115
+
116
+ ### Adding the integration key to the entity annotation
117
+
118
+ If you want to use this plugin for an entity, you need to label it with the below annotation:
119
+
120
+ ```yml
121
+ apiVersion: backstage.io/v1alpha1
122
+ kind: Component
123
+ metadata:
124
+ name: example
125
+ annotations:
126
+ ilert.com/integration-key: [INTEGRATION_KEY]
127
+ ```
package/config.d.ts ADDED
@@ -0,0 +1,31 @@
1
+ /*
2
+ * Copyright 2021 The Backstage Authors
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ export interface Config {
17
+ ilert?: {
18
+ /**
19
+ * Domain used by users to access iLert web UI.
20
+ * Example: https://my-app.ilert.com/
21
+ * @visibility frontend
22
+ */
23
+ baseUrl: string;
24
+
25
+ /**
26
+ * Path to use for requests via the proxy, defaults to /ilert/api
27
+ * @visibility frontend
28
+ */
29
+ proxyPath?: string;
30
+ };
31
+ }
@@ -0,0 +1,58 @@
1
+ export { ILertCard, Router as ILertPage, isPluginApplicableToEntity } from '../index.esm.js';
2
+ import '@backstage/core-plugin-api';
3
+ import '@backstage/errors';
4
+ import 'luxon';
5
+ import '@backstage/core-components';
6
+ import 'react';
7
+ import '@material-ui/core/Button';
8
+ import '@material-ui/icons/Add';
9
+ import 'react-use/esm/useAsyncRetry';
10
+ import '@backstage/catalog-model';
11
+ import '@material-ui/core/Typography';
12
+ import '@material-ui/core/Dialog';
13
+ import '@material-ui/core/DialogActions';
14
+ import '@material-ui/core/DialogContent';
15
+ import '@material-ui/core/DialogTitle';
16
+ import '@material-ui/core/styles';
17
+ import '@material-ui/core/TextField';
18
+ import '@material-ui/core/useMediaQuery';
19
+ import '@material-ui/lab/Alert';
20
+ import '@material-ui/lab/Autocomplete';
21
+ import 'humanize-duration';
22
+ import '@material-ui/core/IconButton';
23
+ import '@material-ui/core/Menu';
24
+ import '@material-ui/core/MenuItem';
25
+ import '@material-ui/icons/MoreVert';
26
+ import '@material-ui/core/Grid';
27
+ import '@material-ui/core/Chip';
28
+ import '@material-ui/core/Checkbox';
29
+ import '@material-ui/core/FormControl';
30
+ import '@material-ui/core/ListItemText';
31
+ import '@material-ui/core/Select';
32
+ import '@material-ui/core/Card';
33
+ import '@material-ui/core/CardContent';
34
+ import '@material-ui/core/CardHeader';
35
+ import '@material-ui/icons/Repeat';
36
+ import '@material-ui/pickers/DateTimePicker';
37
+ import '@material-ui/pickers/MuiPickersUtilsProvider';
38
+ import '@date-io/luxon';
39
+ import '@material-ui/core/Divider';
40
+ import '@backstage/plugin-catalog-react';
41
+ import '@material-ui/icons/AlarmAdd';
42
+ import '@material-ui/icons/Build';
43
+ import '@material-ui/icons/Pause';
44
+ import '@material-ui/icons/PlayArrow';
45
+ import '@material-ui/icons/Web';
46
+ import '@material-ui/core/DialogContentText';
47
+ import '@material-ui/core/List';
48
+ import '@material-ui/core/ListItem';
49
+ import '@material-ui/core/ListItemIcon';
50
+ import '@material-ui/core/ListSubheader';
51
+ import '@material-ui/icons/Replay';
52
+ import '@material-ui/core/Avatar';
53
+ import '@material-ui/core/ListItemSecondaryAction';
54
+ import '@material-ui/core/Tooltip';
55
+ import '@material-ui/icons/Email';
56
+ import '@material-ui/icons/Phone';
57
+ import '@material-ui/core/SvgIcon';
58
+ //# sourceMappingURL=index-D2_Gjvjx.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-D2_Gjvjx.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -0,0 +1,58 @@
1
+ export { ILertCard, isPluginApplicableToEntity } from '../index.esm.js';
2
+ import '@backstage/core-plugin-api';
3
+ import '@backstage/errors';
4
+ import 'luxon';
5
+ import '@backstage/core-components';
6
+ import 'react';
7
+ import '@material-ui/core/Button';
8
+ import '@material-ui/icons/Add';
9
+ import 'react-use/esm/useAsyncRetry';
10
+ import '@backstage/catalog-model';
11
+ import '@material-ui/core/Typography';
12
+ import '@material-ui/core/Dialog';
13
+ import '@material-ui/core/DialogActions';
14
+ import '@material-ui/core/DialogContent';
15
+ import '@material-ui/core/DialogTitle';
16
+ import '@material-ui/core/styles';
17
+ import '@material-ui/core/TextField';
18
+ import '@material-ui/core/useMediaQuery';
19
+ import '@material-ui/lab/Alert';
20
+ import '@material-ui/lab/Autocomplete';
21
+ import 'humanize-duration';
22
+ import '@material-ui/core/IconButton';
23
+ import '@material-ui/core/Menu';
24
+ import '@material-ui/core/MenuItem';
25
+ import '@material-ui/icons/MoreVert';
26
+ import '@material-ui/core/Grid';
27
+ import '@material-ui/core/Chip';
28
+ import '@material-ui/core/Checkbox';
29
+ import '@material-ui/core/FormControl';
30
+ import '@material-ui/core/ListItemText';
31
+ import '@material-ui/core/Select';
32
+ import '@material-ui/core/Card';
33
+ import '@material-ui/core/CardContent';
34
+ import '@material-ui/core/CardHeader';
35
+ import '@material-ui/icons/Repeat';
36
+ import '@material-ui/pickers/DateTimePicker';
37
+ import '@material-ui/pickers/MuiPickersUtilsProvider';
38
+ import '@date-io/luxon';
39
+ import '@material-ui/core/Divider';
40
+ import '@backstage/plugin-catalog-react';
41
+ import '@material-ui/icons/AlarmAdd';
42
+ import '@material-ui/icons/Build';
43
+ import '@material-ui/icons/Pause';
44
+ import '@material-ui/icons/PlayArrow';
45
+ import '@material-ui/icons/Web';
46
+ import '@material-ui/core/DialogContentText';
47
+ import '@material-ui/core/List';
48
+ import '@material-ui/core/ListItem';
49
+ import '@material-ui/core/ListItemIcon';
50
+ import '@material-ui/core/ListSubheader';
51
+ import '@material-ui/icons/Replay';
52
+ import '@material-ui/core/Avatar';
53
+ import '@material-ui/core/ListItemSecondaryAction';
54
+ import '@material-ui/core/Tooltip';
55
+ import '@material-ui/icons/Email';
56
+ import '@material-ui/icons/Phone';
57
+ import '@material-ui/core/SvgIcon';
58
+ //# sourceMappingURL=index-aory7UQN.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-aory7UQN.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}