Skip to content

Commit

Permalink
Makes timestamp parsing docs clearer (#2360)
Browse files Browse the repository at this point in the history
  • Loading branch information
owen-d authored Jul 16, 2020
1 parent 2b145da commit 35b61e6
Showing 1 changed file with 5 additions and 3 deletions.
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

0 comments on commit 35b61e6

Please sign in to comment.