[Bug 223720] net-mgmt/prometheus: Update to 2.0.0

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Tue Dec 5 17:13:34 UTC 2017


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=223720

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

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

--- Comment #4 from David O'Rourke <dor.bsd at 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 settings,
if any
 - Prometheus 1 running on a different port, in read-only (no scraping) mode.
 - 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 Prometheus 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 package
(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-address
: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 port,
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 setup.
Even in this case, I believe changing the Prometheus 2 default
$prometheus_data_dir is a good idea.

-David

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


More information about the freebsd-ports-bugs mailing list