Library Table of Contents Index Previous Next Comments

Understanding CIFS auditing

Saving and clearing audit events

About saving audit events  Top

You can save the audit event information in the internal cifsaudit.alf file to the external event log file either manually or automatically. You can also specify a maximum size for the cifsaudit.alf file.

Saving audit events to the event log manually  Top

To manually save audit events to the event log file, complete the following steps.

Step

Action

1

If you want to...

Then...

Use the default event log

Go to Step 3.

Specify another file name for the event log

Go to Step 2.

2

Enter the following command:

options cifs.audit.saveas filename

filename is the complete path name of the file to which Data ONTAP logs audit event information.

Use .evt as the file extension. Use quotes around path names that contain a space.

Examples

 
options cifs.audit.saveas /etc/log/mylog.evt
options cifs.audit.saveas "/home/my event log/audit.evt"
3

Enter the following command to update the event log.

cifs audit save [ -f ]

Omit the -f option if the event log does not exist. Use the -f option to overwrite the existing event log.

Result

Data ONTAP writes to the event log the event information gathered since the last event log update.

Specifying when automatic saves occur  Top

You can specify that audit events are automatically saved to the event log based on one or both of the following:

If you specify both a size threshold and a time interval, audit events will be saved to the event log whenever either the size threshold or the time interval is reached.

Enabling automatic saves based on internal log file size  Top

To enable or disable automatic saves based on the size of the internal log file, complete the following step.

Step

Action

1

Enter the following command:

options cifs.audit.autosave.onsize.enable on | off

Specifying the size threshold  Top

If you have enabled automatic saves based on the size of the internal log file, you can specify the size threshold. The default size threshold for the internal log file is 75%, so that whenever the internal log file is 75% full, the contents are automatically saved to the external event file. You can specify the threshold as a percentage of the size of the internal log file or as an absolute size.

To specify the size threshold at which the internal log file is automatically saved, complete the following step.

Step

Action

1

Enter the following command:

options cifs.audit.autosave.onsize.threshold Nsuffix

N is the value of the size threshold.

suffix is the unit of measure.

Example

options cifs.audit.autosave.onsize.threshold 90%

Note
See the table below for valid values and units for the size threshold.

Valid size thresholds  Top

The following table shows the units of measure and values you can use to specify the size threshold of the internal log file for automatic saves.

Units of measure

Values

% (percentage of the cifsaudit.alf file)

1 to 100

k (kilobytes)

1 to 67108864

m (megabytes)

1 to 65526

g (gigabytes)

1 to 64

Enabling automatic saves based on a time interval  Top

To enable or disable automatic saves based on a time interval, complete the following step.

Step

Action

1

Enter the following command:

options cifs.audit.autosave.ontime.enable on | off

Specifying the time interval  Top

If you have enabled automatic saves based on a time interval, you can specify the time interval. The default time interval is 12 hours, so the contents of the internal log file are saved to the external event file every 12 hours.

To specify a different time interval for automatically saving the internal log file to the external event file, complete the following step.

Step

Action

1

Enter the following command:

options cifs.audit.autosave.ontime.interval Nsuffix

N is the value of the time interval.

suffix is the unit of measure.

Example

options cifs.audit.autosave.ontime.interval 1d

Note
See the table below for valid values and units for the time interval.

Valid time intervals  Top

The following table shows the units of measure and values you can use to specify the time interval for automatic saves.

Units of measure

Values

s (seconds)

1 to 60

m (minutes)

1 to 60

h (hours)

1 to 24

d (days)

1 to 7

How automatically saved event files are named  Top

Each time the internal log file is automatically saved to the external event file, an extension is added to the base name of the event file. You can select one of the following types of extensions to be added:

The filer saves the event files for up to six weeks. You can specify a limit to the number of event files that can be saved.

Counter extensions  Top

If you select counter for automatic file naming, the extension is a number value. When an automatic save occurs, the old event files are renamed using sequentially numbered extensions. The newest event file does not have a number value added to it. For example, if the base file name is eventlog, when an automatic save occurs, the newest event file is named eventlog.evt, the previous eventlog.evt file is copied to eventlog1.evt, the eventlog1.evt file is copied to eventlog2.evt, and so on.

Specifying counter extensions  Top

To specify counter (numbered) extensions for automatically saved event files, complete the following step.

Step

Action

1

Enter the following command:

options cifs.audit.autosave.file.extension counter

Timestamp extensions  Top

If you select timestamp for automatic file naming, the file name is in the following format:

base name of event file.YYYYMMDDHHMMSS.evt

YYYY is the 4-digit year.

MM is the 2-digit month.

DD is the 2-digit day.

HH is the 2-digit hour.

MM is the 2-digit minute.

SS is the 2-digit second.

Specifying timestamp extensions  Top

To specify timestamp extensions for automatically saved event files, complete the following step.

Step

Action

1

Enter the following command:

options cifs.audit.autosave.file.extension timestamp

Specifying the maximum number of automatically saved files  Top

To specify the maximum number of event files that can be saved automatically, complete the following step.

Step

Action

1

Enter the following command:

options cifs.audit.autosave.limit value

value is a number from 1 to 999.

Specifying the maximum size of the cifsaudit.alf file  Top

To specify the maximum size of the cifsaudit.alf file, complete the following step.

Step

Action

1

Enter the following command:

options cifs.audit.logsize size

size is the number of bytes. If you enter an invalid number, a message displays the range of acceptable values.

Caution
Data ONTAP overwrites the oldest data after the cifsaudit.alf file reaches the maximum size. To prevent loss of event data, you should save the cifsaudit.alf file before it is filled. By default, when the file is 75% full, a warning message is issued. Additionally, warning messages are sent when the file is nearly full and data is about to be overwritten, and when data has already been overwritten.

SNMP traps for auditing events  Top

If you want CIFS clients to receive SNMP traps for auditing events, you must register the clients using the SNMP feature of Data ONTAP. All registered clients must have SNMP software to listen for SNMP traps.

An SNMP trap is issued whenever any of the following occurs:

Clearing the cifsaudit.alf file  Top

To clear the internal cifsaudit.alf file, complete the following step.

Step

Action

1

Enter the following command:

cifs audit clear
Result

If the audit has started, the internal cifsaudit.alf log file is cleared. If the audit has stopped, the cifsaudit.alf file is deleted. The external event log is not affected by this command.

Viewing the event log  Top

To view the external event log (.evt file), complete the following steps.

Step

Action

1

Start the Event Viewer according to your Windows documentation.

2

In the Log menu, choose Open.

Note
Do not try to open the event log by choosing Select Computer from the Log menu and double-clicking the filer name. If you do, the Event Viewer displays the error message "The RPC server is unavailable," because Data ONTAP does not communicate with the Event Viewer with RPC calls.

3

Choose the event log on the filer.

Library Table of Contents Index Previous Next Comments