Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Makes timestamp parsing docs clearer #2360

Merged
merged 1 commit into from
Jul 16, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions docs/clients/promtail/stages/timestamp.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ timestamp:
[action_on_failure: <string>]
```

The `format` field can be provided as an "example" of what timestamps look like
(such as `Mon Jan 02 15:04:05 -0700 2006`) but Promtail accepts using a series
of pre-defined formats to represent common forms:
### Reference Time

The `format` field can be how the reference time, defined to be `Mon Jan 2 15:04:05 -0700 MST 2006`, would be interpreted in the format or can alternatviely be one of the following common forms:

- `ANSIC`: `Mon Jan _2 15:04:05 2006`
- `UnixDate`: `Mon Jan _2 15:04:05 MST 2006`
Expand Down Expand Up @@ -74,6 +74,8 @@ should be used in the custom format.
| Timezone offset | `-0700`, `-070000` (with seconds), `-07`, `07:00`, `-07:00:00` (with seconds) |
| Timezone ISO-8601 | `Z0700` (Z for UTC or time offset), `Z070000`, `Z07`, `Z07:00`, `Z07:00:00` |

### Action on Failure

The `action_on_failure` setting defines which action should be taken by the
stage in case the `source` field doesn't exist in the extracted data or the
timestamp parsing fails. The supported actions are:
Expand Down