The Status tile displays the rolled up health state of objects in the chosen scope, for example servers, disks, groups, or distributed applications (DAs). It also shows the health state summary, showing why an object is in a critical or warning state.
Tip: To add more context to the health states you're displaying, you can also show them on an image background. For example, you can use a map as a background and show your servers and their health on the map based on their location. You have two options for that: You can either use the Surface tile which even lets you display additional information to the health state (How to use the Surface tile) or, if you just need the health state, you can use the Image tile (see How to use the Image tile).
Tip: If you want to show the health state of objects by changing the color of part of an image use an SVG file with the Visio tile (see How to use the Visio tile). For example, you could use a building floorplan and turn each room into a shape in Visio. Then you can connect those shapes to a health indicator, maybe the room's wifi connectivity, and display the image on a dashboard where you can monitor if one of the rooms turns red.
Add a new tile to a dashboard or perspective and choose the Status tile.
Choose the visualization for your tile:
Shows the state of items as icons with different colors. You can display just the icons or together with a description. You can also use a background image and drag the icons into position on the image.
Example:
Shows the state of items as blocks with different colors.
Example:
Shows the results in a donut shape.
Example:
Shows the health of objects as a hierarchy, similar to SCOM Health Explorer.
Trees show a maximum of 50 objects from the scope. The first 50 objects returned are shown.
Example:
Shows the health of objects as a circular hierarchy, similar to the Status Tree visualization and SCOM Health Explorer.
Sun Bursts show a maximum of 50 objects from the scope. The first 50 objects returned are shown.
Example:
Shows the parent hierarchy for the current object, along with offline and maintenance mode.
Example:
Scope: The scope section allows you to define what is shown. Note:
Which status is displayed depends on what you choose as a scope:
If you want to see the status of individual objects (for example, two individual servers), select multiple objects in the list section.
If you want to see the status of a group itself rather than the individual objects within the group, select a group in the list section.
If you want to see the status of each individual group member of a group, select a group in the group section.
If you want to see the health state of all groups, select the class "group" in the advanced section.
Tip: If you experience any problems with scoping tiles, you'll find FAQs and help in the article How to scope tiles.
List
List allows you to select one or more objects or groups.
You can add multiple objects and groups. To remove an object or group click the x to the right of its name.
Tip: Start typing and after two characters you'll see suggestions that match the name appear.
By default searching will look for the top 10 items containing the words listed in the search. If you wish to create a more specific search you will need to use wildcards (*).
If you place a wildcard after the term you are looking for, it will find all the objects which start with that word searched and any terms that may follow. If you place a wildcard at the start of the search term, it will look for objects that contain the searched word and also have terms before that word.
If you enclose your searched term in wildcards it will look for objects which contain the searched word, this object will not begin or end with the term searched.
Group
Group allows you to select members of a specific group. Only one group can be selected.
Advanced
Advanced allows you to select a group, class or both. You must at least define either a group or class. You can define both. You can also use criteria to narrow down your selection.
Group:
Same as the group option above.
Class:
Class equates to the target class within SCOM. As you type the dropdown will be populated with suggestions of matching classes from SCOM, from which you can select the required class.
Criteria:
Criteria allows you to create an expression to further refine the scope.
Objects you would like to see
Criteria
Objects with particular text in their name
DisplayName like '%Server1%'
Objects starting with a particular string
DisplayName like 'test%'
All objects in maintenance mode
InMaintenanceMode = 'TRUE'
Only healthy objects
HealthState = 1
Objects with a health state in SCOM of 0, an unknown health state (uninitialized), a gray health state icon with a question mark.
HealthState = 0
Objects that are not healthy
HealthState != 1
Objects in critical state
HealthState = 3
Objects in critical or warning state
HealthState = 2 or HealthState = 3
To show all gray uninitialised objects
HealthState = 0 OR HealthState IS NULL
All objects not in maintenance mode
InMaintenanceMode != 'TRUE'
Objects where the parent agent is offline
IsAvailable='false'
Objects that are offline, in maintenance or state unknown
IsAvailable='false' OR InMaintenanceMode=1 OR HealthState=0
Computers with a particular OS
OSVersion = '6.3.9600'
List objects by name and filter by HealthState
(Name like '%Server3%' OR Name like '%Server4%' OR Name like '%Server2%') AND HealthState=3
List objects by SCOM Id and filter by HealthState
Id IN ('7021174b-9e5d-5fbf-878a-42b9f0bf6f4a', '9bd4a1cc-f07a-0e36-b37d-d9ee974e0f3c') AND HealthState=3
Exclude object from the Group specified
DisplayName not like '%server3%'
Exclude objects from the Group specified
(DisplayName NOT LIKE '%server3%') AND (DisplayName NOT LIKE '%server4%')
In the advanced section, use a class of either service (system.service) or user created distributed application
Only your Enterprise Applications (EAs)
In the advanced section, use a class of Enterprise Application (Base)
Note: If you never used a perspective, you should read Working with perspectives before scoping tiles on perspectives.
The power of perspectives is that tiles on a perspective can use a dynamic scope. A dynamic scope considers the currently viewed object. A dynamic scope consists of two different states:
the configuration of the scope in the tile (for example, "consider child objects of type logical disk for the currently viewed object")
the actual resolved scope that depends on which object you are currently viewing ("this object has 5 child objects of type logical disk")
After configuring the dynamic scope once in the tile, you'll get different results depending how the scope is resolved on the different objects you are viewing.
Suggestions
Suggestions are generated based on the object you are currently viewing. You'll see a list of relevant scope options based on the object's relations to other objects. Suggestions don't cover every possible scope, but they are a quick and easy way to select a suitable scope for your tile.
Note: Suggestions won't be shown if an object has no children, parents or siblings.
Tip: If the exact scope you want isn't listed in the suggestions, you can select a suggested scope that is similar to the one you want, and then click on custom. The custom section will now automatically be filled with the suggestion you picked and you can edit the scope here to adjust it exactly to your needs. This is a more intuitive way to pick a scope than starting in the custom section and navigating the SCOM object model for classes and groups.
Double-check the scope when using suggestions: Using suggestions is an easy way to pick a scope, but you need to make sure that the generated suggestion is appropriate for all objects that use the perspective. For example, when you pick a suggestion for an EA, you will get suggestions that are specific to the map, dependencies, and availability tests for this one EA. On perspectives you want to use for all EAs, you have to change the scope suggestion in the custom section so that the tile work for all EAs.
You can pick between "this object" and objects that are related to this object as parents, children or siblings. The suggestions for children are written as paths that follow the SCOM object tree structure, parents and siblings can be identified by the word parent or sibling in the suggestion.
A parent of an object is any object that hosts or contains that object. A child of an object is any object that this object hosts or contains. A sibling of an object is any object of the same class that is hosted by the same parent.
This object
The dynamic scope will be resolved to the object currently viewed.
This / child / child / class of object
The dynamic scope will be resolved to children of the object currently viewed.
You select objects of a particular class that are contained in path. The class of the objects you are selecting is stated at the end of the path.
This / *
The dynamic scope will be resolved to children of the object currently viewed.
If a path ends with a wildcard (*) it means that you select all objects of any class within the path.
Example: This / IIS Web Server / * selects all objects of any class in the level below This / IIS Web Server.
This / child / ... / class of object
The dynamic scope will be resolved to children of the object currently viewed.
If a path contains an ellipsis (...) it means that you select objects of a particular class that are contained in all of the objects that are contained in the path preceding the ellipsis. The class of the objects you are selecting is stated at the end of the path.
Example:
This / Sales App Map / ... / Windows Computer selects all objects of the class Windows Computer in the This / Sales App Map path.
Parent class of object
The dynamic scope will be resolved to parents of the object currently viewed.
Sibling class of object
The dynamic scope will be resolved to siblings of the object currently viewed.
Show more triangle next to a suggestion
You can click the show more triangle to expand the list of suggestions and see more specific paths.
Enterprise Applications are designed so that you can map out the servers that make up the application. You can then configure tiles to show information related to just the servers on the EA's map. When you create a perspective that will be used for all EAs, you need to make sure that you scope the tiles so that they work for any EA. When you start with a suggestion, the tile's scope only works for the one EA you're currently looking at, and this is why you need to edit the scope:
For an EA you want to scope to the servers that are specified on the EA map by selecting something from the suggestions (SquaredUp DS 4.2 and above) that shows something similar to the following: This /<YourApplicationName> Map / ... / Windows Computer The above will scope the tile to all the objects of class Windows Computer on this EAs map. The screenshot below shows some scope suggestions for an application called FinanceXS. The bold text shows the currently selected scope is This object. The cursor shows the option This / FinanceXS / ... / Windows Computer. Once chosen this scope will show all the Windows computers shown on the applications map. Next, we need to adjust the specified scope to allow it to work for all EAs, rather than just this one.
In the scope section click custom.
Click on the text <YourApplicationName> Map (children) which is your first scope step. This will expand the scope step so you can edit it.
Remove the auto-populated class <YourApplicationName> Map by clicking the cross x next to it.
Start typing Enterprise Application - Map and select this from the list to add this class. This is so that this tile scope will work for all EAs, rather than just this one EA.
The scope is now configured to show all the Windows computers on the EA's map, whichever EA you happen to be viewing with the perspective.
If you are looking at an EA, the path to find all windows computers in that EA may read Map / ... / Windows Computer. It returns all objects of the Windows Computer class contained within all of the paths under Map.
To narrow the scope down, you can click on the triangle to expand the suggestion and select one of the more specific paths. If you select Map / Web / Windows Computer you will find all objects of the Windows Computer class in the path Map / Web.
If you choose the option Map / * you'll find all objects contained in the map. If you extend this suggestion by clicking on the triangle, you'll see suggestions to select all objects in a more specific path, for example Map / Web / *.
Custom
Here you can pick objects that are related to the object you are currently looking at. If you want to create a specific scope that is not listed under suggestions, you can create the scope here.
Tip: You can pick a similar scope under suggestions first and then click on custom to edit it.
At the top, you'll see the name of the object you are currently looking at. Now you can choose if you want to pick parents or children of that object, and if this parent or child relation should be considered only one level up or down the SCOM model or through all levels.
Class: Here you pick the class of the objects you want to select. If you leave this field empty, the scope falls back to the "this object" scope. Note: You will only see groups and classes that the object you are currently looking at is a member of. Tip: If you want to pick objects of any class, enter the SCOM base class logical entity in the class field. Tip: If you want to find out what classes the object you are interested in belongs to, you can go to the Monitored Entity perspective of that object. You'll see all the classes the object belongs to listed there.
Criteria: You can narrow the selection of objects of a particular class down further by entering criteria for those objects. For more help see How to use criteria when scoping objects. Tip: If you want to find out what properties you can base your criteria on, you can go to the Monitored Entity perspective of the object you are interested in. You'll see all the properties for criteria listed there.
.
For example, for a perspective created for the group IIS8 Computer Group adding a Status tile scoped to show children with a class of object will show the group members, i.e. the members of the IIS8 Computer Group.
If you need to traverse a more advanced SCOM object model like an EA, you can use the + button to add more steps. This creates a scope that can go through any kind of path of the SCOM object model.
Complete the following steps and then click the + button after you're done to add the next level of SCOM objects:
At the top, you'll see the name of the object you are currently looking at. Now you can choose if you want to pick parents or children of that object, and if this parent or child relation should be considered only one level up or down the SCOM model or through all levels.
Class: Here you pick the class of the objects you want to select. If you leave this field empty, the scope falls back to the "this object" scope. Note: You will only see groups and classes that the object you are currently looking at is a member of. Tip: If you want to pick objects of any class, enter the SCOM base class logical entity in the class field. Tip: If you want to find out what classes the object you are interested in belongs to, you can go to the Monitored Entity perspective of that object. You'll see all the classes the object belongs to listed there.
Criteria: You can narrow the selection of objects of a particular class down further by entering criteria for those objects. For more help see How to use criteria when scoping objects. Tip: If you want to find out what properties you can base your criteria on, you can go to the Monitored Entity perspective of the object you are interested in. You'll see all the properties for criteria listed there.
.
Other specific objects
Gives you the normal, non-dynamic scope options you are used to when scoping tiles on dashboards. This means the tile will not dynamically adapt it's content to the currently viewed object, it will always show data for the static object picked here.
Since the power of perspectives is that their tiles can show data for different objects depending on what object is currently being viewed, you should only select this option when you are sure that there is no relationship between the desired scope and the currently viewed object.
Configure the settings for the visualization you chose:
Sort
Sort allows you to change the order of the results displayed. You can also group them by their characteristics.
default
By default, the sorting of objects depends on the data source. This can be alphabetical sorting or the order in which data comes back from an API request.
sort by
Sort by label, health state, or health state + availability where objects are sorted by availability (offline or maintenance mode) as well as health state. Ascending or descending
group by
Group by label, health state, or health state + availability where objects are Grouped by availability (offline or maintenance mode) as well as health state, for example Error (Available) and Error (Unavailable). Ascending or descending
Limit:
Allows you to define a maximum number of objects that will be shown. When 'group by' is used the limit applies to each group individually, for example to show 10 objects in each health state.
Label
Allows you to change the label of the results.
name
Choose this option if you want to use the default label that has been created automatically.
path / name
Use the object's name and path
name (path)
Use the object's name and path
custom
Here you can change the label to a custom label. You can use static text and dynamic properties. Use the mustache picker to select dynamic properties from the response data to use them as labels.
At the heart of SCOM monitoring is its object model and the health state monitoring of those objects; if a disk is low on space, the disk is marked as critical and this rolls up to the server, which is also marked as critical.
What is a health state summary?
In SquaredUp DS health state summaries are shown for unhealthy (yellow or red) objects. Health state summaries show why an object is yellow or red and show you a summary in-line with the status icon itself. This means that, at a glance, you can see the cause of the critical health state and spot common issues across multiple objects.
If you find several servers are showing red, then the health state summaries can help answer some of your questions:
Why is it red?
Is it the same reason that the others are red?
Is it related to the application issue I'm seeing?
Which red server is the priority?
Do I have to click on each server to see what the problem is?
Where are Health state summaries available?
Health state summaries are shown wherever an objects health state is shown, for example the Matrix tile, VADA in view and analyze mode, the Alerts tile, and in the Status tile.
Health state summaries are not available for container objects such as groups and distributed applications (DAs), however they work excellently for objects that host things (not contain things) such as servers, devices, software, and their sub-components.
In some cases, you might find that a critical server does not have a health state summary.
How do health state summaries work?
Health state summaries work by performing a lookup for monitor alerts (alerts that are affecting the health state) for each object.
For any object that is not healthy, SquaredUp DSshows the alert that is:
Created by a monitor (not a rule – they don’t affect health)
Most severe (if it’s critical, it will look for a critical alert)
Most recent
What if no health state summary is shown?
last state change
Displays how long the item has been in that state.
custom
Here you can change the label to a custom label. You can use static text and dynamic properties. Use the mustache picker to select dynamic properties from the response data to use them as labels.
This setting is not done in a panel, you can change the display style even after you finished configuring the tile.
You can use toggle zoom button at the top right of the tile to change between the different ways Status icons can be displayed.
One long list
Column list
Icons only
Label
Allows you to change the label of the results.
name
Choose this option if you want to use the default label that has been created automatically.
path / name
Use the object's name and path
name (path)
Use the object's name and path
custom
Here you can change the label to a custom label. You can use static text and dynamic properties. Use the mustache picker to select dynamic properties from the response data to use them as labels.
At the heart of SCOM monitoring is its object model and the health state monitoring of those objects; if a disk is low on space, the disk is marked as critical and this rolls up to the server, which is also marked as critical.
What is a health state summary?
In SquaredUp DS health state summaries are shown for unhealthy (yellow or red) objects. Health state summaries show why an object is yellow or red and show you a summary in-line with the status icon itself. This means that, at a glance, you can see the cause of the critical health state and spot common issues across multiple objects.
If you find several servers are showing red, then the health state summaries can help answer some of your questions:
Why is it red?
Is it the same reason that the others are red?
Is it related to the application issue I'm seeing?
Which red server is the priority?
Do I have to click on each server to see what the problem is?
Where are Health state summaries available?
Health state summaries are shown wherever an objects health state is shown, for example the Matrix tile, VADA in view and analyze mode, the Alerts tile, and in the Status tile.
Health state summaries are not available for container objects such as groups and distributed applications (DAs), however they work excellently for objects that host things (not contain things) such as servers, devices, software, and their sub-components.
In some cases, you might find that a critical server does not have a health state summary.
How do health state summaries work?
Health state summaries work by performing a lookup for monitor alerts (alerts that are affecting the health state) for each object.
For any object that is not healthy, SquaredUp DSshows the alert that is:
Created by a monitor (not a rule – they don’t affect health)
Most severe (if it’s critical, it will look for a critical alert)
Most recent
What if no health state summary is shown?
last state change
Displays how long the item has been in that state.
custom
Here you can change the label to a custom label. You can use static text and dynamic properties. Use the mustache picker to select dynamic properties from the response data to use them as labels.
Sort allows you to change the order of the results displayed. You can also group them by their characteristics.
default
By default, the sorting of objects depends on the data source. This can be alphabetical sorting or the order in which data comes back from an API request.
sort by
Sort by label, health state, or health state + availability where objects are sorted by availability (offline or maintenance mode) as well as health state. Ascending or descending
group by
Group by label, health state, or health state + availability where objects are Grouped by availability (offline or maintenance mode) as well as health state, for example Error (Available) and Error (Unavailable). Ascending or descending
Limit:
Allows you to define a maximum number of objects that will be shown. When 'group by' is used the limit applies to each group individually, for example to show 10 objects in each health state.
Blocks
Here you can set the number of columns for the blocks, their height and the font size within the blocks.
Sort
Sort allows you to change the order of the results displayed. You can sort by value (ascending or descending) or health state (ascending from healthy to critical or descending from critical to healthy)
Display
Size mode:
Default
Displays the donut scaled to the height of the tile.
Fill
Enlarges the donut to use the whole width of the tile. If you chose the fill option and show the legend, you can define the size of the legend with a slider.
Show legend:
Allows you to show or hide the legend of the graph.
Display mode:
Allows you to switch between displaying absolute values or percentages.
Sort
Sort allows you to change the order of the results displayed. You can sort by label (ascending or descending) or health state (ascending from healthy to critical or descending from critical to healthy).
Limit:
Allows you to define a maximum number of objects that will be shown. When 'group by' is used the limit applies to each group individually, for example to show 10 objects in each health state.
Label
Allows you to change the label of the results.
name
Choose this option if you want to use the default label that has been created automatically.
path / name
Use the object's name and path
name (path)
Use the object's name and path
custom
Here you can change the label to a custom label. You can use static text and dynamic properties. Use the mustache picker to select dynamic properties from the response data to use them as labels.
Displays how long the item has been in that state.
custom
Here you can change the label to a custom label. You can use static text and dynamic properties. Use the mustache picker to select dynamic properties from the response data to use them as labels.
The power symbol signifies an object that SCOM has been monitored, but at present the agent is unresponsive. Typically this is because the device is powered off or the agent is broken. The last known health state is shown as a faded color behind the power button. This can often be resolved by restarting the Microsoft Monitoring Agent service on the server itself, or restarting the System Center Data Access service on the SCOM server. To show only objects that are currently offline/unmonitored you can specify IsAvailable = 0 in the Scope > Advanced > Criteria (see How to use criteria when scoping objects)
Unknown/Uninitialized
The gray icon with a question mark signifies an object that has never had a health state, for example a device that has been badly or incompletely discovered. SCOM is aware of the object, but has never recorded any data from it. This covers both objects where SCOM records a health state of 0 (no health state) and those where SCOM has no record for the health state, i.e. the health state is blank or unspecified (NULL).
To show only objects where SCOM specifies a health state of 0 use HealthState = 0
To show objects where there SCOM has no current or last known health state specified use HealthState IS NULL
To show all gray objects, both those with unknown health state and those with no known last health state specify HealthState = 0 OR HealthState IS NULL
At the heart of SCOM monitoring is its object model and the health state monitoring of those objects; if a disk is low on space, the disk is marked as critical and this rolls up to the server, which is also marked as critical.
What is a health state summary?
In SquaredUp DS health state summaries are shown for unhealthy (yellow or red) objects. Health state summaries show why an object is yellow or red and show you a summary in-line with the status icon itself. This means that, at a glance, you can see the cause of the critical health state and spot common issues across multiple objects.
If you find several servers are showing red, then the health state summaries can help answer some of your questions:
Why is it red?
Is it the same reason that the others are red?
Is it related to the application issue I'm seeing?
Which red server is the priority?
Do I have to click on each server to see what the problem is?
Where are Health state summaries available?
Health state summaries are shown wherever an objects health state is shown, for example the Matrix tile, VADA in view and analyze mode, the Alerts tile, and in the Status tile.
Health state summaries are not available for container objects such as groups and distributed applications (DAs), however they work excellently for objects that host things (not contain things) such as servers, devices, software, and their sub-components.
In some cases, you might find that a critical server does not have a health state summary.
How do health state summaries work?
Health state summaries work by performing a lookup for monitor alerts (alerts that are affecting the health state) for each object.
For any object that is not healthy, SquaredUp DSshows the alert that is:
Created by a monitor (not a rule – they don’t affect health)
Most severe (if it’s critical, it will look for a critical alert)
Most recent
What if no health state summary is shown?
Some monitors do not create an alert
Perhaps the system has closed the alert and it has been groomed out of the Operations Manager database due to a retention setting. In SCOM, under Administration > Settings > Alerts the Automatic Alert Resolution tab shows you how many days after the last modified time (repeat count) from which all active alerts will be resolved, and how many days after the object is healthy that the alert will be resolved.
Maybe a user closed the alert? The walkthrough below shows how you can show 'recently closed alerts to help troubleshoot this.
The Status tile can be used on a dashboard or a perspective. This walkthrough shows you how to add a Status Blocks tile to a dashboard.
In SquaredUp DS navigate to where you'd like the dashboard to be created. Hover over the + button and click dashboard.
Give the dashboard a title, by replacing the text that says New Dashboard. The dashboard is saved as you go along so there's no need to save your changes. You can find your dashboard by clicking on the right-hand menu ☰ > system > unpublished.
A new tile has already been added to the dashboard. Edit the title by overwriting the placeholder value New tile with your own title.
The tile selector will already be open. Click Status.
Click on the Blocks button to create a Status Blocks tile.
Next we need to scope the tile. In the scope section select group then type the name of a group, such as All Windows Computers or IIS Computer Group and then click on group from the results. Correctly scoping the tile is probably the most important part, so to find out more see How to scope tiles. For more about advanced options, such as how to only show objects that are not healthy take a look at How to use criteria when scoping objects. Block tiles for the servers should appear after a moment. You could stop here, but we'll continue to configure the tile.
In the sort section click sort by, then health state, then descending. This will show the critical servers first.
The blocks section allows you to change the size and layout of the blocks, by changing the number of columns, the block height and the font size. This can be useful when creating a dashboard for a wall monitor.
In the label section we're going to use the custom option, to create a custom label (How to use Custom Labels) which is particularly useful to get the label to fit within the block when using a large font size. Click on custom, then click on the mustache {} helper button on the right to show the custom label dropdown list: The dropdown list shows all the options available along with an example value. In this walkthrough we are going to select properties.netbiosComputerName. This will then appear in the label template box as {{properties.netbiosComputerName}}
In the sublabel section you may like to leave it on the default of 'health state summary' which is particularly useful for servers. However the health state summary is not available for distributed applications, so you may like to change this to last state change which will show how long the object has been in that health state. Hovering over the time will show the exact date and time.
You can use toggle zoom button at the top right of the tile to change between the different ways Status icons can be displayed.
One long list
Column list
Icons only
You can use timeago to convert Unix timestamps from milliseconds to show a readable date and time. You can either display an absolute time (for example, August 20th 2021) or a relative time (for example, 20 hours ago).
There are four parameters you can use for converting the time, written in the following format: timeago(Value you want to convert, Show Absolute, Show Time, Without Suffix, With Prefix).
The parameters for the value you want to convert can either be true or false:
Show Absolute
true = show absolute time (date) rather than relative time
false = show relative time
Show Time
true = if showing absolute time, show the time as well as the date
false = do not show the time with the date
Without Suffix
true = if showing relative time, this removes the "ago"
false = "ago" at the end will be shown (e.g. 10 hours ago)
With Prefix
true = adds "since" ahead of the absolute time, or "for" ahead of the relative time
false = no prefix will be shown
Tip: The default setting for all parameters is false. If you only want to change the first parameters, you can just use timeago(value, true, true) and it will be interpreted as timeago(value, true, true, false, false).
Examples:
To display the relative time (how long ago something occurred):
{{timeago(value)}}
To display the absolute time as the date without the time:
{{timeago(value, true)}}
To display the absolute time as the date with the time:
{{timeago(value, true, true)}}
To display the time with the prefix "for" for relative time and "since" for absolute time (for example, "the status has been unhealthy for 10 hours")
Option A) Use the fourth parameter and set it to true. This will insert the appropriate prefix for the absolute or relative time:
timeago(value, false, false, true, true)
Option B) You can leave out the fourth parameter that controls if the prefix "for" or "since" is inserted automatically. Since you left it out, it defaults to false, causing no prefix to be shown. Instead you insert the word "for" or "since" manually before the timeago function.
for timeago(value, false, false, true)
To convert a time value from seconds to milliseconds:
Some APIs, like Pingdom for example, return the value in seconds. Since Timeago uses the time value in milliseconds, you need to multiply by 1000 in that case:
{{timeago(value*1000)}}
Example with a Pingdom property:
{{timeago(properties.lasttesttime*1000)}}
This is a collection of useful examples for custom labels when showing the state of objects. You can paste the examples in the custom label section in SquaredUp.
Check out our GitHub Samples repository for more examples and ideas for custom labels from the community.
How to insert a line break (<br>) between the computer name and the last state change
In this example, you use the netbios computer name as a label (this shows the computer name without the domain). Below the computer name, in a new line, the last state change is displayed:
How to convert the health states "success, warning, critical" to "healthy, warning, critical"
In this example, you use the netbios computer name as a label (this shows the computer name without the domain), followed by the health state. The health state "success" is converted to "healthy" to make is easier to understand:
In this example, you display when the last state change took place (relative time) and display the health state summary in a new line below:
for {{timeago(stateLastModified, false, false, true)}}<br>{{model.alerts.0.name}}
The following example is very similar, you also display the health state summary below the time, but in this example you show the absolute time (specific date and time) of the last state change:
since {{timeago(stateLastModified, true, true)}}<br>{{model.alerts.0.name}}