Web UI configuration reference

COMMERCIAL FEATURE: Access web UI configuration in the packaged Sensu Go distribution. For more information, see Get started with commercial features.

Web UI configuration allows you to define certain display options for the Sensu web UI, such as which web UI theme to use, the number of items to list on each page, and which URLs and linked images to expand. You can define a single custom web UI configuration to federate to all, some, or only one of your clusters.

NOTE: Each cluster should have only one web configuration.

Web UI configuration example

In this web UI configuration example:

  • Users will see a customized sign-in message
  • Details for the local cluster will not be displayed
  • Each page will list 50 items (except the checks page, which will list 100 items)
  • The web UI will use the classic theme
  • The entities page will list only entities with the proxy subscription, in ascending order based on last_seen value
  • The checks page will list checks alphabetically by name
  • Expanded links and images will be allowed for the listed URLs
type: GlobalConfig
api_version: web/v1
metadata:
  name: custom-web-ui
  created_by: admin
spec:
  signin_message: with your LDAP or system credentials
  always_show_local_cluster: false
  default_preferences:
    poll_interval: 120000
    page_size: 50
    theme: classic
  page_preferences:
    - page: entities
      page_size: 50
      order: LASTSEEN
      selector: proxy in entity.subscriptions
    - page: checks
      page_size: 100
      order: NAME
  link_policy:
    allow_list: true
    urls:
    - https://example.com
    - steamapp://34234234
    - //google.com
    - //*.google.com
    - //bob.local
    - https://grafana-host/render/metrics?width=500&height=250#sensu.io.graphic
{
  "type": "GlobalConfig",
  "api_version": "web/v1",
  "metadata": {
    "name": "custom-web-ui",
    "created_by": "admin"
  },
  "spec": {
    "signin_message": "with your LDAP or system credentials",
    "always_show_local_cluster": false,
    "default_preferences": {
      "poll_interval": 120000,
      "page_size": 50,
      "theme": "classic"
    },
    "page_preferences": [
      {
        "page": "entities",
        "page_size": 50,
        "order": "LASTSEEN",
        "selector": "proxy in entity.subscriptions"
      },
      {
        "page": "checks",
        "page_size": 100,
        "order": "NAME"
      }
    ],
    "link_policy": {
      "allow_list": true,
      "urls": [
        "https://example.com",
        "steamapp://34234234",
        "//google.com",
        "//*.google.com",
        "//bob.local",
        "https://grafana-host/render/metrics?width=500&height=250#sensu.io.graphic"
      ]
    }
  }
}

Web UI configuration specification

Top-level attributes

type
description Top-level attribute that specifies the resource type. For web UI configuration, the type should always be GlobalConfig.
required Required for web UI configuration in wrapped-json or yaml format.
type String
example
type: GlobalConfig
{
  "type": "GlobalConfig"
}
api_version
description Top-level attribute that specifies the Sensu API group and version. For web UI configuration in this version of Sensu, the api_version should always be web/v1.
required Required for web UI configuration in wrapped-json or yaml format.
type String
example
api_version: web/v1
{
  "api_version": "web/v1"
}
metadata
description Top-level scope that contains the web UI configuration’s name and created_by information.
required true
type Map of key-value pairs
example
metadata:
  name: custom-web-ui
  created_by: admin
{
  "metadata": {
    "name": "custom-web-ui",
    "created_by": "admin"
  }  
}
spec
description Top-level map that includes web UI configuration spec attributes.
required Required for web UI configuration in wrapped-json or yaml format.
type Map of key-value pairs
example
spec:
  signin_message: with your LDAP or system credentials
  always_show_local_cluster: false
  default_preferences:
    poll_interval: 120000
    page_size: 50
    theme: classic
  page_preferences:
    - page: entities
      page_size: 50
      order: LASTSEEN
      selector: proxy in entity.subscriptions
    - page: checks
      page_size: 100
      order: NAME
  link_policy:
    allow_list: true
    urls:
    - https://example.com
    - steamapp://34234234
    - "//google.com"
    - "//*.google.com"
    - "//bob.local"
    - https://grafana-host/render/metrics?width=500&height=250#sensu.io.graphic
{
  "spec": {
    "signin_message": "with your LDAP or system credentials",
    "always_show_local_cluster": false,
    "default_preferences": {
      "poll_interval": 120000,
      "page_size": 50,
      "theme": "classic"
    },
    "page_preferences": [
      {
        "page": "entities",
        "page_size": 50,
        "order": "LASTSEEN",
        "selector": "proxy in entity.subscriptions"
      },
      {
        "page": "checks",
        "page_size": 100,
        "order": "NAME"
      }
    ],
    "link_policy": {
      "allow_list": true,
      "urls": [
        "https://example.com",
        "steamapp://34234234",
        "//google.com",
        "//*.google.com",
        "//bob.local",
        "https://grafana-host/render/metrics?width=500&height=250#sensu.io.graphic"
      ]
    }
  }
}

Metadata attributes

name
description Name for the web UI configuration that is used internally by Sensu.
required true
type String
example
name: custom-web-ui
{
  "name": "custom-web-ui"
}
created_by
description Username of the Sensu user who created or last updated the web UI configuration. Sensu automatically populates the created_by field when the web UI configuration is created or updated. The admin user, cluster admins, and any user with access to the GlobalConfig resource can create and update web UI configurations.
required false
type String
example
created_by: admin
{
  "created_by": "admin"
}

Spec attributes

signin_message
description Custom message to display on the web UI sign-in modal.
required false
type String
default with your credentials
example
signin_message: with your LDAP or system credentials
{
  "signin_message": "with your LDAP or system credentials"
}

always_show_local_cluster
description Use only in federated environments. Set to true to display the cluster the user is currently connected to in the namespace switcher. To omit local cluster details, set to false.
required false
type Boolean
default false
example
always_show_local_cluster: false
{
  "always_show_local_cluster": false
}
default_preferences
description Global default preferences page size and theme preferences for all users.
required false
type Map of key-value pairs
example
default_preferences:
  poll_interval: 120000
  page_size: 50
  theme: classic
{
  "default_preferences": {
    "poll_interval": 120000,
    "page_size": 50,
    "theme": "classic"
  }
}
page_preferences
description Page-specific preferences for page size, order, and selector for all users. Any page preferences will override default preferences for the specified page.
required false
type Array
example
page_preferences:
  - page: entities
    page_size: 50
    order: LASTSEEN
    selector: proxy in entity.subscriptions
  - page: checks
    page_size: 100
    order: NAME
{
  "page_preferences": [
    {
      "page": "entities",
      "page_size": 50,
      "order": "LASTSEEN",
      "selector": "proxy in entity.subscriptions"
    },
    {
      "page": "checks",
      "page_size": 100,
      "order": "NAME"
    }
  ]
}
link_policy
description For labels or annotations that contain a URL, the policy for which domains are valid and invalid targets for conversion to a link or an image.
required false
type Map of key-value pairs
example
link_policy:
  allow_list: true
  urls:
  - https://example.com
  - steamapp://34234234
  - "//google.com"
  - "//*.google.com"
  - "//bob.local"
  - https://grafana-host/render/metrics?width=500&height=250#sensu.io.graphic
{
  "link_policy": {
    "allow_list": true,
    "urls": [
      "https://example.com",
      "steamapp://34234234",
      "//google.com",
      "//*.google.com",
      "//bob.local",
      "https://grafana-host/render/metrics?width=500&height=250#sensu.io.graphic"
    ]
  }
}

Default preferences attributes

poll_interval
description The frequency at which web UI pages will poll for new data from the Sensu backend, in milliseconds. Useful for increasing the polling interval duration if web UI sessions are causing heavy load. If you set the poll interval, all web UI views will use the poll interval value instead of their individual polling defaults.
required false
type Integer
example
poll_interval: 120000
{
  "poll_interval": 120000
}
page_size
description The number of items users will see on each page.
required false
type Integer
default 25
example
page_size: 25
{
  "page_size": 25
}
theme
description The theme users will see.

NOTE: If an individual user’s settings conflict with the web UI configuration settings, Sensu will use the individual user’s settings. For example, if a user’s system is set to dark mode and their web UI settings are configured to use their system settings, the user will see dark mode in Sensu’s web UI, even if you set the theme to classic in your web UI configuration.

required false
type String
default sensu
allowed values sensu, classic, uchiwa, tritanopia, deuteranopia
example
theme: classic
{
  "theme": "classic"
}

Page preferences attributes

page
description The page to which the page preference settings apply.
required true
type String
allowed values events, entities, silences, checks, event-filters, handlers, mutators
example
page: events
{
  "page": "events"
}
page_size
description The number of items to list for the specified page.
required false
type Integer
example
page_size: 100
{
  "page_size": 100
}
order
description The order in which to list items on the specified page. Read Page preferences order values to learn more.
required false
type String
example
order: LASTSEEN
{
  "order": "LASTSEEN"
}
selector
description The search expression to apply to the specified page.

NOTE: The selector page preference is not available for the events page.

required false
type String
example
selector: proxy in entity.subscriptions
{
  "selector": "proxy in entity.subscriptions"
}
allow_list
description If the list of URLs acts as an allow list, true. If the list of URLs acts as a deny list, false. As an allow list, only matching URLs will be expanded. As a deny list, matching URLs will not be expanded, but any other URLs will be expanded.
required false
type Boolean
default false
example
allow_list: true
{
  "allow_list": true
}
urls
description The list of URLs to use as an allow or deny list.

NOTE: For images from services that may not have an easily distinguishable file extension, append the anchor #sensu.io.graphic to the image URLs.

required false
type Array
example
urls:
- https://example.com
- steamapp://34234234
- "//google.com"
- "//*.google.com"
- "//bob.local"
- https://grafana-host/render/metrics?width=500&height=250#sensu.io.graphic
{
  "urls": [
    "https://example.com",
    "steamapp://34234234",
    "//google.com",
    "//*.google.com",
    "//bob.local",
    "https://grafana-host/render/metrics?width=500&height=250#sensu.io.graphic"
  ]
}

Page preferences order values

Available values for the order attribute in page preferences vary depending on the page.

Page Order value and description
events ENTITY: List events by the entities that created them, in ascending order by entity name

ENTITY_DESC: List events by the entities that created them, in descending order by entity name

LASTOK: List events by their last OK status, starting with the most recent

NEWEST: List events by their timestamps, starting with the most recent

OLDEST: List events by their timestamps, starting with the oldest

SEVERITY: List events by their status, starting with the most severe
entities ID: List entities by their IDs, in ascending order

ID_DESC: List entities by their IDs, in descending order

LASTSEEN: List entities by their last_seen timestamp, starting with the most recent
silences ID: List silences by their IDs, in ascending order

ID_DESC: List silences by their IDs, in descending order

BEGIN: List silences by the time they begin, starting with the silence that begins soonest

BEGIN_DESC: List silences by the time they begin, ending with the silence that begins first
checks NAME: List checks by name, in alphabetical order

NAME_DESC: List checks by name, in reverse alphabetical order
event-filters NAME: List event filters by name, in alphabetical order

NAME_DESC: List event filters by name, in reverse alphabetical order
handlers NAME: List handlers by name, in alphabetical order

NAME_DESC: List handlers by name, in reverse alphabetical order
mutators NAME: List mutators by name, in alphabetical order

NAME_DESC: List mutators by name, in reverse alphabetical order