aboutsummaryrefslogtreecommitdiff
path: root/net-mgmt/php-fpm_exporter
diff options
context:
space:
mode:
authorVanilla I. Shu <vanilla@FreeBSD.org>2021-10-06 06:44:13 +0000
committerVanilla I. Shu <vanilla@FreeBSD.org>2021-10-06 07:13:57 +0000
commite20d99399a25bb2f5203e9251b408a1da431962d (patch)
tree579b5e512b23c854a122b144a0c1a0f1f841c28e /net-mgmt/php-fpm_exporter
parentfbbad3fe947b16df7a48dc84441a3df395c51881 (diff)
downloadports-e20d99399a25bb2f5203e9251b408a1da431962d.tar.gz
ports-e20d99399a25bb2f5203e9251b408a1da431962d.zip
net-mgmt/php-fpm_exporter: add port
PR: 258916 Reported by: bgdnlp <freebsd.org at neant.ro>
Diffstat (limited to 'net-mgmt/php-fpm_exporter')
-rw-r--r--net-mgmt/php-fpm_exporter/Makefile59
-rw-r--r--net-mgmt/php-fpm_exporter/distinfo79
-rw-r--r--net-mgmt/php-fpm_exporter/files/php_fpm_exporter.in66
-rw-r--r--net-mgmt/php-fpm_exporter/pkg-descr4
4 files changed, 208 insertions, 0 deletions
diff --git a/net-mgmt/php-fpm_exporter/Makefile b/net-mgmt/php-fpm_exporter/Makefile
new file mode 100644
index 000000000000..9c9f6a7fe3d2
--- /dev/null
+++ b/net-mgmt/php-fpm_exporter/Makefile
@@ -0,0 +1,59 @@
+PORTNAME= php-fpm_exporter
+PORTVERSION= 2.0.3
+DISTVERSIONPREFIX=v
+CATEGORIES= net-mgmt
+
+MAINTAINER= freebsd.org@neant.ro
+COMMENT= Export php-fpm metrics in Prometheus format
+
+LICENSE= APACHE20
+LICENSE_FILE= ${WRKSRC}/LICENSE
+
+USES= go:modules
+USE_GITHUB= yes
+GH_ACCOUNT= hipages
+GH_PROJECT= php-fpm_exporter
+GH_TUPLE= \
+ beorn7:perks:v1.0.1:beorn7_perks/vendor/github.com/beorn7/perks \
+ cespare:xxhash:v2.1.1:cespare_xxhash_v2/vendor/github.com/cespare/xxhash/v2 \
+ davecgh:go-spew:v1.1.1:davecgh_go_spew/vendor/github.com/davecgh/go-spew \
+ fatih:color:v1.9.0:fatih_color/vendor/github.com/fatih/color \
+ fsnotify:fsnotify:v1.4.7:fsnotify_fsnotify/vendor/github.com/fsnotify/fsnotify \
+ go-ini:ini:v1.52.0:go_ini_ini/vendor/gopkg.in/ini.v1 \
+ go-yaml:yaml:9f266ea9e77c:go_yaml_yaml_1/vendor/gopkg.in/yaml.v3 \
+ go-yaml:yaml:v2.3.0:go_yaml_yaml/vendor/gopkg.in/yaml.v2 \
+ golang:protobuf:v1.4.3:golang_protobuf/vendor/github.com/golang/protobuf \
+ golang:sys:68d13333faf2:golang_sys/vendor/golang.org/x/sys \
+ golang:text:v0.3.2:golang_text/vendor/golang.org/x/text \
+ gosuri:uitable:v0.0.4:gosuri_uitable/vendor/github.com/gosuri/uitable \
+ hashicorp:hcl:v1.0.0:hashicorp_hcl/vendor/github.com/hashicorp/hcl \
+ inconshreveable:mousetrap:v1.0.0:inconshreveable_mousetrap/vendor/github.com/inconshreveable/mousetrap \
+ magiconair:properties:v1.8.1:magiconair_properties/vendor/github.com/magiconair/properties \
+ mattn:go-colorable:v0.1.6:mattn_go_colorable/vendor/github.com/mattn/go-colorable \
+ mattn:go-isatty:v0.0.12:mattn_go_isatty/vendor/github.com/mattn/go-isatty \
+ mattn:go-runewidth:v0.0.8:mattn_go_runewidth/vendor/github.com/mattn/go-runewidth \
+ matttproud:golang_protobuf_extensions:v1.0.1:matttproud_golang_protobuf_extensions/vendor/github.com/matttproud/golang_protobuf_extensions \
+ mitchellh:go-homedir:v1.1.0:mitchellh_go_homedir/vendor/github.com/mitchellh/go-homedir \
+ mitchellh:mapstructure:v1.1.2:mitchellh_mapstructure/vendor/github.com/mitchellh/mapstructure \
+ pelletier:go-toml:v1.6.0:pelletier_go_toml/vendor/github.com/pelletier/go-toml \
+ pmezard:go-difflib:v1.0.0:pmezard_go_difflib/vendor/github.com/pmezard/go-difflib \
+ prometheus:client_golang:v1.10.0:prometheus_client_golang/vendor/github.com/prometheus/client_golang \
+ prometheus:client_model:v0.2.0:prometheus_client_model/vendor/github.com/prometheus/client_model \
+ prometheus:common:v0.18.0:prometheus_common/vendor/github.com/prometheus/common \
+ prometheus:procfs:v0.6.0:prometheus_procfs/vendor/github.com/prometheus/procfs \
+ protocolbuffers:protobuf-go:v1.23.0:protocolbuffers_protobuf_go/vendor/google.golang.org/protobuf \
+ sirupsen:logrus:v1.8.1:sirupsen_logrus/vendor/github.com/sirupsen/logrus \
+ spf13:afero:v1.2.2:spf13_afero/vendor/github.com/spf13/afero \
+ spf13:cast:v1.3.1:spf13_cast/vendor/github.com/spf13/cast \
+ spf13:cobra:v0.0.7:spf13_cobra/vendor/github.com/spf13/cobra \
+ spf13:jwalterweatherman:v1.1.0:spf13_jwalterweatherman/vendor/github.com/spf13/jwalterweatherman \
+ spf13:pflag:v1.0.5:spf13_pflag/vendor/github.com/spf13/pflag \
+ spf13:viper:v1.7.1:spf13_viper/vendor/github.com/spf13/viper \
+ stretchr:testify:v1.7.0:stretchr_testify/vendor/github.com/stretchr/testify \
+ subosito:gotenv:v1.2.0:subosito_gotenv/vendor/github.com/subosito/gotenv \
+ tomasen:fcgi_client:2bb3d819fd19:tomasen_fcgi_client/vendor/github.com/tomasen/fcgi_client
+
+PLIST_FILES= bin/${PORTNAME}
+USE_RC_SUBR= php_fpm_exporter
+
+.include <bsd.port.mk>
diff --git a/net-mgmt/php-fpm_exporter/distinfo b/net-mgmt/php-fpm_exporter/distinfo
new file mode 100644
index 000000000000..80066273fc9f
--- /dev/null
+++ b/net-mgmt/php-fpm_exporter/distinfo
@@ -0,0 +1,79 @@
+TIMESTAMP = 1633500017
+SHA256 (hipages-php-fpm_exporter-v2.0.3_GH0.tar.gz) = d3bba4e905d0720e3ee4b8b3857cecd659ac6a8ec7bad72a21f5f1f9b8f540f8
+SIZE (hipages-php-fpm_exporter-v2.0.3_GH0.tar.gz) = 54568
+SHA256 (beorn7-perks-v1.0.1_GH0.tar.gz) = 98db84bb0224a26094e6adba91b7ee7a1a7ace28cb648d818f8e779e6a19f825
+SIZE (beorn7-perks-v1.0.1_GH0.tar.gz) = 10867
+SHA256 (cespare-xxhash-v2.1.1_GH0.tar.gz) = 0ee31178d2c5a1249be4e26294a2f428008dc4e1ecbbfbe47f74e41026df1148
+SIZE (cespare-xxhash-v2.1.1_GH0.tar.gz) = 9292
+SHA256 (davecgh-go-spew-v1.1.1_GH0.tar.gz) = 7d82b9bb7291adbe7498fe946920ab3e7fc9e6cbfc3b2294693fad00bf0dd17e
+SIZE (davecgh-go-spew-v1.1.1_GH0.tar.gz) = 42152
+SHA256 (fatih-color-v1.9.0_GH0.tar.gz) = f5a6372ff7c87d22baaa2089e5cdd8a218fb3a9be047195c0ab421d5340f6f3f
+SIZE (fatih-color-v1.9.0_GH0.tar.gz) = 1230941
+SHA256 (fsnotify-fsnotify-v1.4.7_GH0.tar.gz) = b7530d973d0ab0e58ad8ce1b9a4b963d6f57b3d72f2f9e13d49846976361b1cd
+SIZE (fsnotify-fsnotify-v1.4.7_GH0.tar.gz) = 31139
+SHA256 (go-ini-ini-v1.52.0_GH0.tar.gz) = 56bce700d83c60ec5b27249fe7e18912f87f63a91d5e8d5cd07e2eb7823a300b
+SIZE (go-ini-ini-v1.52.0_GH0.tar.gz) = 44304
+SHA256 (go-yaml-yaml-9f266ea9e77c_GH0.tar.gz) = 63efc9aabcbb56b2c9469927784fd67ecb3a79720c4fa754c511335a04156d04
+SIZE (go-yaml-yaml-9f266ea9e77c_GH0.tar.gz) = 86898
+SHA256 (go-yaml-yaml-v2.3.0_GH0.tar.gz) = 42027002bf258009d498600b04b8c9cbb29d2193185ea7bfa8fefe194fe72a07
+SIZE (go-yaml-yaml-v2.3.0_GH0.tar.gz) = 72816
+SHA256 (golang-protobuf-v1.4.3_GH0.tar.gz) = 5736f943f8647362f5559689df6154f3c85d261fb088867c8a68494e2a767610
+SIZE (golang-protobuf-v1.4.3_GH0.tar.gz) = 171969
+SHA256 (golang-sys-68d13333faf2_GH0.tar.gz) = 5c3c90ba4825031c3b528655871fa23218c401f6f47ef097ce8e2c90e84f8d00
+SIZE (golang-sys-68d13333faf2_GH0.tar.gz) = 1217255
+SHA256 (golang-text-v0.3.2_GH0.tar.gz) = 0b9309698f5708531c5377ab1e29b423a6d9e20c55a8d386c3b8283428212f22
+SIZE (golang-text-v0.3.2_GH0.tar.gz) = 7168069
+SHA256 (gosuri-uitable-v0.0.4_GH0.tar.gz) = 7b496d0c8df70ef7ab546081174ad9994917bf4be49f0420079ecc3c66355875
+SIZE (gosuri-uitable-v0.0.4_GH0.tar.gz) = 7250
+SHA256 (hashicorp-hcl-v1.0.0_GH0.tar.gz) = 50632428210503070fd2fde748c88b7414bf84a6a0eadebf9d8e596a033bead2
+SIZE (hashicorp-hcl-v1.0.0_GH0.tar.gz) = 70658
+SHA256 (inconshreveable-mousetrap-v1.0.0_GH0.tar.gz) = 5edc7731c819c305623568e317aa253d342be3447def97f1fa9e10eb5ad819f6
+SIZE (inconshreveable-mousetrap-v1.0.0_GH0.tar.gz) = 2290
+SHA256 (magiconair-properties-v1.8.1_GH0.tar.gz) = 4449df3d2be86608bfc997228f66f1cff57bf620cc5bf9ba44339c7e4c5612dd
+SIZE (magiconair-properties-v1.8.1_GH0.tar.gz) = 29735
+SHA256 (mattn-go-colorable-v0.1.6_GH0.tar.gz) = e313129503025c383b5e69082fb1144e83a864d12ec45bb7a224d3fc4a635fbc
+SIZE (mattn-go-colorable-v0.1.6_GH0.tar.gz) = 9472
+SHA256 (mattn-go-isatty-v0.0.12_GH0.tar.gz) = addbdc341d7685ed4cc8d2d8a8fd2bd9b784bde00d0ea99fb251039fc10c611c
+SIZE (mattn-go-isatty-v0.0.12_GH0.tar.gz) = 4548
+SHA256 (mattn-go-runewidth-v0.0.8_GH0.tar.gz) = 7b1ae2393fe4b0ddc64b94aabf1d825c969aebe09f167751a009d5ed6836850e
+SIZE (mattn-go-runewidth-v0.0.8_GH0.tar.gz) = 16500
+SHA256 (matttproud-golang_protobuf_extensions-v1.0.1_GH0.tar.gz) = 2def0ee6f6b12b1efc0e3007d89f598608a072610e805c3655ea9d13c3ead49b
+SIZE (matttproud-golang_protobuf_extensions-v1.0.1_GH0.tar.gz) = 37184
+SHA256 (mitchellh-go-homedir-v1.1.0_GH0.tar.gz) = 646671c73a84a8dfb4a5a76b80c7b63549ffefa906524d45077301bc7da76600
+SIZE (mitchellh-go-homedir-v1.1.0_GH0.tar.gz) = 3362
+SHA256 (mitchellh-mapstructure-v1.1.2_GH0.tar.gz) = 53fbc06b125ff1c9c73a4eb1764346932671a29c67a45a92e2ebc6855635069b
+SIZE (mitchellh-mapstructure-v1.1.2_GH0.tar.gz) = 20980
+SHA256 (pelletier-go-toml-v1.6.0_GH0.tar.gz) = 25913c50b634b554980c8e8134558684b001850c1ed720910edf6a9dbc06da45
+SIZE (pelletier-go-toml-v1.6.0_GH0.tar.gz) = 82730
+SHA256 (pmezard-go-difflib-v1.0.0_GH0.tar.gz) = 28f3dc1b5c0efd61203ab07233f774740d3bf08da4d8153fb5310db6cea0ebda
+SIZE (pmezard-go-difflib-v1.0.0_GH0.tar.gz) = 11398
+SHA256 (prometheus-client_golang-v1.10.0_GH0.tar.gz) = e7305f84aa6553d9dd4bfd148d29289df36a9df82dae7be3c6eda62feb56f3d1
+SIZE (prometheus-client_golang-v1.10.0_GH0.tar.gz) = 176316
+SHA256 (prometheus-client_model-v0.2.0_GH0.tar.gz) = 4ab1be9cdfa702d7f49beeb09a256bcc6a2aad55e8a0a37e7732a46934264e12
+SIZE (prometheus-client_model-v0.2.0_GH0.tar.gz) = 10986
+SHA256 (prometheus-common-v0.18.0_GH0.tar.gz) = 64b0963add6f1945d8da40452d9bf796db263e4d8aba26cf17fdcc3f76b8f940
+SIZE (prometheus-common-v0.18.0_GH0.tar.gz) = 123693
+SHA256 (prometheus-procfs-v0.6.0_GH0.tar.gz) = 6ad7a23cf4db9fa5dbf2c5d8fbd0fbf5ffe48e3ddb7bf15f9359813d764ce73c
+SIZE (prometheus-procfs-v0.6.0_GH0.tar.gz) = 169898
+SHA256 (protocolbuffers-protobuf-go-v1.23.0_GH0.tar.gz) = e7266bedaa4f110216fce52ae533dc5eba475d3829bb0592e8876684e202ae1f
+SIZE (protocolbuffers-protobuf-go-v1.23.0_GH0.tar.gz) = 1214648
+SHA256 (sirupsen-logrus-v1.8.1_GH0.tar.gz) = e9492c08ac8f202b438ccfb992bf81b7860739cf8f2266958e0c574c7abfdd74
+SIZE (sirupsen-logrus-v1.8.1_GH0.tar.gz) = 47161
+SHA256 (spf13-afero-v1.2.2_GH0.tar.gz) = b577afca7e9839aa7cf0ddd712af553aec671b74f97fe0c88c63f911d1020570
+SIZE (spf13-afero-v1.2.2_GH0.tar.gz) = 46157
+SHA256 (spf13-cast-v1.3.1_GH0.tar.gz) = 4fa8d06903b490ae6f1316e55c5446d5648eea2b450671ebc54d4bbe79bc46b1
+SIZE (spf13-cast-v1.3.1_GH0.tar.gz) = 11102
+SHA256 (spf13-cobra-v0.0.7_GH0.tar.gz) = 6860862ec12d3414b820eb7d930aa8f47e07e0f4fc133e9bea63e554db56a7de
+SIZE (spf13-cobra-v0.0.7_GH0.tar.gz) = 117655
+SHA256 (spf13-jwalterweatherman-v1.1.0_GH0.tar.gz) = 4fd850a792c5738954c4801cf549d8d0bf53edd17139cd39d179aa5abf7ec68d
+SIZE (spf13-jwalterweatherman-v1.1.0_GH0.tar.gz) = 6871
+SHA256 (spf13-pflag-v1.0.5_GH0.tar.gz) = 9a2cae1f8e8ab0d2cc8ebe468e871af28d9ac0962cf0520999e3ba85f0c7b808
+SIZE (spf13-pflag-v1.0.5_GH0.tar.gz) = 50796
+SHA256 (spf13-viper-v1.7.1_GH0.tar.gz) = de85215b50e9fbb2cdf63b0aa9df826a866dff8f718ba2dc3f5866e98d5bd39a
+SIZE (spf13-viper-v1.7.1_GH0.tar.gz) = 82641
+SHA256 (stretchr-testify-v1.7.0_GH0.tar.gz) = 560c0984072cb436b17bbce5699b205d5aa2beb58ef7a94530d7724b5739a8d6
+SIZE (stretchr-testify-v1.7.0_GH0.tar.gz) = 91073
+SHA256 (subosito-gotenv-v1.2.0_GH0.tar.gz) = 5f6826992c11981018c77377f33dbc56d0be932e0d38a2f51e795c99725e7ba5
+SIZE (subosito-gotenv-v1.2.0_GH0.tar.gz) = 7359
+SHA256 (tomasen-fcgi_client-2bb3d819fd19_GH0.tar.gz) = 8ca824cbc5788ba3ee8e8bbc63f135a6f3d77a1f7173b796f2c6fc8903171641
+SIZE (tomasen-fcgi_client-2bb3d819fd19_GH0.tar.gz) = 8646
diff --git a/net-mgmt/php-fpm_exporter/files/php_fpm_exporter.in b/net-mgmt/php-fpm_exporter/files/php_fpm_exporter.in
new file mode 100644
index 000000000000..b866eb6dc8f6
--- /dev/null
+++ b/net-mgmt/php-fpm_exporter/files/php_fpm_exporter.in
@@ -0,0 +1,66 @@
+#!/bin/sh
+
+# PROVIDE: php_fpm_exporter
+# REQUIRE: LOGIN
+# KEYWORD: shutdown
+#
+# Add the following lines to /etc/rc.conf.local or /etc/rc.conf
+# to enable this service:
+#
+# php_fpm_exporter_enable (bool):
+# Set to NO by default.
+# Set it to YES to enable php_fpm_exporter.
+# php_fpm_exporter_user (string):
+# Set user that php_fpm_exporter will run under.
+# Default is "www".
+# php_fpm_exporter_group (string):
+# Set group that php_fpm_exporter will run under.
+# Default is "www".
+# php_fpm_exporter_args (string):
+# Set extra arguments to pass to php_fpm_exporter.
+# See https://github.com/hipages/php-fpm_exporter#usage for details.
+# Default is "".
+# php_fpm_exporter_scrape_uri (string):
+# Set FastCGI address, e.g. "unix:///var/run/php-fpm.sock;/status".
+# Default is "tcp://127.0.0.1:9000/status".
+
+. /etc/rc.subr
+
+name=php_fpm_exporter
+rcvar=php_fpm_exporter_enable
+start_cmd="${name}_start"
+start_precmd=php_fpm_exporter_startprecmd
+pidfile="/var/run/${name}.pid"
+
+load_rc_config $name
+
+: ${php_fpm_exporter_enable:="NO"}
+: ${php_fpm_exporter_user:="www"}
+: ${php_fpm_exporter_group:="www"}
+: ${php_fpm_exporter_args:=""}
+: ${php_fpm_exporter_scrape_uri:="tcp://127.0.0.1:9000/status"}
+
+command="/usr/sbin/daemon"
+procname="/usr/local/bin/php-fpm_exporter"
+command_args="-f -T ${name} -p ${pidfile} \
+ /usr/bin/env ${procname} server \
+ --phpfpm.scrape-uri \"${php_fpm_exporter_scrape_uri}\" \
+ ${php_fpm_exporter_args}"
+
+php_fpm_exporter_startprecmd()
+{
+ if [ ! -e ${pidfile} ]; then
+ install \
+ -o ${php_fpm_exporter_user} \
+ -g ${php_fpm_exporter_group} \
+ -m 0644 \
+ /dev/null ${pidfile};
+ fi
+}
+
+php_fpm_exporter_start()
+{
+ limits -C daemon su -m www -c "${command} ${command_args}"
+}
+
+run_rc_command "$1"
diff --git a/net-mgmt/php-fpm_exporter/pkg-descr b/net-mgmt/php-fpm_exporter/pkg-descr
new file mode 100644
index 000000000000..da1641afc6ff
--- /dev/null
+++ b/net-mgmt/php-fpm_exporter/pkg-descr
@@ -0,0 +1,4 @@
+A prometheus exporter for PHP-FPM. The exporter connects directly to PHP-FPM
+over FastCGI and exports the metrics via HTTP.
+
+WWW: https://github.com/hipages/php-fpm_exporter