Skip to content

Commit

Permalink
Removes PHP-FPM metrics exporter
Browse files Browse the repository at this point in the history
  • Loading branch information
Tawmu committed Apr 25, 2023
1 parent 50a72fa commit a5d2aa0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
5 changes: 3 additions & 2 deletions phpfpm/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down
8 changes: 5 additions & 3 deletions phpfpm/rootfs/etc/services.d/metrics/run
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit a5d2aa0

Please sign in to comment.