Bug 258753 - www/nginx-prometheus-exporter: redirect stdout/stderr to syslog
Summary: www/nginx-prometheus-exporter: redirect stdout/stderr to syslog
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: Yasuhiro Kimura
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-09-28 04:28 UTC by bgdnlp
Modified: 2021-10-19 01:47 UTC (History)
2 users (show)

See Also:
arcade: maintainer-feedback+


Attachments
patch to 0.9.0 plus proposed changes (4.14 KB, patch)
2021-09-29 08:03 UTC, Volodymyr Kostyrko
arcade: maintainer-approval+
Details | Diff
cleaned up ph to 0.9.0 (1.86 KB, patch)
2021-10-18 10:34 UTC, Volodymyr Kostyrko
arcade: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description bgdnlp 2021-09-28 04:28:04 UTC
stdout and stderr should be logged to syslog, otherwise if the service is started by other processes, like SaltStack, it might hang. Here's a patch:


@@ -42,7 +42,8 @@
 pidfile=/var/run/nginx_prometheus_exporter.pid
 command="/usr/sbin/daemon"
 procname="/usr/local/bin/nginx-prometheus-exporter"
-command_args="-p ${pidfile} /usr/bin/env ${procname} \
+command_args="-f -T ${name} -p ${pidfile} \
+    /usr/bin/env ${procname} \
     --nginx.scrape-uri=${nginx_prometheus_exporter_scrape_uri} \
     --web.listen-address=${nginx_prometheus_exporter_listen_address} \
     ${nginx_prometheus_exporter_args}"
Comment 1 Volodymyr Kostyrko 2021-09-29 08:03:47 UTC
Created attachment 228238 [details]
patch to 0.9.0 plus proposed changes

Valid. Also update to 0.9.0, changelog:

🚀 Features

    Add support for more platforms, push to Docker Hub (#164) @lucacome
    add tls support (#133) @mpenate
    Add k8s object labels to tcp metrics (#134) @LorcanMcVeigh
    Add version cli argument (#118) @aerialls
    Use same style of release names as official exporters (#125) @Perflyst
    Extend Upstream Servers with pod_name label (#117) @LorcanMcVeigh
    Add variable labels to Upstream Servers and Server Zones metrics (#114) @Rulox

🐛 Bug Fixes

    Fix release order (#170) @lucacome
    Use static-debian10:nonroot instead of static:latest (#131) @dhoppe
    Add GoReleaser and fix missing vars in CI workflow (#163) @lucacome
    Fix bugs in exporter (#136) @LorcanMcVeigh
    Add function names to struct description (#135) @LorcanMcVeigh
    Fix default prometheus datasource was not found error (#111) @mobeigi

📝 Documentation

    Release 0.9.0 (#165) @lucacome
    Use equal sign in cli args examples (#155) @pleshakov

🔨 Maintenance

    Release 0.9.0 (#165) @lucacome
    Add date to binary when building locally (#169) @lucacome
    Update fossa to 1.1.6 and golangci-lint to 1.38 (#166) @lucacome
    Use scratch to support building for more archs (#167) @lucacome
    Bump github.com/prometheus/client_golang from 1.6.0 to 1.10.0 (#142) (#168) @dependabot
    Add support for more platforms, push to Docker Hub (#164) @lucacome
    Add GoReleaser and fix missing vars in CI workflow (#163) @lucacome
    Bump github.com/prometheus/common from 0.10.0 to 0.19.0 (#141) (#148) (#149) (#162) @dependabot
    Update Go version to 1.16 (#160) @lucacome
    Add GitHub workflow to check for stale PRs and issues (#159) @lucacome
    Remove unused labels (#158) @lucacome
    Bump golangci/golangci-lint-action from v2 to v2.5.1 (#146) (#156) @dependabot
    Add release-drafter (#152) @lucacome
    Change dependabot interval to weekly (#151) @lucacome
    Bump actions/cache from v2 to v2.1.4 (#144) @dependabot
    Bump github.com/nginxinc/nginx-plus-go-client from 0.6.0 to 0.8.0 (#143) @dependabot
    Add dependabot (#140) @lucacome
    Update workflow status version (#132) @martialonline
    Add exclusion for docs / examples changes (#129) @martialonline
    Add lint workflow (#128) @martialonline
    Add Fossa workflow (#127) @martialonline
    Retire Travis (#126) @martialonline
    Update Slack notifications (#124) @martialonline
    Update docker action (#123) @martialonline
    Update Go version to 1.15 (#115) @Dean-Coakley
    Add Slack notification for failed builds (#113) @martialonline

Compatibility

    NGINX 0.1.18 or newer.
    NGINX Plus R19 or newer.
Comment 2 Yasuhiro Kimura freebsd_committer 2021-10-18 09:59:51 UTC
(In reply to Volodymyr Kostyrko from comment #1)

Your patch includes change to following files.

* devel/ccache/Makefile.compilers
* mail/rmilter/Makefile
* net/dhcpcd/pkg-plist
* net/minidlna/files/minidlna.in

Is it intended one?
Comment 3 Volodymyr Kostyrko 2021-10-18 10:34:38 UTC
Created attachment 228806 [details]
cleaned up ph to 0.9.0

Sorry, forgot to export only current directory. Big thanks for noticing this!
Comment 4 Yasuhiro Kimura freebsd_committer 2021-10-18 10:55:43 UTC
Take.
Comment 5 commit-hook freebsd_committer 2021-10-19 01:38:44 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=29cb839209c956dc8536422553308cb7a6c1ffb9

commit 29cb839209c956dc8536422553308cb7a6c1ffb9
Author:     Volodymyr Kostyrko <arcade@b1t.name>
AuthorDate: 2021-10-18 10:46:32 +0000
Commit:     Yasuhiro Kimura <yasu@FreeBSD.org>
CommitDate: 2021-10-19 01:37:27 +0000

    www/nginx-prometheus-exporter: Update to 0.9.0

    * Redirect stdout/stderr to syslog (1)
    * Pet portclippy
    * Reformat Makefile with portfmt

    ChangeLog:      https://github.com/nginxinc/nginx-prometheus-exporter/releases/tag/v0.9.0
    PR:             258753
    Reported by:    bgdnlp <freebsd.org at neant.ro> (1)
    Approved by:    ygy (mentor)
    Differential Revision:  https://reviews.freebsd.org/D32547

 www/nginx-prometheus-exporter/Makefile                        | 11 +++++------
 www/nginx-prometheus-exporter/distinfo                        |  6 +++---
 .../files/nginx-prometheus-exporter.in                        |  3 ++-
 3 files changed, 10 insertions(+), 10 deletions(-)
Comment 6 Yasuhiro Kimura freebsd_committer 2021-10-19 01:47:07 UTC
Committed with minor refinement. Thanks!