Exporting License Audit Results to CSV
You can use admintools
to audit a database for license compliance and export the results in CSV format, as follows:
admintools -t license_audit [--password=password] --database=database] [‑‑file=csv-file] [‑‑quiet]
where:
- database must be a running database. If the database is password protected, you must also supply the password.
--file csv-file
directs output to the specified file. If csv-file already exists, the tool returns an error message. If this option is unspecified, output is directed tostdout
.--quiet
specifies that the tool should run in quiet mode; if unspecified, status messages are sent tostdout
.
Running the license_audit
tool is equivalent to invoking the following SQL statements:
select audit(''); select audit_flex(''); select * from dc_features_used; select * from v_catalog.license_audits; select * from v_catalog.user_audits;
Audit results include the following information:
- Log of used Vertica features
- Estimated database size
- Raw data size allowed by your Vertica license
- Percentage of licensed allowance that the database currently uses
- Audit timestamps
The following truncated example shows the raw CSV output that license_audit
generates:
FEATURES_USED features_used,feature,date,sum features_used,metafunction::get_compliance_status,2014-08-04,1 features_used,metafunction::bootstrap_license,2014-08-04,1 ... LICENSE_AUDITS license_audits,database_size_bytes,license_size_bytes,usage_percent,audit_start_timestamp,audit_end_timestamp,confidence_level_percent,error_tolerance_percent,used_sampling,confidence_interval_lower_bound_bytes,confidence_interval_upper_bound_bytes,sample_count,cell_count,license_name license_audits,808117909,536870912000,0.00150523690320551,2014-08-04 23:59:00.024874-04,2014-08-04 23:59:00.578419-04,99,5,t,785472097,830763721,10000,174754646,vertica ...
USER_AUDITS user_audits,size_bytes,user_id,user_name,object_id,object_type,object_schema,object_name,audit_start_timestamp,audit_end_timestamp,confidence_level_percent,error_tolerance_percent,used_sampling,confidence_interval_lower_bound_bytes,confidence_interval_upper_bound_bytes,sample_count,cell_count user_audits,812489249,45035996273704962,dbadmin,45035996273704974,DATABASE,,VMart,2014-10-14 11:50:13.230669-04,2014-10-14 11:50:14.069057-04,99,5,t,789022736,835955762,10000,174755178 AUDIT_SIZE_BYTES audit_size_bytes,now,audit audit_size_bytes,2014-10-14 11:52:14.015231-04,810584417 FLEX_SIZE_BYTES flex_size_bytes,now,audit_flex flex_size_bytes,2014-10-14 11:52:15.117036-04,11850