Skip to content

Reference

phil/monitoring-bundle

Classes

ClassRole
Phil\MonitoringBundle\PhilMonitoringBundleThe bundle and its configuration; HEALTH_CHECK_TAG
…\Domain\Status\HealthStatusUp, Degraded, Down; worst(), isAvailable()
…\Domain\Status\HeartbeatStateOnTime, Late, Never
…\Domain\ValueObject\NameThe rule of the names of checks and tasks; PATTERN, check()
…\Domain\ValueObject\CheckOutcomeA status and a summary of one line; up(), degraded(), down(), SUMMARY_LENGTH
…\Domain\ValueObject\CheckResultA check as it ran: name, outcome, durationMilliseconds, status()
…\Domain\ValueObject\HealthReportA round of checks: results, checkedAt, status()
…\Domain\ValueObject\ExpectedTaskA declared task: name, periodSeconds, graceSeconds, dueBy(), stateAt()
…\Domain\ValueObject\HeartbeatStatusA task as it stands: task, state, lastBeatAt, dueBy, lateSince()
…\Domain\ValueObject\MaintenanceStatesince, retryAfterSeconds
…\Domain\Contract\HealthCheckA check: name(), check()
…\Domain\Contract\HeartbeatStoreThe store of the beats
…\Domain\Contract\MaintenanceStoreThe store of the maintenance mode
…\Domain\Exception\MonitoringException, InvalidValueEvery exception of the bundle; a value refused
…\Application\Contract\MonitoringStatusThe read model for another bundle
…\Application\Contract\HeartbeatTaskA scheduled message that beats a task
…\Application\HealthCheckerRuns and times the checks: report()
…\Application\Heartbeatsbeat(), statuses()
…\Application\DeadManSwitchwatch(): the tasks alerted by a round; LOCK_PREFIX, the prefix of the name of the lock of a task
…\Application\Maintenanceenable(), disable(), current()
…\Application\MonitoringThe implementation of MonitoringStatus
…\Application\Message\WatchHeartbeatsThe message of a round of the switch
…\Application\Check\HeartbeatsCheckThe tasks as a check; NAME
…\Application\Queue\Queuesoverview(), failureTransports(), isFailureTransport(), failed(), retry(), remove()
…\Application\Queue\QueueSummary, FailedMessageA transport, a failed message, as the page shows them
…\Infrastructure\Check\DatabaseCheck, CachePoolCheck, MessengerTransportCheck, FilesystemCheck, FlysystemCheckThe checks of the configuration
…\Infrastructure\Store\CacheHeartbeatStoreThe beats in a PSR-6 pool, under KEY_PREFIX
…\Infrastructure\Store\FileMaintenanceStore, CacheMaintenanceStore, MaintenanceRecordThe maintenance as a flag file or a key, and their shared record
…\Infrastructure\Http\HealthControllerlive(), ready(), details(); the route names
…\Infrastructure\Http\MaintenanceListenerThe 503 of the maintenance mode
…\Infrastructure\Http\QueuesControllerindex(), retry(), remove(); the route names and CSRF_TOKEN_ID
…\Infrastructure\Console\HealthCommand, HeartbeatCommand, WatchCommand, MaintenanceCommandThe commands
…\Infrastructure\Scheduler\HeartbeatOnScheduledRunThe beat of a scheduled message
…\Infrastructure\Messenger\WatchHeartbeatsHandlerThe handler of WatchHeartbeats
…\Infrastructure\DependencyInjection\MonitoringServices, MonitoringPassThe services of the configuration; the transports of the queues

Services and tag

IdRegistered whenWhat it is
Phil\MonitoringBundle\Application\Contract\MonitoringStatusalwaysThe read model, public
…\Application\HealthChecker, Heartbeats, DeadManSwitch, MaintenancealwaysThe services to inject
…\Domain\Contract\HeartbeatStorealwaysAlias of CacheHeartbeatStore, or of heartbeats.store
…\Domain\Contract\MaintenanceStorealwaysAlias of the store maintenance.store chooses
phil_monitoring.check.<name>a check is configuredOne check of the configuration
…\Application\Check\HeartbeatsChecka task is declaredThe tasks as a check
…\Infrastructure\Http\MaintenanceListeneralwaysOn kernel.request, after the router and the firewall
…\Infrastructure\Scheduler\HeartbeatOnScheduledRunScheduler is installedOn PostRunEvent
…\Infrastructure\Messenger\WatchHeartbeatsHandleralwaysHandles WatchHeartbeats
…\Application\Queue\Queuesqueues.enabled and a Messenger busThe queues
…\Infrastructure\Http\QueuesControllerthe queues, Twig, the router, the authorization checker and the CSRF token managerThe page of the queues
tag phil_monitoring.health_checkalwaysThe checks; given by autoconfiguration to every HealthCheck

Routes

NameFileMethod and path
phil_monitoring_liveconfig/routes/health.phpGET /live
phil_monitoring_readyconfig/routes/health.phpGET /ready
phil_monitoring_detailsconfig/routes/health.phpGET /details
phil_monitoring_queuesconfig/routes/queues.phpGET /
phil_monitoring_queues_retryconfig/routes/queues.phpPOST /{transport}/{id}/retry
phil_monitoring_queues_removeconfig/routes/queues.phpPOST /{transport}/{id}/remove

Commands

CommandWhat it does
phil:monitoring:healthRuns the checks; fails while one is down
phil:monitoring:heartbeat <task>Beats a task; fails for a task not declared
phil:monitoring:watchRuns a round of the dead-man switch; fails while a task is late
phil:monitoring:maintenance [enable|disable|status] [--retry-after=N]Enables, disables or shows the maintenance mode

Templates

TemplateWhat it is
@PhilMonitoring/maintenance.html.twigThe maintenance page, standing alone; variable maintenance
@PhilMonitoring/queues.html.twigThe page of the queues; extends layout
@PhilMonitoring/layout.html.twigA plain layout with the blocks title and content