Skip to content

Commit

Permalink
Merge pull request #300 from prometheus/beorn7/doc
Browse files Browse the repository at this point in the history
Add documentation about inconsistent metrics
  • Loading branch information
beorn7 authored Oct 16, 2019
2 parents cc61f46 + bdc223a commit 89423bd
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,27 @@ Pushgateway will export it with an emtpy instance label (`{instance=""}`),
which is equivalent to having no `instance` label at all but prevents the
server from attaching one.

### About metric inconsistencies

The Pushgateway exposes all pushed metrics together with its own metrics via
the same `/metrics` endpoint. (See the section about [exposed
metrics](#exposed-metrics) for details.) Therefore, all the metrics have to be
consistent with each other: Metrics of the same name must have
the same type, even if they are pushed to different groups, and there must be
no duplicates, i.e. metrics with the same name and the exact same label
pairs. Pushes that would lead to inconsistencies are rejected with status
code 400.

Inconsistent help strings are tolerated, though. The Pushgateway will pick a
winning help string and log about it at info level.

_Legacy note: The help string of Pushgateway's own `push_time_seconds` metric
has changed in v0.10.0. By using a persistence file, metrics pushed to a
Pushgateway of an earlier versions can make it into a Pushgateway of v0.10.0 or
later. In this case, the above mentioned log message will show up. Once each
previously pushed group has been deleted or received a new push, the log
message will disappear._

### About timestamps

If you push metrics at time *t*<sub>1</sub>, you might be tempted to believe
Expand Down

0 comments on commit 89423bd

Please sign in to comment.