Web UI configuration reference
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 receive a customized sign-in message that is formatted with Markdown
- 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
- The web UI will begin to display the license expiration banner 45 days before the organization license expires
- Expanded links and images will be allowed for the listed URLs
- YAML will be the default format for resource definitions in the web UI
---
type: GlobalConfig
api_version: web/v1
metadata:
name: custom-web-ui
spec:
signin_message: with your *LDAP or system credentials*
always_show_local_cluster: false
default_preferences:
poll_interval: 120000
page_size: 50
serialization_format: YAML
theme: classic
page_preferences:
- page: entities
page_size: 50
order: LASTSEEN
selector: proxy in entity.subscriptions
- page: checks
page_size: 100
order: NAME
license_expiry_reminder: 1080h0m0s
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"
},
"spec": {
"signin_message": "with your *LDAP or system credentials*",
"always_show_local_cluster": false,
"default_preferences": {
"poll_interval": 120000,
"page_size": 50,
"serialization_format": "YAML",
"theme": "classic"
},
"page_preferences": [
{
"page": "entities",
"page_size": 50,
"order": "LASTSEEN",
"selector": "proxy in entity.subscriptions"
},
{
"page": "checks",
"page_size": 100,
"order": "NAME"
}
],
"license_expiry_reminder": "1080h0m0s",
"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"
]
}
}
}
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 |
Web UI configuration specification
Top-level attributes
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"
}
|
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
serialization_format: YAML
theme: classic
page_preferences:
- page: entities
page_size: 50
order: LASTSEEN
selector: proxy in entity.subscriptions
- page: checks
page_size: 100
order: NAME
license_expiry_reminder: 1080h0m0s
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,
"serialization_format": "YAML",
"theme": "classic"
},
"page_preferences": [
{
"page": "entities",
"page_size": 50,
"order": "LASTSEEN",
"selector": "proxy in entity.subscriptions"
},
{
"page": "checks",
"page_size": 100,
"order": "NAME"
}
],
"license_expiry_reminder": "1080h0m0s",
"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 |
|
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"
}
|
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"
}
|
name |
|
description |
Name for the web UI configuration that is used internally by Sensu. |
required |
true |
type |
String |
example |
{
"name": "custom-web-ui"
}
|
Spec attributes
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"
}
}
|
license_expiry_reminder |
|
description |
Number of days before license expiration to begin displaying the license expiration banner in the web UI. The value must be a valid duration, such as 1080h , 14400m , or 24h59m59s .
NOTE: By default, the web UI displays the banner starting 30 days before license expiration.
|
required |
false |
type |
String |
example |
license_expiry_reminder: 1080h0m0s
{
"license_expiry_reminder": "1080h0m0s"
}
|
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"
]
}
}
|
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"
}
]
}
|
signin_message |
|
description |
Custom message to display on the web UI sign-in modal. Accepts Markdown formatting. |
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*"
}
|
Default preferences attributes
page_size |
|
description |
The number of items to list on each page. |
required |
false |
type |
Integer |
default |
25 |
example |
|
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.
NOTE: If an individual user’s settings conflict with the web UI configuration settings, Sensu will use the individual user’s settings.
|
type |
Integer |
default |
10000 when page is visible. 300000 when page is not visible. |
example |
{
"poll_interval": 120000
}
|
serialization_format |
|
description |
Default format for resource definitions in the web UI. |
required |
false |
type |
String |
default |
YAML |
allowed values |
JSON , YAML |
example |
serialization_format: YAML
{
"serialization_format": "YAML"
}
|
theme |
|
description |
The theme used in the web UI.
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 web UI will use dark mode for that user, 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 |
|
Page preferences attributes
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 |
|
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_size |
|
description |
The number of items to list for the specified page. |
required |
false |
type |
Integer |
example |
|
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"
}
|
Link policy attributes
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 |
|
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"
]
}
|