Date: Sat, 24 Oct 2020 07:44:13 +0000 (UTC) From: Li-Wen Hsu <lwhsu@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r553158 - in head: . net-mgmt net-mgmt/phpfpm_exporter net-mgmt/phpfpm_exporter/files sysutils sysutils/phpfpm_exporter Message-ID: <202010240744.09O7iD31076084@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: lwhsu Date: Sat Oct 24 07:44:13 2020 New Revision: 553158 URL: https://svnweb.freebsd.org/changeset/ports/553158 Log: sysutils/phpfpm_exporter: Update to 0.4.1 and move to net-mgmt PR: 227359 Submitted by: Gasol Wu <gasol.wu@gmail.com> (maintainer) Added: head/net-mgmt/phpfpm_exporter/ - copied from r553157, head/sysutils/phpfpm_exporter/ Deleted: head/sysutils/phpfpm_exporter/ Modified: head/MOVED head/net-mgmt/Makefile head/net-mgmt/phpfpm_exporter/Makefile head/net-mgmt/phpfpm_exporter/distinfo head/net-mgmt/phpfpm_exporter/files/phpfpm_exporter.in head/sysutils/Makefile Modified: head/MOVED ============================================================================== --- head/MOVED Sat Oct 24 06:57:34 2020 (r553157) +++ head/MOVED Sat Oct 24 07:44:13 2020 (r553158) @@ -15652,3 +15652,4 @@ devel/geany-plugin-geanypy||2020-10-15|Has expired: Us comms/chirp||2020-10-16|Use deprecated version of python x11-toolkits/py-gtk2||2020-10-16|Remove deprecated binding replace by py-gobject www/py-unit|www/unit-python|2020-10-21|Rename to be more consistent with the naming convention +sysutils/phpfpm_exporter|net-mgmt/phpfpm_exporter|2020-10-24|Move to net-mgmt category Modified: head/net-mgmt/Makefile ============================================================================== --- head/net-mgmt/Makefile Sat Oct 24 06:57:34 2020 (r553157) +++ head/net-mgmt/Makefile Sat Oct 24 07:44:13 2020 (r553158) @@ -279,6 +279,7 @@ SUBDIR += php73-snmp SUBDIR += php74-snmp SUBDIR += php80-snmp + SUBDIR += phpfpm_exporter SUBDIR += phpipam SUBDIR += phpweathermap SUBDIR += ping_exporter Modified: head/net-mgmt/phpfpm_exporter/Makefile ============================================================================== --- head/sysutils/phpfpm_exporter/Makefile Sat Oct 24 06:57:34 2020 (r553157) +++ head/net-mgmt/phpfpm_exporter/Makefile Sat Oct 24 07:44:13 2020 (r553158) @@ -1,10 +1,9 @@ # $FreeBSD$ PORTNAME= phpfpm_exporter -PORTVERSION= 0.3.3 +PORTVERSION= 0.4.1 DISTVERSIONPREFIX=v -PORTREVISION= 1 -CATEGORIES= sysutils +CATEGORIES= net-mgmt MAINTAINER= gasol.wu@gmail.com COMMENT= Export php-fpm metrics in Prometheus format @@ -22,5 +21,7 @@ GO_TARGET= ./cmd/${GH_PROJECT}:${PORTNAME} PLIST_FILES= bin/${PORTNAME} USE_RC_SUBR= phpfpm_exporter +USERS= prometheus +GROUPS= prometheus .include <bsd.port.mk> Modified: head/net-mgmt/phpfpm_exporter/distinfo ============================================================================== --- head/sysutils/phpfpm_exporter/distinfo Sat Oct 24 06:57:34 2020 (r553157) +++ head/net-mgmt/phpfpm_exporter/distinfo Sat Oct 24 07:44:13 2020 (r553158) @@ -1,3 +1,3 @@ -TIMESTAMP = 1512723537 -SHA256 (bakins-php-fpm-exporter-v0.3.3_GH0.tar.gz) = 02b6ee16d3c595430dd875953639daa95e2b41e9f78e1aca45656e9f5e196b4c -SIZE (bakins-php-fpm-exporter-v0.3.3_GH0.tar.gz) = 1510300 +TIMESTAMP = 1523129478 +SHA256 (bakins-php-fpm-exporter-v0.4.1_GH0.tar.gz) = 1e35ac0254fd897d17d03063604b742405b655f090b79b32b821fe238ff97f4d +SIZE (bakins-php-fpm-exporter-v0.4.1_GH0.tar.gz) = 300772 Modified: head/net-mgmt/phpfpm_exporter/files/phpfpm_exporter.in ============================================================================== --- head/sysutils/phpfpm_exporter/files/phpfpm_exporter.in Sat Oct 24 06:57:34 2020 (r553157) +++ head/net-mgmt/phpfpm_exporter/files/phpfpm_exporter.in Sat Oct 24 07:44:13 2020 (r553158) @@ -9,14 +9,16 @@ # Add the following lines to /etc/rc.conf.local or /etc/rc.conf # to enable this service: # -# phpfpm_exporter_enable (bool): Set to NO by default. +# phpfpm_exporter_enable (bool): Set to NO by default. # Set it to YES to enable phpfpm_exporter. -# phpfpm_exporter_user (string): Set user that phpfpm_exporter will run under -# Default is "nobody". -# phpfpm_exporter_group (string): Set group that phpfpm_exporter will run under -# Default is "nobody". +# phpfpm_exporter_user (string): Set user that phpfpm_exporter will run under +# Default is "prometheus". +# phpfpm_exporter_group (string): Set group that phpfpm_exporter will run under +# Default is "prometheus". # phpfpm_exporter_endpoint (string): Set status endpoint # Default is "http://127.0.0.1:9000/status". +# phpfpm_exporter_fastcgi (string): Set fastcgi url +# Default is "", If this is set, fastcgi will be used instead of HTTP. # phpfpm_exporter_listen_address (string): Set ip:port that phpfpm_exporter will listen on # Default is "127.0.0.1:8080". @@ -24,19 +26,20 @@ name=phpfpm_exporter rcvar=phpfpm_exporter_enable +desc="PHP-FPM prometheus exporter" load_rc_config $name -: ${phpfpm_exporter_enable:="NO"} -: ${phpfpm_exporter_user:="nobody"} -: ${phpfpm_exporter_group:="nobody"} -: ${phpfpm_exporter_endpoint:="http://127.0.0.1:9000/status"} -: ${phpfpm_exporter_listen_address:="127.0.0.1:8080"} +: ${phpfpm_exporter_enable:=NO} +: ${phpfpm_exporter_user:=prometheus} +: ${phpfpm_exporter_group:=prometheus} +: ${phpfpm_exporter_endpoint=http://127.0.0.1:9000/status} +: ${phpfpm_exporter_listen_address:=127.0.0.1:8080} pidfile=/var/run/phpfpm_exporter.pid -command="/usr/sbin/daemon" -procname="%%PREFIX%%/bin/phpfpm_exporter" +command=/usr/sbin/daemon +procname=%%PREFIX%%/bin/phpfpm_exporter command_args="-p ${pidfile} /usr/bin/env ${procname} \ --addr ${phpfpm_exporter_listen_address} \ --endpoint ${phpfpm_exporter_endpoint}" @@ -45,10 +48,15 @@ start_precmd=phpfpm_exporter_startprecmd phpfpm_exporter_startprecmd() { - if [ ! -e ${pidfile} ]; then - install -o ${phpfpm_exporter_user} -g ${phpfpm_exporter_group} /dev/null ${pidfile}; - fi + if [ -n "$phpfpm_exporter_fastcgi" ]; then + command_args="$command_args --fastcgi $phpfpm_exporter_fastcgi" + fi + + if [ -e ${pidfile} ]; then + chown ${phpfpm_exporter_user}:${phpfpm_exporter_group} ${pidfile}; + else + install -o ${phpfpm_exporter_user} -g ${phpfpm_exporter_group} /dev/null ${pidfile}; + fi } -load_rc_config $name run_rc_command "$1" Modified: head/sysutils/Makefile ============================================================================== --- head/sysutils/Makefile Sat Oct 24 06:57:34 2020 (r553157) +++ head/sysutils/Makefile Sat Oct 24 07:44:13 2020 (r553158) @@ -910,7 +910,6 @@ SUBDIR += php74-posix SUBDIR += php80-fileinfo SUBDIR += php80-posix - SUBDIR += phpfpm_exporter SUBDIR += phybs SUBDIR += pick SUBDIR += pidof
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202010240744.09O7iD31076084>