Configuration

To configure the Alerta web UI modify “in place” the default config.json file that is supplied with the web application. It uses simple JSON syntax.

Deprecated since version 6.0: The Alerta web UI previously used an AngularJS configuration block for configuration settings which has now been deprecated.

The three main areas for configuration are:

  • defining the Alerta API endpoint

  • enforcing a use authentication strategy

  • selecting colors for severity, highlighting, text and sound

The default web UI config.json configuration file is included below. It assumes that the Alerta API is running on the same host (but different port) that the web UI static html files are being served from (line 2):

1{
2  "endpoint": "http://localhost:8080"
3}

config.js Javascript Configuration

Deprecated since version 5.0: Use DATABASE_URL and DATABASE_NAME instead.

Configuration from API Server

Starting from version 6.0, client configuration is supplied by the API server. This includes configuration for the web UI and the command-line tool.

Configuration settings are made on the API server and when the web UI console is bootstrapping it reads the endpoint setting and downloads the rest of the configuration.

The remote configuration from the API server is merged with the local configuration settings to provide the final configuration used by clients.

Example

The following API server settings generate the JSON client configuration shown below that.

1AUTH_PROVIDER = 'google'
2AUTH_REQUIRED = True
3CUSTOMER_VIEWS = True
4GOOGLE_TRACKING_ID = 'UA-44644195-5'
5OAUTH2_CLIENT_ID = '736147134702-glkb1pesv716j1utg4llg7c3rr7nnhli.apps.googleusercontent.com'
6OAUTH2_CLIENT_SECRET = 'secret'
 1{
 2  "audio": {},
 3  "auth_required": true,
 4  "client_id": "736147134702-glkb1pesv716j1utg4llg7c3rr7nnhli.apps.googleusercontent.com",
 5  "colors": {},
 6  "customer_views": true,
 7  "dates": {
 8    "longDate": "EEEE, MMMM d, yyyy h:mm:ss.sss a (Z)",
 9    "mediumDate": "medium",
10    "shortTime": "shortTime"
11  },
12  "endpoint": "https://api.alerta.dev",
13  "github_url": null,
14  "gitlab_url": "https://gitlab.com",
15  "keycloak_realm": null,
16  "keycloak_url": null,
17  "pingfederate_url": null,
18  "provider": "google",
19  "refresh_interval": 5000,
20  "severity": {
21    "cleared": 5,
22    "critical": 1,
23    "debug": 7,
24    "indeterminate": 5,
25    "informational": 6,
26    "major": 2,
27    "minor": 3,
28    "normal": 5,
29    "ok": 5,
30    "security": 0,
31    "trace": 8,
32    "unknown": 9,
33    "warning": 4
34  },
35  "signup_enabled": true,
36  "tracking_id": "UA-44644195-5"
37}

Note

For completeness, the OAUTH2_CLIENT_ID and OAUTH2_CLIENT_SECRET configuration settings are included in the example above however it should be noted that only the client id is sent to the client (line 4) as sending the client secret is not necessary and would compromise security.

Client Settings

Full list of API server settings that can be used to configure clients can be found at Web UI Settings.

Severity Colors

Severity

Severity Code

Colour

security

0

blu #0000FF (Blue)

critical

1

red #FF0000 (Red)

major

2

org #FFA500 (Orange)

minor

3

ylw #FFFF00 (Yellow)

warning

4

dbl #1E90FF (DodgerBlue)

indeterminate

5

lbl #00CC00 (LightBlue)

cleared

5

grn #00CC00 (Green*)

normal

5

grn #00CC00 (Green*)

ok

5

grn #00CC00 (Green*)

informational

6

grn #00CC00 (Green*)

debug

7

prp #9D006D (Purple*)

trace

8

vlt #7554BF (Violet*)

unknown

9

slv #C0C0C0 (Silver)