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

Bug 1885235: bump Prometheus to v2.22.0 #61

Merged
merged 84 commits into from
Oct 20, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
84 commits
Select commit Hold shift + click to select a range
25a4fc2
Update prombench workflows to incorporate new naming convention
weastel Aug 23, 2020
00ee73e
Export members of EvalNodeHelper to facilitate usage in external func…
vjsamuel Aug 27, 2020
d30f202
Fix Experimental UI for cookie based authentication (#7827)
sbueringer Aug 27, 2020
a14245b
web/api/v1: rename http status code. (#7864)
johncming Aug 28, 2020
6573bf4
web: Close and exhaust all response bodies in tests + cleanup snapsho…
roidelapluie Aug 29, 2020
791b848
Update the storage.md to fix typo, and some grammar/format issue (#7871)
showuon Aug 31, 2020
e4cfa74
docs: minor corrections to the docker documentation (#6869)
larsks Aug 31, 2020
3ebffa7
add key to StatusWithStatusIndicator component in loop (#6879)
kandros Aug 31, 2020
252265f
tsdb/chunks: remove un-used code. (#6944)
johncming Aug 31, 2020
dba729f
Referring to configuration.md, to have a Generic placeholders definit…
showuon Sep 1, 2020
2255b6f
Refactor WAL.Segments method to be part of the wal package (#6477)
codesome Sep 1, 2020
bd53b5f
Unnecessary go routine spawn. (#7879)
LasTshaMAN Sep 2, 2020
75ae384
tsdb: remove redundant fields. (#7869)
johncming Sep 2, 2020
7b4a2ca
Bump promu version (#7880)
SuperQ Sep 2, 2020
f4a1b3c
Rename `remote.newReadClient()` to `remote.NewReadClient()` (#7881)
Sep 2, 2020
f8c8adf
Update all_nodepools_deleted to all_nodes_deleted in prombench workflow
geekodour Sep 5, 2020
51306cb
docs: add promtool version in rule migration cmd (#6989)
hoffie Sep 7, 2020
5ea6bdc
tsdb: sync temporary checkpoint directory before rename (#7004)
zhulongcheng Sep 7, 2020
c8ad79e
Fixes #6127 : Add Collapse All button (#6957)
djmgit Sep 7, 2020
808a145
Update alerting_rules.md (#7252)
justinwalz Sep 7, 2020
8219b44
rules: Remove redundant RLock to avoid double RLock (#7183)
Sep 7, 2020
a6ee1f8
Merge pull request #7913 from prometheus/release-2.21
roidelapluie Sep 9, 2020
fc8e769
Use ASSIGN when using = inside braces (#7911)
Harkishen-Singh Sep 9, 2020
f0f8e50
Fix missing remote read spans (#7914)
csmarchbanks Sep 9, 2020
90fc6be
Default to bigger remote_write sends (#5267)
bboreham Sep 9, 2020
a282d25
tsdb: remove duplicate values set to reduce memory usage(map overhead…
damnever Sep 10, 2020
ed2a483
Merge pull request #7929 from prometheus/release-2.21
roidelapluie Sep 11, 2020
7de6046
update the protoc version to 3.12.3 in readme.md (#7931)
showuon Sep 14, 2020
e208afc
web: Remove APIv2 (#7935)
roidelapluie Sep 15, 2020
6f28c46
Updating storage.md for retention.size (#7942)
venkatbvc Sep 16, 2020
fc416e3
RELEASE.md: add instructions for React dep updates (#6831)
juliusv Sep 16, 2020
68d65a8
Add the "assets" make target and change directory note in readme (#7908)
showuon Sep 16, 2020
db13003
ui: clarify alert state toggle via checkbox icon (#7936)
hoffie Sep 16, 2020
b5b3bc3
tsdb/fileutil: Use FcntlFstore from golang.org/x/sys/unix (#7949)
tklauser Sep 19, 2020
7aa5fb0
tsdb/chunks/head_chunks_test.go: Fix typo (#7953)
altmas5 Sep 20, 2020
4a52faf
Unnecessary go routine spawn. (#7951)
liguozhong Sep 21, 2020
77c784a
Ensure alert rules are marked as restored in unit tests (#7661)
dgl Sep 21, 2020
7e1c27b
Add tsdb startup duration metric (#7737)
mneverov Sep 21, 2020
184a871
Eureka: Fix service discovery when compiled in 32-bit (#7961)
roidelapluie Sep 22, 2020
b014588
Merge pull request #7964 from prometheus/release-2.21
roidelapluie Sep 22, 2020
63457ef
Vendor prometheus/common v0.14.0
dstdfx Sep 23, 2020
b10f071
Remove unused deps
dstdfx Sep 23, 2020
7e2db3d
Merge pull request #7968 from dstdfx/extend-version-cmd
roidelapluie Sep 23, 2020
3364875
update the doc link in internal_arthitecture.md (#7966)
showuon Sep 24, 2020
072b964
Refactor vars to avoid test failures in storage/remote with -count > …
Harkishen-Singh Sep 24, 2020
19c190b
Add a rule_group_samples metric (#7977)
prymitive Sep 25, 2020
916dbd4
React UI: Implement missing TSDB head stats section (#7876)
hooten Sep 29, 2020
f0d87b5
Encode and Decode method for tombstones (#7967)
codesome Sep 30, 2020
c9d827c
Fix callback function bind with object as parameter (#7984)
TAYTS Sep 30, 2020
6f13c60
Scrape: Test that deduplicated targets are started (#7975)
roidelapluie Sep 30, 2020
50ae4e2
Fix magic number in docs (#7998)
codesome Oct 1, 2020
d253251
Add UserAgent header to Eureka client (#8006)
meetme2meat Oct 2, 2020
073e93c
Gracefully handle unknown WAL record types. (#8004)
brian-brazil Oct 5, 2020
8dbfa14
Add UserAgent to Hetzner Robot SD (#8008)
meetme2meat Oct 5, 2020
6544f95
Introduce timestamp tolerance in scrapes
roidelapluie Sep 25, 2020
98e1461
Move the tolerance logic in the loop function.
roidelapluie Oct 5, 2020
ccc1df3
Fix comment
roidelapluie Oct 6, 2020
924ce97
Don't do literal regex matching optimisation when case insensitive. (…
brian-brazil Oct 6, 2020
52c4da1
Bump Kubernetes dependencies
simonpasquier Oct 5, 2020
9bb3555
cmd/prometheus: support k8s.io/klog/v2
simonpasquier Oct 6, 2020
b90c7a5
Simplify logic
roidelapluie Oct 6, 2020
946819e
cmd/prometheus: Issue a warning on 32 bit archs (#8012)
roidelapluie Oct 6, 2020
6be3ebd
Merge pull request #8015 from simonpasquier/bump-k8s-deps
brancz Oct 7, 2020
bf7c771
promql: Organize legacy tests into appropriate files (#7989)
hdost Oct 7, 2020
536dfb6
Add an experimental, hidden flag
roidelapluie Oct 7, 2020
6b618ec
Better description
roidelapluie Oct 7, 2020
c388168
fix few typo (#8023)
garanews Oct 7, 2020
627ff84
Adjust flag
roidelapluie Oct 7, 2020
671f7c6
Adjust comment
roidelapluie Oct 7, 2020
e2a2bf3
Add context
roidelapluie Oct 7, 2020
4617d16
Specify the removal
roidelapluie Oct 7, 2020
be5ba1a
Fix wordings
roidelapluie Oct 7, 2020
d9dcf2c
Fixes #7982. Increase maxErrMsgLen value remote_write api (#8017)
siddhant94 Oct 7, 2020
da3ea43
Merge pull request #7976 from roidelapluie/tolerance
brancz Oct 8, 2020
a584898
*: Update go dependencies
brancz Oct 8, 2020
b97a1bb
web/ui/react-app/yarn.lock: Update UI dependencies
brancz Oct 8, 2020
21a2e8c
storage/remote/intern_test.go: Fix linting errors
brancz Oct 8, 2020
8703bc8
Merge pull request #8027 from brancz/v2.22-go-dep-update
brancz Oct 8, 2020
be13743
*: Cut v2.22.0-rc.0
brancz Oct 7, 2020
3240cf8
Merge pull request #8020 from brancz/cut-2.22.0-rc.0
brancz Oct 8, 2020
e1406c9
*: Cut v2.22.0
brancz Oct 15, 2020
0a7fdd3
Merge pull request #8059 from brancz/cut-2.22.0
brancz Oct 15, 2020
0a5fb08
Merge tag 'v2.22.0' into aos-bump-v2.22.0
simonpasquier Oct 19, 2020
2d6ff26
web/ui: regenerate assets
simonpasquier Oct 19, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
8 changes: 4 additions & 4 deletions .github/workflows/prombench.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
uses: docker://prominfra/prombench:master
with:
args: >-
until make all_nodepools_deleted; do echo "waiting for nodepools to be deleted"; sleep 10; done;
until make all_nodes_deleted; do echo "waiting for nodepools to be deleted"; sleep 10; done;
make deploy;
- name: Update status to failure
if: failure()
Expand Down Expand Up @@ -69,7 +69,7 @@ jobs:
uses: docker://prominfra/prombench:master
with:
args: >-
until make all_nodepools_running; do echo "waiting for nodepools to be created"; sleep 10; done;
until make all_nodes_running; do echo "waiting for nodepools to be created"; sleep 10; done;
make clean;
- name: Update status to failure
if: failure()
Expand Down Expand Up @@ -104,9 +104,9 @@ jobs:
uses: docker://prominfra/prombench:master
with:
args: >-
until make all_nodepools_running; do echo "waiting for nodepools to be created"; sleep 10; done;
until make all_nodes_running; do echo "waiting for nodepools to be created"; sleep 10; done;
make clean;
until make all_nodepools_deleted; do echo "waiting for nodepools to be deleted"; sleep 10; done;
until make all_nodes_deleted; do echo "waiting for nodepools to be deleted"; sleep 10; done;
make deploy;
- name: Update status to failure
if: failure()
Expand Down
18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,21 @@
## 2.22.0 / 2020-10-07

As announced in the 2.21.0 release notes, the experimental gRPC API v2 has been
removed.

* [CHANGE] web: Remove APIv2. #7935
* [ENHANCEMENT] React UI: Implement missing TSDB head stats section. #7876
* [ENHANCEMENT] UI: Add Collapse all button to targets page. #6957
* [ENHANCEMENT] UI: Clarify alert state toggle via checkbox icon. #7936
* [ENHANCEMENT] Add `rule_group_last_evaluation_samples` and `prometheus_tsdb_data_replay_duration_seconds` metrics. #7737 #7977
* [ENHANCEMENT] Gracefully handle unknown WAL record types. #8004
* [ENHANCEMENT] Issue a warning for 64 bit systems running 32 bit binaries. #8012
* [BUGFIX] Adjust scrape timestamps to align them to the intended schedule, effectively reducing block size. Workaround for a regression in go1.14+. #7976
* [BUGFIX] promtool: Ensure alert rules are marked as restored in unit tests. #7661
* [BUGFIX] Eureka: Fix service discovery when compiled in 32-bit. #7964
* [BUGFIX] Don't do literal regex matching optimisation when case insensitive. #8013
* [BUGFIX] Fix classic UI sometimes running queries for instant query when in range query mode. #7984

## 2.21.0 / 2020-09-11

This release is built with Go 1.15, which deprecates [X.509 CommonName](https://golang.org/doc/go1.15#commonname)
Expand Down
2 changes: 1 addition & 1 deletion Makefile.common
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ ifneq ($(shell which gotestsum),)
endif
endif

PROMU_VERSION ?= 0.5.0
PROMU_VERSION ?= 0.6.0
PROMU_URL := https://github.com/prometheus/promu/releases/download/v$(PROMU_VERSION)/promu-$(PROMU_VERSION).$(GO_BUILD_PLATFORM).tar.gz

GOLANGCI_LINT :=
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ The Makefile provides several targets:
* *format*: format the source code
* *vet*: check the source code for common errors
* *docker*: build a docker container for the current `HEAD`
* *assets*: build the new experimental React UI

## React UI Development

Expand Down
36 changes: 28 additions & 8 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ The release shepherd is responsible for the entire release series of a minor rel
* We aim to keep the master branch in a working state at all times. In principle, it should be possible to cut a release from master at any time. In practice, things might not work out as nicely. A few days before the pre-release is scheduled, the shepherd should check the state of master. Following their best judgement, the shepherd should try to expedite bug fixes that are still in progress but should make it into the release. On the other hand, the shepherd may hold back merging last-minute invasive and risky changes that are better suited for the next minor release.
* On the date listed in the table above, the release shepherd cuts the first pre-release (using the suffix `-rc.0`) and creates a new branch called `release-<major>.<minor>` starting at the commit tagged for the pre-release. In general, a pre-release is considered a release candidate (that's what `rc` stands for) and should therefore not contain any known bugs that are planned to be fixed in the final release.
* With the pre-release, the release shepherd is responsible for running and monitoring a benchmark run of the pre-release for 3 days, after which, if successful, the pre-release is promoted to a stable release.
* If regressions or critical bugs are detected, they need to get fixed before cutting a new pre-release (called `-rc.1`, `-rc.2`, etc.).
* If regressions or critical bugs are detected, they need to get fixed before cutting a new pre-release (called `-rc.1`, `-rc.2`, etc.).

See the next section for details on cutting an individual release.

Expand All @@ -62,13 +62,7 @@ Maintaining the release branches for older minor releases happens on a best effo

### 0. Updating dependencies

A few days before a major or minor release, consider updating the dependencies:

```
make update-go-deps
git add go.mod go.sum vendor
git commit -m "Update dependencies"
```
A few days before a major or minor release, consider updating the dependencies.

Then create a pull request against the master branch.

Expand All @@ -81,6 +75,32 @@ you can skip the dependency update or only update select dependencies. In such a
case, you have to create an issue or pull request in the GitHub project for
later follow-up.

#### Updating Go dependencies

```
make update-go-deps
git add go.mod go.sum vendor
git commit -m "Update dependencies"
```

#### Updating React dependencies

Either upgrade the dependencies within their existing version constraints as specified in the `package.json` file (see https://docs.npmjs.com/files/package.json#dependencies):

```
cd web/ui/react-app
yarn upgrade
git add yarn.lock
```

Or alternatively, update all dependencies to their latest major versions. This is potentially more disruptive and will require more follow-up fixes, but should be done from time to time (use your best judgement):

```
cd web/ui/react-app
yarn upgrade --latest
git add package.json yarn.lock
```

### 1. Prepare your release

At the start of a new major or minor release cycle create the corresponding release branch based on the master branch. For example if we're releasing `2.17.0` and the previous stable release is `2.16.0` we need to create a `release-2.17` branch. Note that all releases are handled in protected release branches, see the above `Branch management and versioning` section. Release candidates and patch releases for any given major or minor release happen in the same `release-<major>.<minor>` branch. Do not create `release-<version>` for patch or release candidate releases.
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.21.0
2.22.0
13 changes: 12 additions & 1 deletion cmd/prometheus/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import (
"fmt"
"io"
"math"
"math/bits"
"net"
"net/http"
_ "net/http/pprof" // Comment this line to disable pprof endpoint.
Expand Down Expand Up @@ -48,7 +49,8 @@ import (
jprom "github.com/uber/jaeger-lib/metrics/prometheus"
"go.uber.org/atomic"
kingpin "gopkg.in/alecthomas/kingpin.v2"
"k8s.io/klog"
klog "k8s.io/klog"
klogv2 "k8s.io/klog/v2"

promlogflag "github.com/prometheus/common/promlog/flag"
"github.com/prometheus/prometheus/config"
Expand Down Expand Up @@ -239,6 +241,9 @@ func main() {
a.Flag("rules.alert.resend-delay", "Minimum amount of time to wait before resending an alert to Alertmanager.").
Default("1m").SetValue(&cfg.resendDelay)

a.Flag("scrape.adjust-timestamps", "Adjust scrape timestamps by up to 2ms to align them to the intended schedule. See https://github.com/prometheus/prometheus/issues/7846 for more context. Experimental. This flag will be removed in a future release.").
Hidden().Default("true").BoolVar(&scrape.AlignScrapeTimestamps)

a.Flag("alertmanager.notification-queue-capacity", "The capacity of the queue for pending Alertmanager notifications.").
Default("10000").IntVar(&cfg.notifier.QueueCapacity)

Expand Down Expand Up @@ -342,8 +347,14 @@ func main() {
// Above level 6, the k8s client would log bearer tokens in clear-text.
klog.ClampLevel(6)
klog.SetLogger(log.With(logger, "component", "k8s_client_runtime"))
klogv2.ClampLevel(6)
klogv2.SetLogger(log.With(logger, "component", "k8s_client_runtime"))

level.Info(logger).Log("msg", "Starting Prometheus", "version", version.Info())
if bits.UintSize < 64 {
level.Warn(logger).Log("msg", "This Prometheus binary has not been compiled for a 64-bit architecture. Due to virtual memory constraints of 32-bit systems, it is highly recommended to switch to a 64-bit binary of Prometheus.", "GOARCH", runtime.GOARCH)
}

level.Info(logger).Log("build_context", version.BuildContext())
level.Info(logger).Log("host_details", prom_runtime.Uname())
level.Info(logger).Log("fd_limits", prom_runtime.FdLimits())
Expand Down
8 changes: 8 additions & 0 deletions cmd/promtool/testdata/unittest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,14 @@ tests:
input_series:
- series: 'up{job="prometheus", instance="localhost:9090"}'
values: "0+0x1440"

promql_expr_test:
- expr: count(ALERTS) by (alertname, alertstate)
eval_time: 4m
exp_samples:
- labels: '{alertname="InstanceDown",alertstate="pending"}'
value: 1

alert_rule_test:
- eval_time: 1d
alertname: InstanceDown
Expand Down
10 changes: 10 additions & 0 deletions cmd/promtool/unittest.go
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,16 @@ func (tg *testGroup) test(mint, maxt time.Time, evalInterval time.Duration, grou
// Current index in alertEvalTimes what we are looking at.
curr := 0

for _, g := range groups {
for _, r := range g.Rules() {
if alertRule, ok := r.(*rules.AlertingRule); ok {
// Mark alerting rules as restored, to ensure the ALERTS timeseries is
// created when they run.
alertRule.SetRestored(true)
}
}
}

var errs []error
for ts := mint; ts.Before(maxt); ts = ts.Add(evalInterval) {
// Collects the alerts asked for unit testing.
Expand Down
16 changes: 8 additions & 8 deletions config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,16 +104,16 @@ var (

// DefaultQueueConfig is the default remote queue configuration.
DefaultQueueConfig = QueueConfig{
// With a maximum of 1000 shards, assuming an average of 100ms remote write
// time and 100 samples per batch, we will be able to push 1M samples/s.
MaxShards: 1000,
// With a maximum of 200 shards, assuming an average of 100ms remote write
// time and 500 samples per batch, we will be able to push 1M samples/s.
MaxShards: 200,
MinShards: 1,
MaxSamplesPerSend: 100,
MaxSamplesPerSend: 500,

// Each shard will have a max of 500 samples pending in it's channel, plus the pending
// samples that have been enqueued. Theoretically we should only ever have about 600 samples
// per shard pending. At 1000 shards that's 600k.
Capacity: 500,
// Each shard will have a max of 2500 samples pending in its channel, plus the pending
// samples that have been enqueued. Theoretically we should only ever have about 3000 samples
// per shard pending. At 200 shards that's 600k.
Capacity: 2500,
BatchSendDeadline: model.Duration(5 * time.Second),

// Backoff times for retrying a batch of samples on recoverable errors.
Expand Down
6 changes: 4 additions & 2 deletions discovery/eureka/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,11 @@ import (
"net/http"

"github.com/pkg/errors"
"github.com/prometheus/common/version"
)

var userAgent = fmt.Sprintf("Prometheus/%s", version.Version)

type Applications struct {
VersionsDelta int `xml:"versions__delta"`
AppsHashcode string `xml:"apps__hashcode"`
Expand Down Expand Up @@ -55,8 +58,6 @@ type Instance struct {
DataCenterInfo *DataCenterInfo `xml:"dataCenterInfo"`
Metadata *MetaData `xml:"metadata"`
IsCoordinatingDiscoveryServer bool `xml:"isCoordinatingDiscoveryServer"`
LastUpdatedTimestamp int `xml:"lastUpdatedTimestamp"`
LastDirtyTimestamp int `xml:"lastDirtyTimestamp"`
ActionType string `xml:"actionType"`
CountryID int `xml:"countryId"`
InstanceID string `xml:"instanceId"`
Expand Down Expand Up @@ -87,6 +88,7 @@ func fetchApps(ctx context.Context, server string, client *http.Client) (*Applic
return nil, err
}
request = request.WithContext(ctx)
request.Header.Add("User-Agent", userAgent)

resp, err := client.Do(request)
if err != nil {
Expand Down
12 changes: 11 additions & 1 deletion discovery/hetzner/robot.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import (
"github.com/pkg/errors"
"github.com/prometheus/common/config"
"github.com/prometheus/common/model"
"github.com/prometheus/common/version"
"github.com/prometheus/prometheus/discovery/refresh"
"github.com/prometheus/prometheus/discovery/targetgroup"
)
Expand All @@ -39,6 +40,8 @@ const (
hetznerLabelRobotCancelled = hetznerRobotLabelPrefix + "cancelled"
)

var userAgent = fmt.Sprintf("Prometheus/%s", version.Version)

// Discovery periodically performs Hetzner Robot requests. It implements
// the Discoverer interface.
type robotDiscovery struct {
Expand Down Expand Up @@ -67,7 +70,14 @@ func newRobotDiscovery(conf *SDConfig, logger log.Logger) (*robotDiscovery, erro
return d, nil
}
func (d *robotDiscovery) refresh(ctx context.Context) ([]*targetgroup.Group, error) {
resp, err := d.client.Get(d.endpoint + "/server")
req, err := http.NewRequest("GET", d.endpoint+"/server", nil)
if err != nil {
return nil, err
}

req.Header.Add("User-Agent", userAgent)

resp, err := d.client.Do(req)
if err != nil {
return nil, err
}
Expand Down
2 changes: 1 addition & 1 deletion docs/configuration/alerting_rules.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ the "Alerts" tab of your Prometheus instance. This will show you the exact
label sets for which each defined alert is currently active.

For pending and firing alerts, Prometheus also stores synthetic time series of
the form `ALERTS{alertname="<alert name>", alertstate="pending|firing", <additional alert labels>}`.
the form `ALERTS{alertname="<alert name>", alertstate="<pending or firing>", <additional alert labels>}`.
The sample value is set to `1` as long as the alert is in the indicated active
(pending or firing) state, and the series is marked stale when this is no
longer the case.
Expand Down
11 changes: 6 additions & 5 deletions docs/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ prom/prometheus`. This starts Prometheus with a sample
configuration and exposes it on port 9090.

The Prometheus image uses a volume to store the actual metrics. For
production deployments it is highly recommended to use the
[Data Volume Container](https://docs.docker.com/engine/admin/volumes/volumes/)
pattern to ease managing the data on Prometheus upgrades.
production deployments it is highly recommended to use a
[named volume](https://docs.docker.com/storage/volumes/)
to ease managing the data on Prometheus upgrades.

To provide your own configuration, there are several options. Here are
two examples.
Expand All @@ -41,11 +41,12 @@ Bind-mount your `prometheus.yml` from the host by running:
```bash
docker run \
-p 9090:9090 \
-v /tmp/prometheus.yml:/etc/prometheus/prometheus.yml \
-v /path/to/prometheus.yml:/etc/prometheus/prometheus.yml \
prom/prometheus
```

Or use an additional volume for the config:
Or bind-mount the directory containing `prometheus.yml` onto
`/etc/prometheus` by running:

```bash
docker run \
Expand Down
2 changes: 1 addition & 1 deletion docs/migration.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ new format. For example:
$ promtool update rules example.rules
```

Note that you will need to use promtool from 2.0, not 1.8.
You will need to use `promtool` from [Prometheus 2.5](https://github.com/prometheus/prometheus/releases/tag/v2.5.0) as later versions no longer contain the above subcommand.

## Storage

Expand Down