wp-redis icon indicating copy to clipboard operation
wp-redis copied to clipboard

Add basic info to WordPress' health check screen

Open dsXLII opened this issue 2 years ago • 8 comments

Since there's a wp-cli command to display some basic Redis info, why not make it available in WordPress' own health check interface?

This is the "I banged it out in like half an hour" version, feel free to completely rewrite it, put this code somewhere else. Think of it as a starting point more than anything else.

dsXLII avatar May 06 '22 21:05 dsXLII

Thanks! I think this is an important feature even for Pantheon users.

mwt avatar Jun 19 '22 02:06 mwt

This code apparently has some problems when connecting to a Redis 6 instance. I'm doing some digging into it as this would be helpful to have somewhere in the Dashboard.

timnolte avatar Jun 24 '22 18:06 timnolte

Actually, I was having issues locally with the Redis 6 Docker image and I determined that I needed to set the password in the redis.conf and have it matching in the plugin setup. Then it worked.

timnolte avatar Jun 24 '22 18:06 timnolte

Resurrecting this. Tracking internally as CMSP-344. Tentatively looks good but since Behat tests are failing, I'd like to pull it down and test it before we merge.

jazzsequence avatar Apr 05 '23 21:04 jazzsequence

Just noting that I created a MU Plugin for our agency to use on our sites to provide site health for Redis when using this plugin. https://gist.github.com/timnolte/d295f24457698f65f00d301074494394

timnolte avatar Jun 05 '23 15:06 timnolte

Thanks for sharing the gist @timnolte!

jazzsequence avatar Jun 05 '23 15:06 jazzsequence

It would be nice if the wp_redis_get_info() function also included the following in it's output.

		'redis_version'     => $info['redis_version'],
		'redis_mode'        => $info['redis_mode'],
		'maxclients'        => $info['maxclients'],
		'connected_clients' => $info['connected_clients'],

timnolte avatar Jun 13 '23 19:06 timnolte

Just noting that I created a MU Plugin for our agency to use on our sites to provide site health for Redis when using this plugin. https://gist.github.com/timnolte/d295f24457698f65f00d301074494394

I've updated this Gist to leverage some better error handling as well as incorporate changes in a patch to 1.4.2 I made here(https://gist.github.com/timnolte/267e2a502f05156c0fe2a0d7028c2854) that includes the redis_version, redis_mode, maxclients, and connected_clients attributes.

timnolte avatar Jun 14 '23 01:06 timnolte