HealthController
class HealthController (View source)
Unauthenticated readiness probe reporting whether Poweradmin can reach its own dependencies. Disabled by default.
Deliberately does not extend BaseController: that constructor connects to the database unconditionally (Kernel::controllerEnvironment()), so a dead database would escape as a generic 500 instead of being reported here as a failed check.
The body carries no version, host, driver or error text. Anyone can call this, so a check either passed or it did not.
Constants
| private STATUS_OK |
|
| private STATUS_DOWN |
|
| private STATUS_SKIPPED |
|
| private STATUS_ERROR |
|
| private NO_STORE |
|
Methods
Overridable so tests can substitute settings without a boot context.
The kernel's logger, built from configuration alone so it works while the database is down. Honours logging.type, which is 'null' by default: an operator who turned diagnostic logging off does not get a line per scrape.
No description
No description
No description
Per-installation file in the system temp directory, so concurrent probes share one result.
Opening the connection is the check; the trailing query catches a socket that connected but cannot serve statements.
Reports 'skipped' when no PowerDNS API is configured, which is normal for database-backend installs and never fails the overall status.
Details
__construct(BootContext $context)
No description
protected ConfigurationInterface
config()
Overridable so tests can substitute settings without a boot context.
protected LoggerInterface
logger()
The kernel's logger, built from configuration alone so it works while the database is down. Honours logging.type, which is 'null' by default: an operator who turned diagnostic logging off does not get a line per scrape.
void
run()
No description
JsonResponse
buildResponse()
No description
protected string|null
submittedToken()
No description
protected string
cacheFile()
Per-installation file in the system temp directory, so concurrent probes share one result.
protected string
checkDatabase()
Opening the connection is the check; the trailing query catches a socket that connected but cannot serve statements.
protected string
checkPowerdnsApi()
Reports 'skipped' when no PowerDNS API is configured, which is normal for database-backend installs and never fails the overall status.