記錄收集

這包含 Compliance Reporter 中記錄收集的所有可用偏好設定。

記錄收集偏好設定鍵

網域
com.jamf.compliancereporter
密鑰說明
UnifiedLogPredicates

從統一記錄的預設和資訊層級收集記錄。每個字串定義一個搜尋謂詞,用於確定將收集哪些統一記錄事件並將其傳輸到 SIEM。定義搜尋謂詞時,請記住下列幾點:

  • 您可以在一個字串中定義多個搜尋。建議您只為每個字串定義最多五個搜尋,因為超過五個搜尋會導致效能下降。

  • 特殊字元必須格式化為 HTML 實體名稱。

注意:

在 macOS 10.14 或更新版本中,記錄會被即時串流。在 macOS 10.13 或更早版本中,將按小時收集統一記錄。

<key>UnifiedLogPredicates</key>
<array>
  <string>(senderImagePath == "/usr/libexec/syspolicyd") &amp;&amp; ((formatString BEGINSWITH "GK") || (formatString LIKE "Gatekeeper"))</string>
  <string></string>
</array>
PlaintextLogCollectionPaths

持續收集和監控單行純文字記錄檔。例如:/var/log/system.log/var/log/install.log。將為指定記錄檔中的每一行,以及初始收集後附加的任何資料,建立 Compliance Reporter 記錄檔事件。如果指定的檔案不存在,則 Compliance Reporter 將只能在檔案出現後才開始記錄檔案內容。任何檔案路徑都是有效的,並且不需要在 Compliance Reporter 啟動時出現即可按預期工作。

<key>PlaintextLogCollectionPaths</key>
<array>
    <string>/var/log/jamf.log</string>
</array>

DisableFileMonitoringActivities

停用 Compliance Reporter 的檔案監控活動。僅建議在具有多個端點安全性解決方案或公用程式的環境中使用此設定,這些解決方案或公用程式在 Mac 電腦上執行類似的掃描。此設定金鑰預設為 false

<key>DisableFileMonitoringActivities</key> <false/> 

在記錄檔集合中啟用私人資料

要在記錄檔中顯示私人資料,例如使用者名稱和 IP 位址,您必須先使用 Jamf Pro 簽名和部署設定描述檔。Jamf Pro 是一種企業行動管理軟體,管理員可用來配置 Compliance Reporter 設定並將 Compliance Reporter 部署到目標電腦。

下載私人資料啟用設定描述檔,並在終端機中執行下列命令:
/usr/bin/security cms -S -Z "$SIGNING_CERTIFICATE" -i "$UNSIGNED_PROFILE_PATH" -o "$SIGNED_PROFILE_PATH"

下列是配置為顯示私人資料的設定描述檔範例:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
    <dict>
        <key>PayloadContent</key>
        <array>
            <dict>
                <key>PayloadDisplayName</key>
                <string>ManagedClient logging</string>
                <key>PayloadEnabled</key>
                <true />
                <key>PayloadIdentifier</key>
                <string>com.apple.logging.ManagedClient.1</string>
                <key>PayloadType</key>
                <string>com.apple.system.logging</string>
                <key>PayloadUUID</key>
                <string>ED5DE307-A5FC-434F-AD88-187677F02222</string>
                <key>PayloadVersion</key>
                <integer>1</integer>
                <key>System</key>
                <dict>
                    <key>Enable-Private-Data</key>
                    <true />
                </dict>
            </dict>
        </array>
        <key>PayloadDescription</key>
        <string>Enable Unified Log Private Data logging</string>
        <key>PayloadDisplayName</key>
        <string>Enable Unified Log Private Data</string>
        <key>PayloadIdentifier</key>
        <string>C510208B-AD6E-4121-A945-E397B61CACCF</string>
        <key>PayloadRemovalDisallowed</key>
        <false />
        <key>PayloadScope</key>
        <string>System</string>
        <key>PayloadType</key>
        <string>Configuration</string>
        <key>PayloadUUID</key>
        <string>D30C25BD-E0C1-44C8-830A-964F27DAD4BA</string>
        <key>PayloadVersion</key>
        <integer>1</integer>
    </dict>
</plist>
Compliance Reporter 現在將記錄私人資料。如果您在終端機中執行下列命令,則不應顯示 <private> 私人項目:
log stream --predicate '(subsystem == "com.apple.AccountPolicy")'