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  "cas_server": 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

SeverityCodeColour
security0 #0000FF Blue
critical1 #FF0000 Red
major2 #FFA500 Orange
minor3 #FFFF00 Yellow
warning4 #1E90FF DodgerBlue
indeterminate5 #ADD8E6 LightBlue
cleared5 #00CC00 Green
normal5 #00CC00 Green
ok5 #00CC00 Green
informational6 #00CC00 Green
debug7 #9D006D Purple
trace8 #7554BF Violet
unknown9 #C0C0C0 Silver

Note

The indeterminate color was incorrectly shown as green in previous versions of this documentation. It is #ADD8E6 (LightBlue) in the source code.