How to Monitor Health with Statuses
This How-To assumes you have completed the quick start and have an exhibit connected to Gumband Cloud
Monitoring Health with Statuses
Statuses are string values that can track any state of your exhibit, so exhibit health can be monitored remotely. The statuses available are unique per exhibit and must be configured through the manifest (learn more about the manifest in the Exhibit Manifest Configuration doc). For example:
export const MANIFEST = {
manifest: {
statuses: [
{
id: "screen-status",
type: "String",
display: "Screen is currently showing:",
order: 0
},
{
id: "last-game-played",
type: "String",
display: "Last game played:",
order: 1
}
],
controls: [],
settings: []
}
}
would configure statuses for the following exhibit instance in the Gumband UI:
There is no event listener for when a status changes, since statuses are one-way communications from the exhibit to the Gumband cloud. A status can be updated through the GumbandSDK.setStatus(statusID: string, newStatus: string)
function. For example, imagine you have a screen that can be in many states, and you’d like the state of the screen to be a status in the Gumband UI:
function showDigitalSignageScreen() {
//insert logic to switch screen to Digital Signage
this.gumbandSDK.setStatus('screen-status', 'Digital Signage');
}
function goIntoStandbyScreenMode() {
//insert logic to put screen in Stand By mode
this.gumbandSDK.setStatus('screen-status', 'Stand By');
}
Note that screen-status
matches the ID of the status defined in the manifest.