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
This patch should resolve https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=228167
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.
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
Created attachment 194094 [details] net-mgmt/prometheus2: Update to 2.3.0, add default consoles and improve logging
Patch has been updated to also upgrade Prometheus to 2.3.0.
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
Committed with improvements. Thank you for your submission!
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
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 ;)
(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.