We support several options for timestamps, time zones, time ranges, and dates.
The timestamp is the part of a log message that marks the time that an event occurred. During ingestion, we can detect the message timestamp, convert it to Unix epoch time (the number of milliseconds since midnight, January 1, 1970 UTC), and index it. The timestamp is parsed either using the default timestamp parsing settings, or a custom format that you specify, including the time zone.
When configuring a Source you can choose to use the default timestamp parsing settings, or you can specify a custom format for us to parse timestamps in your log messages. The Enable Timestamp Parsing option is selected by default. If it's deselected, no timestamp information is parsed at all. Instead, we stamp logs with the time at which the messages are processed.
By default, we can automatically detect timestamps in your log messages. Automatic detection identifies timestamps in common formats and prefers timestamps that appear early in the message.
If your log messages contain multiple timestamps, timestamps in unusual formats, or a mix of distinct timestamp formats, you have two options:
- Configure a source for each log format
- Configure custom timestamp parsing for your Source
Automated Timestamp Parsing
Sumo can automatically parse any of the following timestamp formats. If more than one valid timestamp is detected in a log message, Sumo will generally select the timestamp that appears "furthest left" in the message.
|dd/MMM/yyyy:HH:mm:ss ZZZZ||19/Apr/2010:06:36:15 -0700|
|dd/MMM/yyyy HH:mm:ss||09/Mar/2004 22:02:40 08691|
|MMM dd, yyyy hh:mm:ss a||Dec 2, 2010 2:39:58 AM|
|MMM dd yyyy HH:mm:ss||Jun 09 2011 15:28:14|
|MMM dd HH:mm:ss yyyy||Apr 20 00:00:35 2010|
|MMM dd HH:mm:ss ZZZZ yyyy||Feb 07 15:22:31 -0700 2016|
|MMM dd HH:mm:ss ZZZZ||Sep 28 19:00:00 +0000|
|MMM dd HH:mm:ss||Mar 16 08:12:04|
|yyyy MMM dd HH:mm:ss.SSS zzz||2017 Jun 19 13:16:49.194 EST|
|yyyy-MM-dd HH:mm:ss,SSS ZZZZ||2011-02-11 16:47:35,985 +0000|
|yyyy-MM-dd HH:mm:ss ZZZZ||2011-08-19 12:17:55 -0400|
|yyyy-MM-dd HH:mm:ssZZZZ||2011-08-19 12:17:55-0400|
|yyyy-MM-dd HH:mm:ss zzz||2016-09-06 10:51:18 PDT|
|yyyy-MM-dd HH:mm:ss,SSS||2010-06-26 02:31:29,573|
|yyyy-MM-dd HH:mm:ss||2010-04-19 12:00:17|
|yyyy-MM-dd HH:mm:ss:SSS||2010-04-19 12:00:17:552|
|yyyy/MM/dd HH:mm:ss||2006/01/22 04:11:05|
|yy-MM-dd HH:mm:ss,SSS ZZZZ||11-02-11 16:47:35,985 +0000|
|yy-MM-dd HH:mm:ss,SSS||10-06-26 02:31:29,573|
|yy-MM-dd HH:mm:ss||10-04-19 12:00:17|
|yy/MM/dd HH:mm:ss||06/01/22 04:11:05|
|yyMMdd HH:mm:ss||150423 11:42:35|
|yyyyMMdd HH:mm:ss.SSS||20150423 11:42:35.173|
|dd/MMM HH:mm:ss,SSS||23/Apr 11:42:35,173|
|dd/MMM/yyyy HH:mm:ss||23/Apr/2015 11:42:35|
|dd-MMM-yyyy HH:mm:ss||23-Apr-2015 11:42:35|
|dd-MMM-yyyy HH:mm:ss.SSS||23-Apr-2015 11:42:35.883|
|dd MMM yyyy HH:mm:ss||23 Apr 2015 11:42:35|
|dd MMM yyyy HH:mm:ss.SSS||23 Apr 2015 11:42:35.883|
|MM/dd/yy HH:mm:ss||04/23/15 11:42:35|
|MM/dd/yyyy HH:mm:ss||04/23/2015 11:42:35|
|MM/dd/yyyy HH:mm:ss.SSS||04/23/2015 11:42:35.883|
|MM/dd/yyyy hh:mm:ss a:SSS||8/5/2011 3:31:18 AM:234|
|MM/dd/yyyy hh:mm:ss a||9/28/2011 2:23:15 PM|
Unix epoch timestamps
Unix epoch timestamps are supported in the following formats:
- 10 digit epoch time format surrounded by brackets (or followed by a comma). The digits must be at the very start of the message. For example,  or [1234567890, other] followed by the rest of the message.
- 13 digit epoch time. The 13 digits must be at the very start of the message. For example, 1234567890123... followed by the rest of the message.
- 16 digit epoch time. The 16 digits must be at the very start of the message. For example, 1234567890123... followed by the rest of the message.
- 19-digit epoch time. The 16 digits must be at the very start of the message. For example, 1496756806.655123456…. followed by the rest of the message.
- We also recognize the time format for the Akamai log delivery service. The format is 13 digits with a period before the last three (ms) digits: 1234567890.123
- Comma separated values where the 5th value from the start of the message is a 10 digit epoch time. For example, field1, field2, field3, field4, 1234567890
- JSON formatted property called "timestamp" followed by a 13 digit epoch time. For example, "timestamp":"123456789013".
- Format of Cisco Fortigate/Meraki log message:
<134>1 1439277406.903768018 Store_020026 flows src=<redact> dst=220.127.116.11 protocol=udp sport=62118 dport=53 pattern: 1 all
- Format of Linux audit message:
type=PATH msg=audit(1439992022.365:83931889): item=0 name="/usr/sbin/ss" inode=91193416 dev=08:02 mode=0100755 ouid=0 ogid=0 rdev=00:00
Specifying a custom timestamp format
Sumo automatically parses most timestamps without any issues, but if you're seeing timestamp parsing issues you can manually specify the parse format. The steps are the same if you're configuring a new Source or if you're editing the timestamp information for an existing Source.
When you specify a custom format, you provide us with the timestamp format and optionally a regex to help locate the desired timestamp in your log line format. If you don't provide a locator, we’ll scan the entire log message for a timestamp matching the given format by default. You can also test some sample log lines and see if we can parse the new format.
To manually specify a timestamp format for a Source:
- Do one of the following:
- If you're configuring a new Source, continue to step 2.
- To edit the timestamp settings for an existing Source, click Manage Data > Collection > Collection (Manage > Collection in the classic UI). Then click Edit to the right of the Source name and go to step 2.
- Click Advanced (if the advanced settings are not already displaying.)
- For Timestamp Format, select Specify a format.
Do not click Test yet. If you have more than one custom timestamp format, you'll want to test them together.
- In the Format text box, type the timestamp format that Sumo Logic should use to parse timestamps in your log.
- In the Timestamp locator field, if you are using 16-digit epoch or 19-digit epoch timestamps you must specify them explicitly for the format recognized.
- Optional. You can enter an RE2-compliant regular expression in the Timestamp locator field to help us locate the timestamp in your log line. For example:
\[time=(.*)\]If you give a locator regular expression make sure it contains one unnamed capture group. When we extract timestamps, we only scan the portion of each log message that is captured by this group. If a log message does not match the provided locator expression, then your timestamp format cannot be applied to that message.
- If you have more than one custom timestamp format that you want to add, click Add.
- Click Test once you've entered all of your custom timestamp formats. If you’ve entered a valid regex in the timestamp locator, you’ll see the Test Timestamp Parsing page. Enter sample log messages to test your timestamp formats you want Sumo to extract.
- Click Test. The results display with the timestamp parsed and format matches (if any).
You should see one of the following messages:
- Format matched. In this example, the format of yyyy/MM/dd HH:mm:ss was matched and highlighted in green. This was the second format provided so it returns as 2( yyyy/MM/dd HH:mm:ss locator: \[time=(.*)\]) The Effective message time would be 2017-01-15 02:12.000 +0000.
- None of the custom timestamp format was matched. While the custom formats were not found in the log, there's still an auto detected timestamp highlighted in orange, 2017-06-01 02:12:12.259667 that we can use. The Effective message time is going to be 2017-06-01 02:12:12.259 +0000
- Unable to parse any timestamp. No part of the sample log line "This line shouldn't parse" has a parseable timestamp and so the timestamp will be the current time.
- Optional. If you want to make changes to your log line, click Edit and you can provide other log lines to test.
- Click Done to exit Test Timestamp Parsing.
- Click Save to save your custom timestamp formats.
Using _format for troubleshooting
You can use _format to see how the timestamp is parsed from the log file.
The fields in the result of _format are:
where t can take the values:
cache: success, cached format
def: success, default (user-specified) format
full: success, from "full" parsing against library of patterns
none: local/receipt time because timestamp parsing is not enabled for this source
ac1: auto corrected by the "window-based" heuristic (what we call "autocorrection" today)
ac2: auto corrected by the -1y, +2d heuristic
When you’re troubleshooting issues related to timestamp, you can run a query similar to this to see how the timestamp is parsed:
| _format as timestampformat
The result would look like this:
The following conventions are supported as tokens and can be parsed as in custom timestamp formats:
|Token||Date or Time Component||Example|
|yyyy||4-digit year||2012; 2016|
|yy||2-digit year||12; 16|
|MMM||3-character month||Jan; Mar; Dec|
|MM||1- or 2-digit month (in a year)||1; 01; 9; 09; 12|
|dd||1- or 2-digit day (in a month)||1; 01; 16; 30|
|a||AM/PM (case insensitive)||AM; PM; am; pm|
|HH||1- or 2-digit hour (in a day, 0-23)||2; 02; 14; 23|
|hh||1- or 2-digit hour (in a day, 1-12 with AM/PM)||2; 02; 11; 12|
|mm||1- or 2-digit minute (in an hour)||8; 08; 55|
|ss||1- or 2-digit second (in a minute)||5; 05; 35|
|SSS||1-3 digit subsecond or millisecond (in decimal)||4; 58; 944|
|zzz||3- letter time zone||UTC; PST; EDT|
|ZZZZ||RFC 822 time zone||-0900; +0500|
|'Z'||Literal Z character||Z|
|'T'||Literal T character||T|
|epoch||10, 13, 16, 19 digit timestamp with optional . (dot) after 10 digits.||1496756806.655123456|
When configuring a Source, you can choose either of the following options:
- Use the time zone present in your log files, and then choose an option in case time zone information is missing from a log message.
- Have us completely disregard any time zone information present in logs by forcing a time zone.
It's important to have the proper time zone set, no matter which option you choose. If the time zone of logs can't be determined, we stamp them with UTC.
Time zone considerations
The following considerations apply to time zones:
- We highly recommend that the time zone be set explicitly on all Sources. Sumo Logic always attempts to determine the time zone for the Source. However, if that isn’t possible, the time zone will revert to UTC. In these cases, the time zone will be incorrect, and that could significantly affect forensic analysis and reporting.
- Sumo Logic does not support all available ISO8601 time zones. For example -00 is not supported. So any timezones written in this format are undetectable by the system. For cases of these formats you will need to supply the proper default timezone to use when one is not detected by the service.
Default time zone
By default, we use the time zone from your web browser set by the operating system to display hours and minutes everywhere in our user interface. You can change the default time zone that the user interface displays by adjusting the Default Timezone setting on the Preferences page. This option overrides the time zone from your web browser, and changes how hours and minutes are displayed in the UI. But this is a personal setting, and does not change the time zone for anyone else in your organization.
UI elements that are affected by this setting include the Search page Time Range field, the Time column of the Messages pane, Dashboards, and Anomaly Detection.
Changing the Default Timezone setting affects how the UI displays messages, but not the actual timestamp in the log message.
For example, the following screenshot shows the time zone set to PST in the UI, in the Time column. The logs were collected from a system that was also configured to use the PST time zone, which is displayed in the timestamp of the Message column. The timestamps in both columns match as they are set to the same time zone.
The next screenshot shows the same search result after changing the Default Timezone setting to UTC. Now the Time column is displayed in UTC, while the Message column retains the original timestamp, in PST.
In another example, if your time zone is set to UTC, and you share a Dashboard with another user who has their time zone set to PST, what will they see?
They will see the same data, just displayed using their custom set time zone. For example, if you have a Panel that uses a time series, the timeline on the X axis of your chart is displayed in your time zone, UTC. The other user will see the timeline on the X axis displayed in their time zone, PST. But the data displayed in the chart is exactly the same.
The Time Range field on the Search page uses the time zone that is set for the Sumo Logic user interface. This is either the default time zone used in the web browser and set by the operating system, or the Default Timezone setting on the Preferences page, if you have set this option.
When you create a Scheduled Search or a Real Time Alert, the time range of the search that you save uses the time zone that is set for the Sumo Logic user interface. If you have changed the time zone using the Default Timezone setting, this time zone will be used for your Scheduled Searches and Real Time Alerts.
The Default Timezone setting does not automatically update the configurations of existing Scheduled Searches or Real Time Alerts. So it is important to note that if you would like your Scheduled Searches and Real Time Alerts to use the same time zone as your user interface, you will need to edit them to do so, and save them.
For more information on time ranges, see Set the Time Range of a Search.
Search Time Ranges can also search all data with any and all timestamps. For details, see Use Receipt Time.
If the browser used to access Sumo Logic is in a location that uses the day/month/year format instead of month/day/year, dates are presented in that format.