Skip to main content
Interania

How to change the query time zone with the CLI

0votes
16updates
70views

The CLI commands to change the query time zone currently break the precacher: HIG-12285. This bug is fixed in Release 2.25.

You can use the Interana CLI to update the query time zone to account for daylight savings time. This process includes the following tasks:

The default query time zone is Pacific Standard Time (PST), but this can be configured to any time zone.

For those areas that observe Daylight Saving Time, you must change the cluster time zone settings twice a year. Once at the beginning of Daylight Saving Time in the spring (when clocks are set forward one hour), and then again in the fall at the return to Standard Time (when clocks are set back one hour).

The following parameters are used with the ia settings command. For more information on the CLI, see the Interana CLI Reference.

Parameter Description 
resultTimezone.label The 3-letter code for the time zone. This is displayed in the Interana interface.
resultTimezone.offset

The time, in minutes, offset from the UTC time zone.

Note: the offset is positive if the query time zone is behind UTC and negative if it is ahead.  The offset should match the value returned by the JavaScript function, Date.prototype.getTimezoneOffset(), in the desired query time zone.

resultTimezone.string

The number of hours offset from the UTC time zone. Specified as 4 digits, and either + or -. This is displayed in the Interana interface.

For example, '"-0800"' to specify 8 hours earlier than UTC.

Change the cluster time zone settings

You change the time zone settings from the config node of the Interana cluster using the CLI. This section demonstrates how to change the following time zone settings:

  • Pacific Daylight Time (PDT) 
  • Pacific Standard Time (PST) 
  • Eastern Standard Time (EST)

A complete list of time zones and offsets can be found here.

The time zone offset value is in minutes.

To change the time zone settings to PDT, do the following:
  1. Log in to the config node of the Interana cluster.
  2. Enter the following commands.
ia settings update webapp resultTimezone.label PDT
ia settings update webapp resultTimezone.offset 420
ia settings update webapp resultTimezone.string -0700
To change the time zone settings to PST, do the following:
  1. Log in to the config node of the Interana cluster.
  2. Enter the following commands.
ia settings update webapp resultTimezone.label PST
ia settings update webapp resultTimezone.offset 480
ia settings update webapp resultTimezone.string -0800
To change the time zone settings to EST, do the following:
  1. Log in to the config node of the Interana cluster.
  2. Enter the following commands.
ia settings update webapp resultTimezone.label EST
ia settings update webapp resultTimezone.offset 300
ia settings update webapp resultTimezone.string -0500

Apply the time zone setting changes 

After you've successfully updated the time zone settings, you need to restart the query API server to apply the changes.

To apply the time zone changes, do the following:
  1. Log in to the config node of the Interana cluster.
  2. Enter the following command to stop the Interana query API server.
iactl stop query-api-server
  1. Enter the following command to restart the Interana query API server.
iactl start query-api-server
  • Was this article helpful?