Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 05 Dec 2017 17:13:32 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-ports-bugs@FreeBSD.org
Subject:   [Bug 223720] net-mgmt/prometheus: Update to 2.0.0
Message-ID:  <bug-223720-13-01VlB4Rrlh@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-223720-13@https.bugs.freebsd.org/bugzilla/>
References:  <bug-223720-13@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D223720

David O'Rourke <dor.bsd@xm0.uk> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dor.bsd@xm0.uk

--- Comment #4 from David O'Rourke <dor.bsd@xm0.uk> ---
I was just doing a little work on this when I thought I'd check to see if
anyone else was looking at it.

Given the migration path here, the prometheus2 package conflicting with
Prometheus 1 means that it's difficult for a user to run both versions side=
 by
side. However, fixing that means changing a lot of things in the Prometheus=
 2
package, binary names, config names, etc.

In order to run both versions of Prometheus, a user requires the following:
 - The Prometheus 1 /var/db/prometheus
 - A Prometheus 1 configuration file, with just the external_labels setting=
s,
if any
 - Prometheus 1 running on a different port, in read-only (no scraping) mod=
e.
 - Addition of a remote_read setting to the Prometheus 2 config file.

The main thing to preserve is the /var/db/prometheus directory, as such, I'd
recommend changing the default $prometheus_data_dir to /var/db/prometheus2.
This should preserve the old data in the vast majority of cases and we see
other packages doing similar things under /var/db when there are version
changes like this.

I'd then provide some instructions via the pkg-message on running Prometheu=
s 1
alongside Prometheus 2. This is only needed until the metrics in Prometheus=
 1
are old enough to no longer be required.

The pkg-message could mention how a user can download the prometheus 1 pack=
age
(pkg fetch -o . prometheus), extract it (cd <suitable dir> && tar xvf <path=
 to
prometheus pkg>) and run the binary (<path to extraction
dir>/usr/local/bin/prometheus -config.file prometheus1.yml -web.listen-addr=
ess
:9094). Another method would simply be downloading the pre-compiled FreeBSD
binary from Github, but then you lose the trust of the FreeBSD pkg system.

If Prometheus was running under a jail, the whole process is obviously a lot
simpler. Create a new jail for Prometheus 2, have it remote read the old
Prometheus 1 without going through any of this (except maybe changing the p=
ort,
depending on how your jail addressing works).

At the very least, the Prometheus 2 pkg-message could provide a link to the
migration guide and then the user can work out what's required for their se=
tup.
Even in this case, I believe changing the Prometheus 2 default
$prometheus_data_dir is a good idea.

-David

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-223720-13-01VlB4Rrlh>