System Snapshot Variables
Global Variables
In addition to the variables listed below, Event and People Variables are also available.
When a notification is produced by a System Snapshot, all relevant data can be found in report.
Craft Variables
| Variable | Type | Description |
|---|---|---|
report.craft.version | string | The running Craft version. |
report.craft.edition | string | The running edition (Solo / Pro). |
report.craft.systemName | string | The system name. |
report.craft.schemaVersion | string | The Craft schema version. |
report.craft.live | bool | Whether the system is live. |
report.craft.maintenanceMode | bool | Whether maintenance mode is on. |
report.craft.devMode | bool | Whether Dev Mode is on. |
report.craft.licensed | bool | Whether the running edition is licensed. |
report.craft.licensedEdition | string|null | The licensed edition, if it differs. |
report.craft.update.available | bool | Whether a Craft update is available. |
report.craft.update.latest | string|null | The latest available Craft version. |
report.craft.update.critical | bool | Whether a critical Craft update is available. |
report.craft.update.refreshedAt | DateTime|null | When the update data was compiled. |
report.craft.update.refreshFailed | bool | Whether this compile's fresh check failed. |
Plugin Variables
Each installed plugin has these variables:
| Variable | Type | Description |
|---|---|---|
report.plugins.<handle>.name | string | The plugin's name. |
report.plugins.<handle>.handle | string | The plugin's handle. |
report.plugins.<handle>.packageName | string | The plugin's Composer package name. |
report.plugins.<handle>.version | string | The installed version. |
report.plugins.<handle>.edition | string|null | The plugin's edition, if any. |
report.plugins.<handle>.license | string | The license status (valid, invalid, etc.). |
report.plugins.<handle>.update.available | bool | Whether a plugin update is available. |
report.plugins.<handle>.update.latest | string|null | The latest available version. |
report.plugins.<handle>.update.critical | bool | Whether a critical update is available. |
report.plugins.<handle>.update.abandoned | bool | Whether the plugin is marked abandoned. |
Site Variables
Each site has these variables:
| Variable | Type | Description |
|---|---|---|
report.sites.<handle>.id | int | The site's ID. |
report.sites.<handle>.handle | string | The site's handle. |
report.sites.<handle>.name | string | The site's name. |
report.sites.<handle>.url | string | The site's base URL. |
report.sites.<handle>.language | string | The site's language. |
report.sites.<handle>.primary | bool | Whether this is the primary site. |
System Variables
| Variable | Type | Description |
|---|---|---|
report.system.php | string | The PHP version. |
report.system.os | string | The operating system and version. |
report.system.db | string | The database driver and version. |
Queue Variables
| Variable | Type | Description |
|---|---|---|
report.queue.pending | int | Jobs queued but not yet executed. |
report.queue.failed | int | Jobs that exhausted their retries. |
report.queue.delayed | int | Jobs scheduled for future execution. |
Examples
A weekly digest of the install
twig
Weekly snapshot of {{ report.craft.systemName }}
Craft {{ report.craft.version }} ({{ report.craft.edition }})
PHP {{ report.system.php }} on {{ report.system.os }}
Database: {{ report.system.db }}
{% if report.craft.update.available %}
Craft update available: {{ report.craft.update.latest }}
{% endif %}List Craft and every plugin with its available update
twig
- Craft {{ report.craft.version }} {{ report.craft.update.available ? "→ #{report.craft.update.latest}" }}
{% for plugin in report.plugins %}
- {{ plugin.name }} {{ plugin.version }} {{ plugin.update.available ? "→ #{plugin.update.latest}" }}
{% endfor %}Warn only when a critical update lands
twig
{% set critical = report.craft.update.critical %}
{% for handle, plugin in report.plugins %}
{% if plugin.update.critical %}{% set critical = true %}{% endif %}
{% endfor %}
{% if not critical %}
{% skipMessage "No critical updates at this time." %}
{% endif %}
A critical update is available. Review the dashboard as soon as possible.Alert when the queue is stuck
twig
{% if report.queue.failed == 0 %}
{% skipMessage "Queue is healthy." %}
{% endif %}
⚠️ {{ report.queue.failed }} failed job(s) in the queue on {{ report.craft.systemName }}.Alert when the system goes offline
twig
{% if report.craft.live %}
{% skipMessage "System is live." %}
{% endif %}
⚠️ {{ report.craft.systemName }} is currently offline.