0.0.0-nightly-20220219022334 • Published 4 years ago

@backstage/plugin-splunk-on-call v0.0.0-nightly-20220219022334

Weekly downloads
215
License
Apache-2.0
Repository
github
Last release
4 years ago

Splunk On-Call

Overview

This plugin displays Splunk On-Call (formerly VictorOps) information associated with an entity.

It also provides the ability to trigger new incidents to specific users and/or specific teams from within Backstage.

This plugin requires that entities feature either a splunk.com/on-call-team or a splunk.com/on-call-routing-key annotation. See below for further details.

This plugin provides:

  • A list of incidents
  • A way to trigger a new incident to specific users and/or teams
  • A way to acknowledge/resolve an incident
  • Information details about the persons on-call

Setup instructions

Install the plugin:

# From your Backstage root directory
cd packages/app
yarn add @backstage/plugin-splunk-on-call

Add it to your EntityPage:

// packages/app/src/components/catalog/EntityPage.tsx
import {
  isSplunkOnCallAvailable,
  EntitySplunkOnCallCard,
} from '@backstage/plugin-splunk-on-call';
// ...
const overviewContent = (
  <Grid container spacing={3} alignItems="stretch">
    <EntitySwitch>
      <EntitySwitch.Case if={isSplunkOnCallAvailable}>
        <Grid item md={6}>
          <EntitySplunkOnCallCard />
        </Grid>
      </EntitySwitch.Case>
    </EntitySwitch>

Client configuration

In order to be able to perform certain actions (create-acknowledge-resolve an action), you need to provide a REST Endpoint.

To enable the REST Endpoint integration you can go on https://portal.victorops.com/ inside Integrations > 3rd Party Integrations > REST – Generic. You can now copy the URL to notify: <SPLUNK_ON_CALL_REST_ENDPOINT>/$routing_key

In app-config.yaml:

splunkOnCall:
  eventsRestEndpoint: <SPLUNK_ON_CALL_REST_ENDPOINT>

In order to make the API calls, you need to provide a new proxy config which will redirect to the Splunk On-Call API endpoint and add authentication information in the headers:

# app-config.yaml
proxy:
  # ...
  '/splunk-on-call':
    target: https://api.victorops.com/api-public
    headers:
      X-VO-Api-Id: ${SPLUNK_ON_CALL_API_ID}
      X-VO-Api-Key: ${SPLUNK_ON_CALL_API_KEY}

In addition, to make certain API calls (trigger-resolve-acknowledge an incident) you need to add the PATCH method to the backend cors methods list: [GET, POST, PUT, DELETE, PATCH].

Adding your team name to the entity annotation

The information displayed for each entity is based on either an associated team name or an associated routing key.

To use this plugin for an entity, the entity must be labeled with either a splunk.com/on-call-team or a splunk.com/on-call-routing-key annotation.

For example, by specifying a splunk.com/on-call-team, the plugin displays Splunk On-Call data associated with the specified team:

annotations:
  splunk.com/on-call-team: <SPLUNK_ON_CALL_TEAM_NAME>

Alternatively, by specifying a splunk.com/on-call-routing-key, the plugin displays Splunk On-Call data associated with each of the teams associated with the specified routing key:

annotations:
  splunk.com/on-call-routing-key: <SPLUNK_ON_CALL_ROUTING_KEY>

Create the Routing Key

To be able to use the REST Endpoint seen above, you must have created a routing key with the same name as the provided team.

You can create a new routing key on https://portal.victorops.com/ by going to Settings > Routing Keys.

You can read Create & Manage Alert Routing Keys for further information.

Providing the API key and API id

In order for the client to make requests to the Splunk On-Call API it needs an API ID and an API Key.

Then start the backend passing the values as an environment variable:

$ SPLUNK_ON_CALL_API_KEY='' SPLUNK_ON_CALL_API_ID='' yarn start

This will proxy the request by adding X-VO-Api-Id and X-VO-Api-Key headers with the provided values.

You can also add the values in your helm template:

# backend-secret.yaml
stringData:
  # ...
  SPLUNK_ON_CALL_API_ID: { { .Values.auth.splunkOnCallApiId } }
  SPLUNK_ON_CALL_API_KEY: { { .Values.auth.splunkOnCallApiKey } }

To enable it you need to provide them in the chart's values:

# values.yaml
auth:
  # ...
  splunkOnCallApiId: h
  splunkOnCallApiKey: h
0.4.24

2 years ago

0.4.23

2 years ago

0.4.23-next.1

2 years ago

0.4.23-next.0

2 years ago

0.4.22

2 years ago

0.4.21

2 years ago

0.4.20

2 years ago

0.4.20-next.2

2 years ago

0.4.20-next.1

2 years ago

0.4.20-next.0

2 years ago

0.4.19

2 years ago

0.4.19-next.3

2 years ago

0.4.19-next.2

2 years ago

0.4.19-next.1

2 years ago

0.4.19-next.0

2 years ago

0.4.18

2 years ago

0.4.18-next.2

2 years ago

0.4.18-next.1

2 years ago

0.4.18-next.0

2 years ago

0.4.17

2 years ago

0.4.17-next.3

2 years ago

0.4.17-next.2

2 years ago

0.4.17-next.1

2 years ago

0.4.14-next.0

2 years ago

0.4.14-next.2

2 years ago

0.4.14-next.1

2 years ago

0.4.15-next.2

2 years ago

0.4.15-next.1

2 years ago

0.4.15-next.0

2 years ago

0.4.13-next.2

2 years ago

0.4.13-next.3

2 years ago

0.4.13-next.1

2 years ago

0.4.10-next.1

2 years ago

0.4.10-next.0

2 years ago

0.4.9-next.2

3 years ago

0.4.9-next.1

3 years ago

0.4.10

2 years ago

0.4.15

2 years ago

0.4.16

2 years ago

0.4.13

2 years ago

0.4.14

2 years ago

0.4.11

2 years ago

0.4.12

2 years ago

0.4.17-next.0

2 years ago

0.4.9

2 years ago

0.4.12-next.0

2 years ago

0.4.9-next.0

3 years ago

0.4.8

3 years ago

0.4.8-next.3

3 years ago

0.4.8-next.2

3 years ago

0.4.7-next.1

3 years ago

0.4.7-next.2

3 years ago

0.4.8-next.1

3 years ago

0.4.8-next.0

3 years ago

0.4.7

3 years ago

0.4.7-next.0

3 years ago

0.4.6-next.3

3 years ago

0.4.6

3 years ago

0.4.6-next.1

3 years ago

0.4.6-next.0

3 years ago

0.4.6-next.2

3 years ago

0.4.5-next.1

3 years ago

0.4.5-next.2

3 years ago

0.4.5-next.0

3 years ago

0.4.5

3 years ago

0.4.4

3 years ago

0.4.3-next.1

3 years ago

0.4.3-next.2

3 years ago

0.4.4-next.2

3 years ago

0.4.4-next.1

3 years ago

0.4.4-next.0

3 years ago

0.4.3

3 years ago

0.4.1-next.2

3 years ago

0.4.1-next.1

3 years ago

0.4.1-next.0

3 years ago

0.4.1-next.4

3 years ago

0.4.1-next.3

3 years ago

0.3.35-next.0

3 years ago

0.4.3-next.0

3 years ago

0.4.0-next.1

3 years ago

0.4.1

3 years ago

0.4.0

3 years ago

0.4.2

3 years ago

0.3.34

3 years ago

0.3.34-next.0

3 years ago

0.3.34-next.1

3 years ago

0.3.34-next.2

3 years ago

0.3.33-next.3

3 years ago

0.3.33-next.1

3 years ago

0.3.33-next.2

3 years ago

0.3.33-next.0

3 years ago

0.3.33

3 years ago

0.3.30-next.1

4 years ago

0.3.30-next.0

4 years ago

0.3.31-next.0

4 years ago

0.3.31-next.1

4 years ago

0.3.31-next.2

4 years ago

0.3.31-next.3

4 years ago

0.3.32-next.1

3 years ago

0.3.32-next.0

3 years ago

0.3.31

3 years ago

0.3.30

4 years ago

0.3.32

3 years ago

0.3.29

4 years ago

0.3.29-next.1

4 years ago

0.3.29-next.0

4 years ago

0.3.29-next.2

4 years ago

0.3.28-next.1

4 years ago

0.3.28-next.0

4 years ago

0.3.26-next.0

4 years ago

0.3.28

4 years ago

0.3.27

4 years ago

0.3.26

4 years ago

0.3.25

4 years ago

0.3.22-next.0

4 years ago

0.3.20-next.0

4 years ago

0.3.20

4 years ago

0.3.24

4 years ago

0.3.23

4 years ago

0.3.22

4 years ago

0.3.21

4 years ago

0.3.19

4 years ago

0.3.18

4 years ago

0.3.17

4 years ago

0.3.16

4 years ago

0.3.21-next.0

4 years ago

0.3.15

4 years ago

0.3.14

4 years ago

0.3.13

4 years ago

0.3.12

4 years ago

0.3.11

4 years ago

0.3.10

4 years ago

0.3.9

4 years ago

0.3.8

4 years ago

0.3.7

4 years ago

0.3.6

4 years ago

0.3.5

5 years ago

0.3.4

5 years ago

0.3.3

5 years ago

0.3.2

5 years ago

0.3.1

5 years ago

0.3.0

5 years ago

0.2.1

5 years ago

0.2.0

5 years ago

0.1.4

5 years ago

0.1.3

5 years ago

0.1.2

5 years ago

0.1.1

5 years ago