Skip to content
Release: Australia · Updated: 2026-03-12 · Official documentation · View source

DEX policies for macOS

Policies for macOS are guidelines and rules to promote that the application is used in a consistent, secure, and conforming manner. DEX policies your organization to reduce the risk of data breaches, improve data quality and accuracy, and optimize application performance and availability.

For macOS systems, to retrieve the entire data, include the subsequent content to /private/etc/sudoers.d/_servicenow.

# ServiceNow Agent Collector - Sudoers Configuration for macOS

# Command alias for ServiceNow allowed commands
# These commands can be executed by the _servicenow user with sudo privileges
Cmnd_Alias SN_ALLOWED = /usr/bin/powermetrics, \
                        /usr/bin/mdls, \
                        /usr/bin/log, \
                        /usr/bin/log show *, \
                        /bin/kill, \
                        /usr/bin/defaults, \
                        /usr/local/bin/jamf, \
                        /bin/rm, \
                        /bin/ls, \
                        /usr/bin/pgrep, \
                        /usr/bin/find, \
                        /usr/bin/pmset, \
                        /usr/bin/open, \
                        /Library/Application\ Support/servicenow/agent-client-collector/cache/acc-dex-modules/bin/scripts/sudo/app_freeze.sh, \
                        /Library/Application\ Support/servicenow/agent-client-collector/cache/acc-dex-modules/bin/scripts/sudo/zscaler_zpa_reconnect.sh, \
                        /Library/Application\ Support/servicenow/agent-client-collector/cache/acc-dex-modules/bin/scripts/sudo/clear_google_chrome_browsing_data.sh, \
                        /Library/Application\ Support/servicenow/agent-client-collector/cache/acc-dex-modules/bin/scripts/sudo/services.sh, \
                        /Library/Application\ Support/servicenow/agent-client-collector/cache/acc-dex-modules/bin/scripts/sudo/restart_service.sh *, \
                        /Applications/Zscaler/Zscaler.app/Contents/PlugIns/zscli, \
                        /Library/Application\ Support/servicenow/agent-client-collector/cache/acc-dex-modules/bin/scripts/sudo/elevate_temporary_admin.sh

# ServiceNow user permissions
# _servicenow user can run osqueryi and all SN_ALLOWED commands without password
# SETENV allows environment variables to be preserved
_servicenow ALL=NOPASSWD: SETENV: /Library/Application\ Support/servicenow/agent-client-collector/cache/osquery/bin/osqueryi *, SN_ALLOWED

# Defaults for _servicenow user
# !requiretty: Allow sudo without a TTY (required for automated scripts)
Defaults:_servicenow !requiretty
Cmnd_Alias SN_ALLOWED = /usr/bin/powermetrics, /usr/bin/mdls, /usr/bin/log, /bin/kill, /usr/bin/defaults, /usr/local/bin/jamf, /bin/rm, /bin/ls, /usr/bin/pgrep, /usr/bin/find, /usr/bin/pmset, /usr/bin/open, /Library/Application\ Support/servicenow/agent-client-collector/cache/acc-dex-modules/bin/scripts/sudo/app_freeze.sh, /Library/Application\ Support/servicenow/agent-client-collector/cache/acc-dex-modules/bin/scripts/sudo/zscaler_zpa_reconnect.sh, /Library/Application\ Support/servicenow/agent-client-collector/cache/acc-dex-modules/bin/scripts/sudo/clear_google_chrome_browsing_data.sh, /bin/sh /Library/Application\ Support/servicenow/agent-client-collector/cache/acc-dex-modules/bin/scripts/sudo/services.sh, /bin/sh /Library/Application\ Support/servicenow/agent-client-collector/cache/acc-dex-modules/bin/scripts/sudo/restart_service.sh *, /Applications/Zscaler/Zscaler.app/Contents/PlugIns/zscli, /Library/Application\ Support/servicenow/agent-client-collector/cache/acc-dex-modules/bin/scripts/sudo/elevate_temporary_admin.sh
_servicenow ALL=NOPASSWD: SETENV: /Library/Application\ Support/servicenow/agent-client-collector/cache/osquery/bin/osqueryi *, SN_ALLOWED

Defaults:_servicenow !requiretty
Defaults timestamp_timeout=0
Defaults log_allowed

Note: The historical data for an application or device is the information that is kept in the MetricBase database for the past 7 days, while the latest data pertains to the most recent information available.

Policies for Mac — Application

DEX provides the following policies for applications.

Policy nameDescriptionCheck instancesFrequencyHistorical or latestCheck instance parameters
DEX Mac Apps MetricsCollects the application metrics in the Mac device and sends metric data to Metric Base.os.mac.check-app-historical5 minsHistoricalcpu_usage, memory_usage, uptime, io_usage_read, io_usage_write, is_running, last_access_time, crashes

Policies for Mac — Device

DEX provides the following policies for devices.

Policy nameDescriptionCheck instancesFrequencyHistorical or latestCheck instance parameters
DEX Mac Device MetricsCollects macOS device metrics and sends the metric data to the ServiceNow instance.os.mac.check-system-metrics-latest24 hoursLatestuptime, logged\_in, firewall\_enabled, session\_details, disk\_details, os\_details, cpu\_details, battery\_details, device\_details, network\_details, pending\_updates, device\_events, cpu\_usage, memory\_details, os\_setup\_details, last\_access\_time, reboot\_details
DEX Mac Device MetricsCollects macOS device metrics and sends the metric data to MetricBase.os.mac.check-system-metrics-historical5 minsHistoricaldisk\_usage, io\_usage\_write, io\_usage\_read, power\_consumption, cpu\_usage, memory\_details, uptime, crashes, battery\_charge\_percentage, wifi\_transmit\_rate, wifi\_rssi
DEX Mac Device MetricsCollects data for running macOS processes and sends the data to the ServiceNow instance.os.mac.check-process-data24 hoursN/AN/A
DEX Mac Device MetricsCollects macOS device metrics and sends the metric data to the ServiceNow instance.os.mac.check-sys-compliance-historical5 minutesHistoricalN/A
DEX Mac Device MetricsCollects macOS device metrics and sends the metric data to the ServiceNow instance.os.mac.check-sys-compliance-latest24 HoursLatestN/A
DEX Mac Device Metrics

Collects macOS device metrics and sends the metric data to the ServiceNow instance.

Note: If the previous check runs for more than five minutes, the current check gets skipped.

os.mac.check-energy-consum-historical5 minutesHistoricalN/A
DEX Mac Device MetricsCollects macOS device metrics and sends the metric data to the ServiceNow instance.os.mac.check-system-metrics-historical30 minutesHistoricalvpn\_details
DEX Get online macOS user on changeGets a logged-in user's data on a macOS device whenever there’s a change.os.mac.check-system-custom-query-on-chan60 secsLatestquery,query\_sys\_id, query\_type
DEX Get device configuration on changeGets a logged-in user's device configuration whenever there’s a change.os.all.check.internal.get-device-configu60 secsLatestN/A

Note: If you upgrade the Content Playbook plugin on an instance and encounter unexpected policy update issues, see the Troubleshooting: Policy update issues post DEX plugin upgrade [KB1586917] article in the Now Support knowledge base.

Parent Topic:DEX Content Playbook reference