renatomefi / php-fpm-healthcheck

A POSIX compliant sh script to healthcheck PHP fpm status, can be used only for pinging or check for specific metrics
MIT License
491 stars 55 forks source link

Fix check for broken fpm-status page #46

Open blodan opened 3 years ago

blodan commented 3 years ago

Context

This fix catches all different versions of output that can happen for a non-existing fpm status page.

For example for the php-fpm 7.4 alpine image only "Primary script unknown" is returned. Not sure if this is due to different php versions or if it's always been this way.

I've also noticed that Kubernetes readiness + liveness probes does not catch the output when sent to stderr so you might want to consider removing >&2 from error messages. We are running without them internally and that works great with Kubernetes.

Changes

wandersonwhcr commented 2 years ago

Hello @blodan, sorry for the delay.

Do you have any idea how can we implement TDD in this case?