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

Unclear if timestamps in text format must be milliseconds or seconds #1528

Open
aspyct opened this issue Aug 24, 2022 · 0 comments
Open

Unclear if timestamps in text format must be milliseconds or seconds #1528

aspyct opened this issue Aug 24, 2022 · 0 comments

Comments

@aspyct
Copy link

aspyct commented Aug 24, 2022

Hello,

The exposition format documentation specifies that the timestamps must be expressed in milliseconds:

The timestamp is an int64 (milliseconds since epoch, i.e. 1970-01-01 00:00:00 UTC, excluding leap seconds), represented as required by Go's [ParseInt()](https://golang.org/pkg/strconv/#ParseInt) function.

However, when I use promtool to generate blocks from data, it seems to expect timestamps in seconds. Also, the OpenMetrics specifications (which I believe is the exposition format explained by the other document) says that the timestamp must be specified in seconds:

Timestamps MUST be Unix Epoch in seconds.

Are these two different formats/usages?

Related to another ticket, it would be nice if it were specified that prometheus cannot ingest data older than ~1h.

A link to the promtool backfilling tools would be nice too, since that's probably what people are looking for.

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

No branches or pull requests

1 participant