{"revision":"c10276e953456835cdbb1f3a60d58ae1980be353","document":{"id":32427,"path":"it-service-management/digital-end-user-experience-dex/dex-policies-mac.md","title":"DEX policies for macOS","bundle":null,"doc_type":null,"release":"australia","body":"\n# DEX policies for macOS\n\nPolicies 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.\n\nFor macOS systems, to retrieve the entire data, include the subsequent content to /private/etc/sudoers.d/\\_servicenow.\n\n```\n# ServiceNow Agent Collector - Sudoers Configuration for macOS\n\n# Command alias for ServiceNow allowed commands\n# These commands can be executed by the _servicenow user with sudo privileges\nCmnd_Alias SN_ALLOWED = /usr/bin/powermetrics, \\\n                        /usr/bin/mdls, \\\n                        /usr/bin/log, \\\n                        /usr/bin/log show *, \\\n                        /bin/kill, \\\n                        /usr/bin/defaults, \\\n                        /usr/local/bin/jamf, \\\n                        /bin/rm, \\\n                        /bin/ls, \\\n                        /usr/bin/pgrep, \\\n                        /usr/bin/find, \\\n                        /usr/bin/pmset, \\\n                        /usr/bin/open, \\\n                        /Library/Application\\ Support/servicenow/agent-client-collector/cache/acc-dex-modules/bin/scripts/sudo/app_freeze.sh, \\\n                        /Library/Application\\ Support/servicenow/agent-client-collector/cache/acc-dex-modules/bin/scripts/sudo/zscaler_zpa_reconnect.sh, \\\n                        /Library/Application\\ Support/servicenow/agent-client-collector/cache/acc-dex-modules/bin/scripts/sudo/clear_google_chrome_browsing_data.sh, \\\n                        /Library/Application\\ Support/servicenow/agent-client-collector/cache/acc-dex-modules/bin/scripts/sudo/services.sh, \\\n                        /Library/Application\\ Support/servicenow/agent-client-collector/cache/acc-dex-modules/bin/scripts/sudo/restart_service.sh *, \\\n                        /Applications/Zscaler/Zscaler.app/Contents/PlugIns/zscli, \\\n                        /Library/Application\\ Support/servicenow/agent-client-collector/cache/acc-dex-modules/bin/scripts/sudo/elevate_temporary_admin.sh\n\n# ServiceNow user permissions\n# _servicenow user can run osqueryi and all SN_ALLOWED commands without password\n# SETENV allows environment variables to be preserved\n_servicenow ALL=NOPASSWD: SETENV: /Library/Application\\ Support/servicenow/agent-client-collector/cache/osquery/bin/osqueryi *, SN_ALLOWED\n\n# Defaults for _servicenow user\n# !requiretty: Allow sudo without a TTY (required for automated scripts)\nDefaults:_servicenow !requiretty\n```\n\n```\nCmnd_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\n_servicenow ALL=NOPASSWD: SETENV: /Library/Application\\ Support/servicenow/agent-client-collector/cache/osquery/bin/osqueryi *, SN_ALLOWED\n\nDefaults:_servicenow !requiretty\nDefaults timestamp_timeout=0\nDefaults log_allowed\n```\n\n**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.\n\n## Policies for Mac — Application\n\nDEX provides the following policies for applications.\n\n|Policy name|Description|Check instances|Frequency|Historical or latest|Check instance parameters|\n|-----------|-----------|---------------|---------|--------------------|-------------------------|\n|DEX Mac Apps Metrics|Collects the application metrics in the Mac device and sends metric data to Metric Base.|os.mac.check-app-historical|5 mins|Historical|cpu\\_usage, memory\\_usage, uptime, io\\_usage\\_read, io\\_usage\\_write, is\\_running, last\\_access\\_time, crashes|\n\n## Policies for Mac — Device\n\nDEX provides the following policies for devices.\n\n<table id=\"table_mjt_kmd_hwb\"><thead><tr><th>\n\nPolicy name\n\n</th><th>\n\nDescription\n\n</th><th>\n\nCheck instances\n\n</th><th>\n\nFrequency\n\n</th><th>\n\nHistorical or latest\n\n</th><th>\n\nCheck instance parameters\n\n</th></tr></thead><tbody><tr><td>\n\nDEX Mac Device Metrics\n\n</td><td>\n\nCollects macOS device metrics and sends the metric data to the ServiceNow instance.\n\n</td><td>\n\nos.mac.check-system-metrics-latest\n\n</td><td>\n\n24 hours\n\n</td><td>\n\nLatest\n\n</td><td>\n\nuptime, 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\n\n</td></tr><tr><td>\n\nDEX Mac Device Metrics\n\n</td><td>\n\nCollects macOS device metrics and sends the metric data to MetricBase.\n\n</td><td>\n\nos.mac.check-system-metrics-historical\n\n</td><td>\n\n5 mins\n\n</td><td>\n\nHistorical\n\n</td><td>\n\ndisk\\_usage, io\\_usage\\_write, io\\_usage\\_read, power\\_consumption, cpu\\_usage, memory\\_details, uptime, crashes, battery\\_charge\\_percentage, wifi\\_transmit\\_rate, wifi\\_rssi\n\n</td></tr><tr><td>\n\nDEX Mac Device Metrics\n\n</td><td>\n\nCollects data for running macOS processes and sends the data to the ServiceNow instance.\n\n</td><td>\n\nos.mac.check-process-data\n\n</td><td>\n\n24 hours\n\n</td><td>\n\nN/A\n\n</td><td>\n\nN/A\n\n</td></tr><tr><td>\n\nDEX Mac Device Metrics\n\n</td><td>\n\nCollects macOS device metrics and sends the metric data to the ServiceNow instance.\n\n</td><td>\n\nos.mac.check-sys-compliance-historical\n\n</td><td>\n\n5 minutes\n\n</td><td>\n\nHistorical\n\n</td><td>\n\nN/A\n\n</td></tr><tr><td>\n\nDEX Mac Device Metrics\n\n</td><td>\n\nCollects macOS device metrics and sends the metric data to the ServiceNow instance.\n\n</td><td>\n\nos.mac.check-sys-compliance-latest\n\n</td><td>\n\n24 Hours\n\n</td><td>\n\nLatest\n\n</td><td>\n\nN/A\n\n</td></tr><tr><td>\n\nDEX Mac Device Metrics\n\n</td><td>\n\nCollects macOS device metrics and sends the metric data to the ServiceNow instance.\n\n**Note:** If the previous check runs for more than five minutes, the current check gets skipped.\n\n</td><td>\n\nos.mac.check-energy-consum-historical\n\n</td><td>\n\n5 minutes\n\n</td><td>\n\nHistorical\n\n</td><td>\n\nN/A\n\n</td></tr><tr><td>\n\nDEX Mac Device Metrics\n\n</td><td>\n\nCollects macOS device metrics and sends the metric data to the ServiceNow instance.\n\n</td><td>\n\nos.mac.check-system-metrics-historical\n\n</td><td>\n\n30 minutes\n\n</td><td>\n\nHistorical\n\n</td><td>\n\nvpn\\_details\n\n</td></tr><tr><td>\n\nDEX Get online macOS user on change\n\n</td><td>\n\nGets a logged-in user's data on a macOS device whenever there’s a change.\n\n</td><td>\n\nos.mac.check-system-custom-query-on-chan\n\n</td><td>\n\n60 secs\n\n</td><td>\n\nLatest\n\n</td><td>\n\nquery,query\\_sys\\_id, query\\_type\n\n</td></tr><tr><td>\n\nDEX Get device configuration on change\n\n</td><td>\n\nGets a logged-in user's device configuration whenever there’s a change.\n\n</td><td>\n\nos.all.check.internal.get-device-configu\n\n</td><td>\n\n60 secs\n\n</td><td>\n\nLatest\n\n</td><td>\n\nN/A\n\n</td></tr></tbody>\n</table><table id=\"table_qfc_2ly_ckc\"><thead><tr><th>\n\nField name\n\n</th><th>\n\nDescription\n\n</th></tr></thead><tbody><tr><td>\n\nAction name\n\n</td><td>\n\nName of the action that is defined in the policy. Admins can predefine an action name so that SD agents don't need the policy ID to execute any action. The format is &lt;action&gt; &lt;application name&gt; &lt;version&gt;. For example, Reinstall Zoom 3.4.1 or Uninstall Firefox 134.2.\n\n</td></tr><tr><td>\n\nActive true/false\n\n</td><td>\n\nEnables the action to appear in action library.\n\n</td></tr><tr><td>\n\nApplication\n\n</td><td>\n\nIdentifies the application for which the policy is defined.\n\n</td></tr><tr><td>\n\nPolicy ID\n\n</td><td>\n\nID of the policy defined in Jamf server for the corresponding action.\n\n</td></tr></tbody>\n</table>**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\\]](https://support.servicenow.com/kb_view.do?sysparm_article=KB1586917) article in the Now Support knowledge base.\n\n**Parent Topic:**[DEX Content Playbook reference](https://raw.githubusercontent.com/ServiceNow/ServiceNowDocs/australia/markdown/australia/it-service-management/digital-end-user-experience-dex/dex-content-playbook-reference.md)\n\n"}}