From a5d2aa09db894fb70def77cde6bdeeb0a9d2574d Mon Sep 17 00:00:00 2001 From: Tawmu Date: Tue, 25 Apr 2023 08:27:54 +0100 Subject: [PATCH] Removes PHP-FPM metrics exporter --- phpfpm/Dockerfile | 5 +++-- phpfpm/rootfs/etc/services.d/metrics/run | 8 +++++--- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/phpfpm/Dockerfile b/phpfpm/Dockerfile index a22c9bd..dc9afbd 100644 --- a/phpfpm/Dockerfile +++ b/phpfpm/Dockerfile @@ -42,8 +42,9 @@ RUN apt-get update \ && apt-get update \ && apt-get install -y ${PHP_PACKAGES} && rm -rf /var/lib/apt/lists/* \ ## Adds in PHP-FPM Prometheus metrics scraper - && curl -L "$METRICS_URL" --output /usr/local/bin/php-fpm_exporter \ - && chmod +x /usr/local/bin/php-fpm_exporter \ + ## TODO: Disabled April 2023 until we actually use PHP metrics for something meaningful. + ## && curl -L "$METRICS_URL" --output /usr/local/bin/php-fpm_exporter \ + ## && chmod +x /usr/local/bin/php-fpm_exporter \ ## Add PHP-FPM Health check script && curl "$HEALTHCHECK_URL" --output /usr/local/bin/php-fpm-healthcheck \ && chmod +x /usr/local/bin/php-fpm-healthcheck \ diff --git a/phpfpm/rootfs/etc/services.d/metrics/run b/phpfpm/rootfs/etc/services.d/metrics/run index eee5b38..509ab23 100644 --- a/phpfpm/rootfs/etc/services.d/metrics/run +++ b/phpfpm/rootfs/etc/services.d/metrics/run @@ -1,5 +1,7 @@ #!/usr/bin/with-contenv bash -if [ ! "$ROLE" == "CRON" ] || [ ! "$ROLE" == "WORKER" ]; then - /usr/local/bin/php-fpm_exporter server --phpfpm.fix-process-count --phpfpm.scrape-uri=tcp://127.0.0.1:9000/status -fi +# TODO: Disabled April 2023 since we're not currently using PHP metrics anywhere and there's a golang CVE. + +#if [ ! "$ROLE" == "CRON" ] || [ ! "$ROLE" == "WORKER" ]; then +# /usr/local/bin/php-fpm_exporter server --phpfpm.fix-process-count --phpfpm.scrape-uri=tcp://127.0.0.1:9000/status +#fi