Skip to content

How I can have a healthcheck command to test if connectivity to db and external services (redis,elasticsearch) work?

In my magento setup I want to be able to check whether magento is able to connect into the specified services such as db etc etc…

Is there a command similar like:

php bin/magento healthcheck

That will output something like:

Connecting to Mysql database localhost:34567 ..... [OK]
Connecting to Elasticsearch  localhost:9200 .....  [OK]
...

So I can diagnose issues with my magento setup.