Changing timestamps

If necessary, you can change the timestamp format that is recorded for requests in the events sent to the Event Bus, by using the Discover Portal.

About this task

By default, time values in the request are written into the [timestamp] section of the request in a familiar format. For example:


[timestamp]
RequestTimeEx=2011-06-28T04:20:35.074529Z
RequestEndTimeEx=2011-06-28T04:20:35.074529Z

If needed, you can change the timestamp format that is recorded for requests in the events sent to the Event Bus to use UNIX ticks.

Note: This timestamp format change applies only to HTTP output for CEP.
Note: The change applies only to the RequestTimeEx timestamp in the hit request, if it is included in the [HTTPFields] section in the CustomFields.cfg file.

Complete the following steps to enable this configuration change.

  • The [CEP] section of the request has a DateTime name-value pair that is in seconds since 1970 format at a resolution of one second. This event timing entry is not affected by this configuration change.
Note: This change must be applied to each Canister sending events to the Event Bus.

Procedure

  1. Log in to the Portal.
  2. From the Portal menu, select Discover > Manage Services.
  3. Click the WorldView tab.
  4. From the View drop-down, select Servers.
  5. For each server that hosts a Canister:
    1. Select the server.
    2. Click the Canister node.
    3. Click Event Bus configuration.
    4. Click View/Edit Raw.
    5. Search the configuration for "[CEP]". This section contains the raw version of the configuration for the Event Bus on the selected Canister.
    6. Search the [CEP] section for HTTP_PageTimeFormat.
    7. If the entry does not exist, add the following:
      
      HTTP_PageTimeFormat=unix
      
      • If the entry is not present, the default Discover time formatting is applied. To switch back to the default, either delete or comment out the line. Or, you can change the unix value to Discover.
    8. Click Save.
    9. Add the job to a task. Do not submit.
  6. Repeat the above steps to the other Canisters hosting the Event Bus.
  7. Submit the task to make the change at the same time for all Event Bus instances.
  8. If you did not do so already, insert the RequestTimeEx field in the [HTTPFields] section in the CustomFields.cfg file.