Create Sensors in the Workspace ONE UEM console to track specific device attributes such as remaining battery, specific version or build information, or average CPU usage. Each sensor includes a script of code to collect the desired data. You can upload these scripts or enter them directly into the console.

Sensors can use Bash, Python 3, or Zsh scripts to gather attribute values. You must create these scripts yourself either before creating a sensor or during configuration in the scripting window.

Each script contains only one sensor. If a script returns multiple values, VMware Workspace ONE Intelligence and Workspace ONE UEM reads the entire output as one value. If a script returns a null value, VMware Workspace ONE Intelligence and Workspace ONE UEM do not report the sensor.

Prerequisites:

If you want to view Sensors for multiple devices and interact with the data in reports and dashboards, you must opt into VMware Workspace ONE Intelligence. If you want to view Sensors data for a single device, you do not need VMware Workspace ONE Intelligence. Go to the device's Device Details page and select the Sensors tab to view the data.

The configuration Device State must be enabled in your data center so that Workspace ONE UEM can display Sensors data for devices on the Sensors tab. Workspace ONE UEM enables this configuration for SaaS customers.

Procedure

  1. In the Workspace ONE UEM console, navigate to Resources > Sensors.
  2. On the Sensors page, click Add and select macOS.
  3. In the New Sensor page, navigate to General > Name and enter the following:

    Setting

    Description

    Name

    Enter the name of the sensor. The name must start with a lowercase letter followed by alpha-numeric characters and underscores. The name must be between 2 and 64 characters.

    Description

    Enter the description of the sensor.

  4. Click Next.
  5. Configure the sensor settings in the Details tab.

    Setting

    Description

    Language Select the language. Select either Python 3, Bash, or Zsh.
    Excecution Context Select either System or Current User. This settings control whether the script for the sensor runs on a user or system context.
    Response Data Type Select the type of response to the script for the sensor. You can choose between:
    • String
    • Integer
    • Boolean
    • Date Time
    Code Upload a script for the sensor or write your own in the text box provided.
  6. Click Next.
  7. In the Variables tab, you can optionally define variable names and values to use in your Sensor script. These variables are securely stored, encrypted at-rest, and only used temporarily during script execution in the scripting environment.

    Variables support static text or UEM lookup values. The lookup values are resolved before being delivered to the device for execution.

    Bash/Zsh scripts can reference the variables directly by name from the environment like $myvariable. Python 3 scripts can reference the variables by importing the os module and then using os.getenv('myvariable').

  8. Click Save or Save and Assign.

    You can save the sensors information and go back to menu or can move to the Assignment page to add sensors to a smart group.

What to do next

To add a sensor to a smart group, perform the following steps:

  1. In the New Assignment page, enter the Assignment Name and Select Smart Group. Click Next
  2. In the Deployment page, configure the Triggers settings. Select any trigger.

    Trigger

    Description

    Periodically Run the script periodically based on the Intelligent Hub Sample schedule.
    Login Run the script at login.
    Logout Run the script at logout.
    Startup Run the script at startup.
    User Switch Run the script after the macOS user login via fast user switching.
  3. Click Save.

After the assignment group is saved, you can prioritize the assignments if multiple smart groups are configured with potentially overlapping sets of devices. Once this step is done, devices with Intelligent Hub installed will receive the Sensor configurations on the next check-in. Intelligent Hub will then run the Sensor and report the data back to Workspace ONE UEM.