Back to Geneos FAQ

How to display date and time on a dashboard

While we don’t have a widget within the Active Dashboard Palette to display date and time on a dashboard, it is possible to add date and time to a dashboard with some additional steps.

With the Compute Engine feature, you can add a blank headline cell with a label to an existing dataview, and add a rule to the headline cell to display date and time. You can then drag and drop the newly added headline cell to your Dashboard.

Follow these steps:

Add a headline cell to an existing dataview using Compute Engine Copied

  1. Select the sampler you want to add the headline cell to, then select the Advanced tab at the top of the sampler record.

Advanced tab

  1. Select Add new under the Dataviews.

  2. In the Name field, add the dataview name you wish to add the headline cell to.

  3. Click Additions on the right-hand side to open the Additions window to add the headline cell name as seen below:

Additions window

  1. Once done, close the window, and save the changes in the Gateway Setup Editor. You should now see a blank headline cell titled Timestamp in the CPU dataview.

Timestamp in CPU dataview

Add rule to newly added headline cell Copied

The following rule uses the now() function to get the current time at the point of the rule execution.

The time is expressed as seconds since UNIX epoch. The printDate() function is used to convert the timestamp grabbed from the now() function and format it based on the formatting codes set.

For a full list of available format codes, see Time Formatting Printing Codes.

This rule uses the %Z specifier to display the time zone abbreviation. As such, the rule will display the date and time based on the Gateway’s time zone.

Date and time of Gateway

The Timestamp headline cell is no longer blank and displays the date and time along with the time zone abbreviation:

Date and time with time zone abbreviation

If you would like to set a time zone for which to format the date and time from, the printDate() function has a third optional parameter that allows you to specify the time zone region. The following rule will display the time in Central Standard Time (CST).

Time in CST

Dataview of time in CST

For a full list of time zone abbreviations and their accompanying time zone region name, run the following command in the gateway’s local directory:

./gateway2.linux_64 -display-timezone-defaults

Create Dashboard Object Copied

Once the headline cell is ready, it can be dragged and dropped to the Active Dashboard. The Tools & Modifiers window will come up.

In this example, the Block 4 with Value object is selected, which has a built-in modifier that will display the value from the Timestamp headline cell.

Dashboard Object

["Geneos"] ["Geneos > Active Console"] ["FAQ"]

Was this topic helpful?