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

Fix rfc3339 example texts #1526

Merged
merged 1 commit into from
Aug 23, 2018
Merged

Conversation

dbarboza
Copy link
Contributor

This fixes a minor textual error in amtool help where the example time/date is not accepted because it's not in RFC3339 format. @stuartnelson3 @mxinden

The example text for --start and --end has a timestamp example like this:

  --end=END            Set when the silence should end (overwrites duration). RFC3339 format 2006-01-02T15:04:05Z07:00

This is not accepted by amtool:
amtool --alertmanager.url='http://prom:9093' silence add alertname='alert' instance=~".*" -c 'sleep' --end='2018-09-02T15:04:05Z07:00' .
amtool: error: parsing time "2018-09-02T15:04:05Z07:00": extra text: 07:00

The RFC format should end in either a Z, to denote UTC/Zulu, or a negative offset, i.e. '-07:00'.
https://tools.ietf.org/html/rfc3339#section-4.2

Signed-off-by: Dave Barboza <dxbarboza@gmail.com>
@stuartnelson3 stuartnelson3 merged commit 34bc54c into prometheus:master Aug 23, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants