In a couple of my previous blogs I discussed how to audit who made changes to data in a SAS environment. In the last couple of weeks I have been asked how to do the same thing for SAS Visual Analytics reports and explorations. The Visual Analytics administrator overview report doesn’t answer the question, it deals mainly with usage of LASR servers and data. The same can be said for the VALASR kit reports that are available in SAS Environment Manager.
These two assets can help answer usage questions like what in-memory tables are being used and by whom, but not who is making changes to reports and exploration.
Looking at SAS Environment Manager Service Architecture report center there is not a report that will directly answer the question either. However, the good news is, the data to answer the question is being collected and stored in the Environment manager data mart.
EV Service Architecture enables the Audit.Meta.Updates logger on the metadata server, the result is metadata server Audit logs record, for all public objects:
- Who modified the object
- Date and time of the modification
- Was the object added, deleted or updated
The audit logs are located in <config>\Lev1\SASMeta\MetadataServer\AuditLogs and start with the string Audit.
Here is an example of a line from the log:
2016-02-05T13:58:56,892 INFO [00016303] 573:henri@meta01 – Audit Public Object Type=SAS report (2G) Name=AnnualSalarybyDepartment ObjId=A5FMYBKR.AX00006Q has been updated.
NOTE: public objects are loosely defined as objects that are modeled in metadata and participate in the Information Service and/or Logical Object frameworks. Many, but not all, public objects live in the SAS Folders tree structure.
The SAS Environment Manager log parsing, collection and ETL process reads the information from the metadata audit logs and stores it in the environment manager data mart. The data is stored in the ARTIFACT.AUDIT_TRANSACTIONS table.
From there, if the feed to Visual Analytics is enabled, the data will be fed to the EVDMLA.AUDIT_TRANSACTIONS in-memory table, where you can use Visual Analytics Explorer or Report designer to view the audit trail of a report, exploration or any public object.
The columns of interest are:
- Active Userid: the user who made the change.
- Audit Record Event: the event that occurred, for changes to public objects the relevant events are updated, added and deleted.
- Audit Record Type: there are multiple types of audit record in the table e.g. Login, access control change etc. The one we are interested in is AuditPublicObject which records changes made to public objects.
- ObjectID: the metadata object id (can be used to get more information about the object from metadata)
- Object Type: the type of the public object, for visual analytics reports that is “SAS report (2G” and “Visual exploration”
- Startdt: the date and time that the event happened.
- Identity Name: the name of the object in metadata.
NOTE: often you will see multiple records for an update with a slightly different timestamp. This is because one save from the interface can generate multiple updates on objects in the metadata server.
The exploration below shows a graph and table displaying what audit events have occurred for Visual Analytics reports and explorations. The table shows, for each report and exploration, an audit trail of who updated the report and when the update occurred. If an object is deleted that will also be recorded. Unfortunately the detail of what changed e.g. a column was added, or a calculation was changed, is not recorded.
In another example, this basic Visual Analytics report allows an administrator to select a report or exploration and lists the update history for the selected object.
The bottom line, with SAS Environment Manager service architecture setup, the data mart contains information about who is adding, updating and deleting public objects in SAS metadata. If the feed to Visual Analytics is enabled, VA can be used to report an audit trail for reports and explorations.
2 Comments
Great article Gerry - contained exactly what we were looking for!
Miss your smiling face and hope your doing great! All the best, Sandy
Thanks Sandy, glad you found it useful. I hope all is well with you.