跳到主要内容

创建审核配置

在开始审核文件和目录事件之前,必须在存储虚拟机(SVM)上创建审核配置。

如果计划为中心访问策略暂存创建审核配置,SVM 上必须有 CIFS 服务器。

Notes
  • 在审核配置中启用中心访问策略暂存时,不要求在 CIFS 服务器上启用动态访问控制;但如果要生成中心访问策略暂存事件,则必须启用该控制。

    动态访问控制通过 CIFS 服务器选项启用。默认情况下未启用。

  • 如果命令中某一字段的参数无效(例如,字段条目无效、重复或不存在),则命令会在审核之前失败。

    此类失败不会生成审核记录。

如果该 SVMSVM 灾难恢复源,则目标路径无法位于根卷上。

使用规划工作表中的信息,创建审核配置,根据日志大小或计划轮换审核日志:
如果轮换审核日志的根据是...输入...
日志大小vserver audit create -vserver vserver_name -destination path -events [{file-ops|cifs-logon-logoff|cap-staging|file-share|audit-policy-change|user-account|security-group|authorization-policy-change}] [-format {xml|evtx}] [-rotate-limit integer] [-rotate-size {integer[KB|MB|GB|TB|PB]}]
计划vserver audit create -vserver vserver_name -destination path -events [{file-ops|cifs-logon-logoff|cap-staging}] [-format {xml|evtx}] [-rotate-limit integer] [-rotate-schedule-month chron_month] [-rotate-schedule-dayofweek chron_dayofweek] [-rotate-schedule-day chron_dayofmonth] [-rotate-schedule-hour chron_hour] -rotate-schedule-minute chron_minute
如果要配置基于时间的审核日志轮换,那么 -rotate-schedule-minute 参数是必需的。

示例

以下示例创建的审核配置使用基于大小的轮换,可审核文件操作和 CIFS 登录和注销事件(默认)。日志的格式为 EVTX(默认)。这些日志存储在 /audit_log 目录中。日志文件的大小限制为 200 MB。日志大小达到 200 MB 时会轮换:

cluster1::> vserver audit create -vserver vs1 -destination /audit_log -rotate-size 200MB

以下示例创建的审核配置使用基于大小的轮换,可审核文件操作和 CIFS 登录和注销事件(默认)。日志的格式为 EVTX(默认)。日志文件的大小限制为 100 MB(默认);日志轮换限制为 5

cluster1::> vserver audit create -vserver vs1 -destination /audit_log -rotate-limit 5

以下示例创建的审核配置使用基于时间的轮换,可审核文件操作、CIFS 登录和注销事件以及中心访问策略暂存事件。日志的格式为 EVTX(默认)。审核日志在每月任一天的中午 12:30 轮换。日志轮换限制为 5

cluster1::> vserver audit create -vserver vs1 -destination /audit_log -events file-ops,cifs-logon-logoff,file-share,audit-policy-change,user-account,security-group,authorization-policy-change,cap-staging -rotate-schedule-month all -rotate-schedule-dayofweek all -rotate-schedule-hour 12 -rotate-schedule-minute 30 -rotate-limit 5