Skip to content

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

VariableTypeDescription
report.craft.versionstringThe running Craft version.
report.craft.editionstringThe running edition (Solo / Pro).
report.craft.systemNamestringThe system name.
report.craft.schemaVersionstringThe Craft schema version.
report.craft.liveboolWhether the system is live.
report.craft.maintenanceModeboolWhether maintenance mode is on.
report.craft.devModeboolWhether Dev Mode is on.
report.craft.licensedboolWhether the running edition is licensed.
report.craft.licensedEditionstring|nullThe licensed edition, if it differs.
report.craft.update.availableboolWhether a Craft update is available.
report.craft.update.lateststring|nullThe latest available Craft version.
report.craft.update.criticalboolWhether a critical Craft update is available.
report.craft.update.refreshedAtDateTime|nullWhen the update data was compiled.
report.craft.update.refreshFailedboolWhether this compile's fresh check failed.

Plugin Variables

Each installed plugin has these variables:

VariableTypeDescription
report.plugins.<handle>.namestringThe plugin's name.
report.plugins.<handle>.handlestringThe plugin's handle.
report.plugins.<handle>.packageNamestringThe plugin's Composer package name.
report.plugins.<handle>.versionstringThe installed version.
report.plugins.<handle>.editionstring|nullThe plugin's edition, if any.
report.plugins.<handle>.licensestringThe license status (valid, invalid, etc.).
report.plugins.<handle>.update.availableboolWhether a plugin update is available.
report.plugins.<handle>.update.lateststring|nullThe latest available version.
report.plugins.<handle>.update.criticalboolWhether a critical update is available.
report.plugins.<handle>.update.abandonedboolWhether the plugin is marked abandoned.

Site Variables

Each site has these variables:

VariableTypeDescription
report.sites.<handle>.idintThe site's ID.
report.sites.<handle>.handlestringThe site's handle.
report.sites.<handle>.namestringThe site's name.
report.sites.<handle>.urlstringThe site's base URL.
report.sites.<handle>.languagestringThe site's language.
report.sites.<handle>.primaryboolWhether this is the primary site.

System Variables

VariableTypeDescription
report.system.phpstringThe PHP version.
report.system.osstringThe operating system and version.
report.system.dbstringThe database driver and version.

Queue Variables

VariableTypeDescription
report.queue.pendingintJobs queued but not yet executed.
report.queue.failedintJobs that exhausted their retries.
report.queue.delayedintJobs 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.