Bug 228185 - [PATCH] net-mgmt/prometheus2: Update to 2.3.1, add default Prometheus web consoles and logging examples
Summary: [PATCH] net-mgmt/prometheus2: Update to 2.3.1, add default Prometheus web con...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Yuri Victorovich
URL:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2018-05-12 00:18 UTC by David O'Rourke
Modified: 2018-10-27 17:19 UTC (History)
1 user (show)

See Also:
dor.bsd: maintainer-feedback+


Attachments
net-mgmt/prometheus2: Add default consoles and improve logging (8.36 KB, patch)
2018-05-12 00:18 UTC, David O'Rourke
dor.bsd: maintainer-approval-
Details | Diff
net-mgmt/prometheus2: Add default consoles and improve logging (8.29 KB, patch)
2018-05-16 00:39 UTC, David O'Rourke
dor.bsd: maintainer-approval+
Details | Diff
net-mgmt/prometheus2: Update to 2.3.0, add default consoles and improve logging (9.32 KB, patch)
2018-06-09 10:44 UTC, David O'Rourke
dor.bsd: maintainer-approval+
Details | Diff
net-mgmt/prometheus2: Update to 2.3.1, add default consoles and improve logging (9.32 KB, patch)
2018-06-24 15:01 UTC, David O'Rourke
dor.bsd: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description David O'Rourke 2018-05-12 00:18:27 UTC
Created attachment 193310 [details]
net-mgmt/prometheus2: Add default consoles and improve logging

This patch adds the default Prometheus consoles as mentioned at https://prometheus.io/docs/visualization/consoles/ and improves the Prometheus logging.

The logging is now performed via syslogd(8). We ship a syslog.conf(5) config file for syslog.d and a newsyslog.conf(5) for newsyslog(8) to ensure that the logfile is rotated regularly.
The logs are stored under a new /var/log/prometheus directory by default.

The FILESDIR files now make extensive use of the Makefile substitutions to bring all of the important variables into the Makefile for better visibility.

The $prometheus_args rc.conf variable was renamed to $prometheus_flags to bring it in line with other ports and rc.conf variables.

Due to the above logging changes, the old $prometheus_log_file variable was removed from the rcscript as it was no longer required.

New $prometheus_consoles_dir and $prometheus_console_libraries_dir rc.conf variables were added for the mentioned consoles support.

-David
Comment 1 David O'Rourke 2018-05-12 00:19:09 UTC
This patch should resolve https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=228167
Comment 2 David O'Rourke 2018-05-16 00:07:58 UTC
Comment on attachment 193310 [details]
net-mgmt/prometheus2: Add default consoles and improve logging

Rejecting patch for the moment. name_flags is special and I need to revert that bit of the patch.
Comment 3 David O'Rourke 2018-05-16 00:39:35 UTC
Created attachment 193442 [details]
net-mgmt/prometheus2: Add default consoles and improve logging

Updates patch by changing name_flags back to name_args, avoiding issues as noted in https://www.freebsd.org/doc/en/books/porters-handbook/rc-scripts.html
Comment 4 David O'Rourke 2018-06-09 10:44:42 UTC
Created attachment 194094 [details]
net-mgmt/prometheus2: Update to 2.3.0, add default consoles and improve logging
Comment 5 David O'Rourke 2018-06-09 10:46:46 UTC
Patch has been updated to also upgrade Prometheus to 2.3.0.
Comment 6 David O'Rourke 2018-06-24 15:01:13 UTC
Created attachment 194564 [details]
net-mgmt/prometheus2: Update to 2.3.1, add default consoles and improve logging

Updates the patch to update Prometheus 2 to 2.3.1
Comment 7 Yuri Victorovich freebsd_committer freebsd_triage 2018-07-01 07:17:16 UTC
Committed with improvements.
Thank you for your submission!
Comment 8 commit-hook freebsd_committer freebsd_triage 2018-07-01 07:17:47 UTC
A commit references this bug:

Author: yuri
Date: Sun Jul  1 07:16:52 UTC 2018
New revision: 473656
URL: https://svnweb.freebsd.org/changeset/ports/473656

Log:
  net-mgmt/prometheus2: Update 2.2.1 -> 2.3.1

  Port changes:
  * Add syslogs and newsyslog config files
  * Add USE_SYSLOG option

  PR:		228185
  Submitted by:	David O'Rourke <dor.bsd@xm0.uk> (maintainer)

Changes:
  head/net-mgmt/prometheus2/Makefile
  head/net-mgmt/prometheus2/distinfo
  head/net-mgmt/prometheus2/files/newsyslog.conf.in
  head/net-mgmt/prometheus2/files/prometheus.in
  head/net-mgmt/prometheus2/files/syslog.d.conf.in
  head/net-mgmt/prometheus2/pkg-plist
Comment 9 Baptiste Daroussin freebsd_committer freebsd_triage 2018-10-26 12:23:38 UTC
Those kind of changes the "improvements" should have been discussed with the maintainer (explained at the very least).

The changes are also debatable: the maintainer wanted to provide an example which a user can decide to use or not, while @sample forces the configuration to have to exists or at the next update it will be readded.

I won't then call it an improvement but a change in behaviour (plus it modifies at installation the way the enduser syslog works, which is also a debatable feature ;)
Comment 10 Yuri Victorovich freebsd_committer freebsd_triage 2018-10-27 17:19:58 UTC
(In reply to Baptiste Daroussin from comment #9)

Hi Baptiste,

This change is good. It moves files that have standard locations from %%EXAMPLES%% to their proper locations. Like we wouldn't allow for ex. shared libraries to be installed into %%EXAMPLES%%, we can't allow syslog configuration files to be installed into some random location.

> the maintainer wanted to provide an example

We don't know if this was what he really wanted, or this was done by accident. Like with any other commmit, the maintainer could object and he didn't, which indicates that he likely agreed.

> a user can decide to use or not, while @sample forces the configuration to have to exist

These samples are predicated on the port option USE_SYSLOG, so the user still has a way to disable this by turning the option "off".

When these files are in a random location, this adds a burden to check that they didn't change on every update, while with a @sample they would be updated automatically (if unaltered).

A better description should have been provided with the commit, this is true.