Add Clock to Ops Dashboard

Is there a way to add a clock or several clocks (multiple time zones) to a kibana dashboard for display in an operations center?

There is no built-in way to do so, but you can use a "Vega" visualization to build such a visualization yourself. See this similar question: Obtaining `now` on a kibana visualization

Here is a basic example of a clock. Would just need to add your timezones and do some styling.

Change the throttle number if you want it to update less often. Set at 1 second right now.

{
  "$schema": "https://vega.github.io/schema/vega/v5.json",
  "title": "Clock Example",
  "signals": [
    {
      "name": "time",
      "init": "month(now()) + '/' + date(now()) + '/' + year(now()) + ' ' + hours(now()) + ':' + minutes(now()) + ':' + seconds(now())",
      "on": [{"events": {"type": "timer", "throttle": 1000}, "update": "month(now()) + '/' + date(now()) + '/' + year(now()) + ' ' + hours(now()) + ':' + minutes(now()) + ':' + seconds(now())"}]
    }
  ],
  "marks": [
    {
      "type": "text",
      "encode": {
        "update": {
          "text": {"signal": "time"},
          "opacity": {"value": 1},
          "x": {"value": 10},
          "y": {"value": 10},
          "fontSize": {"value": "30"}
        }
      }
    }
  ]
}

Output

image

2 Likes

I would prefer this example :slight_smile:

2 Likes

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.