Skip to main content

System Variables

Built-in variables that expose device and group context in any automation or script that supports variable rendering.

Introduction

System variables are built-in variables available in every automation and script — no setup required. They expose live device and group metadata at run time: hostname, IP addresses, group name, tags, and more.

Use them anywhere variable rendering is supported: script actions, shell commands, notification messages, HTTP requests, or custom field values. You can also compare them directly in a condition on an action or an event-based trigger.


System Variables

All system variables use the level_ prefix. Each one has a type, which determines the comparisons available when you use it in a condition.

Variable

Type

Description

level_time

Date and time

Current time in ISO 8601 format

level_device_id

Text

Internal unique identifier for the device

level_device_hostname

Text

The hostname of the device

level_device_nickname

Text

The custom nickname assigned to the device

level_device_public_ip_address

Text

The device’s external IP address

level_device_private_ip_addresses

Text

Comma-separated list of internal IP addresses

level_device_architecture

Text

Device CPU architecture

level_device_cpu_cores

Number

Number of CPU cores

level_device_memory

Number

Total memory in raw bytes

level_device_memory_formatted

Text

Total memory, human-readable (e.g. 16 GB)

level_device_os

Text

Operating system name

level_device_os_version

Text

OS version string

level_device_manufacturer

Text

Hardware manufacturer reported by the device (e.g. Dell Inc.)

level_device_model

Text

Hardware model reported by the device (e.g. OptiPlex 7090)

level_device_last_boot_at

Date and time

Last reboot time in ISO 8601 format

level_device_last_seen_at

Date and time

Last seen time in ISO 8601 format

level_device_first_seen_at

Date and time

Time the device was first added to Level, in ISO 8601 format

level_device_online

True or false

Whether the device is currently online: true or false

level_device_maintenance_mode

True or false

Whether the device is currently in maintenance mode: true or false

level_device_restart_required

True or false

Whether the device is waiting on a restart: true or false

level_group_id

Text

ID of the group the device belongs to

level_group_name

Text

Name of the group the device belongs to

level_group_path

Text

Full path of the group (e.g. HQ / Servers)

level_tag_names

Text

Comma-separated list of tag names applied to the device

level_tag_ids

Text

Comma-separated list of tag IDs applied to the device

ℹ️ NOTE: The three yes/no variables (level_device_online, level_device_maintenance_mode, level_device_restart_required) render as the text true or false, so compare them as strings in your scripts. Variables the device hasn’t reported yet, such as level_device_manufacturer on a machine with no hardware inventory, render as an empty string.


Using System Variables

Open an automation or script and select Variables, then select the System tab to browse the built-in variables available in Level. Search by variable name or description, or filter the list by type. The table shows each variable's reference, description, type, and an example value. System variables are read-only and do not need to be created before use.

System Variables tab with search, type filter, and variable reference columns

To insert a system variable into an action, click the variable icon in any field that supports variable rendering and select from the list. System variables appear alongside any automation variables defined for that automation.

To reference a variable in a script directly, use the {{variable_name}} syntax:

echo "Running on {{level_device_hostname}} in {{level_group_path}}"

💡 TIP:level_group_path is useful for scripts that need to behave differently based on where a device sits in your group hierarchy — without needing a separate automation per group.


Using System Variables in Conditions

System variables are also a condition type. Add a condition, choose System variable, pick the variable, then set the comparison and value. In the condition builder the variables are listed under plain-language names, so level_device_restart_required appears as Device restart required.

The variable’s type controls what you get:

  • Text: Contains, Does not contain, Equal to, Not equal to

  • True or false: Equal to, Not equal to, with a True / False picker

  • Number: Equal to, Not equal to, Greater than, Less than, Greater than or equal to, Less than or equal to

  • Date and time: Greater than, Less than, Greater than or equal to, Less than or equal to, with a date and time picker

System variable conditions work on every action, and on the event-based triggers (New device detected, Device enters group, Device leaves group, Custom field changed, Tag applied, Tag removed). For full details, see Action Conditions and Trigger Conditions.

💡 TIP: Compare on level_device_memory rather than level_device_memory_formatted. The raw byte value is a number, so it supports greater than and less than, while the formatted value is text.


FAQ

  • Do I need to define system variables before using them? No. System variables are always available in every automation and script. Open Variables and select the System tab to search the read-only reference.

  • What if a device doesn’t have a nickname?level_device_nickname returns an empty string if no nickname has been set. Use level_device_hostname as a fallback if you need a value that’s always present.

  • Can I use system variables in action conditions? Yes. There’s a dedicated System variable condition type on actions and on event-based triggers, with the comparisons matched to the variable’s type. You can also reference system variables inside any field that supports variable rendering, including condition values.

  • How current are system variable values? They come from the device’s record in Level, which updates when the device reports in. A value such as level_device_restart_required can be a few minutes behind the device itself.

Did this answer your question?