Smarts NCM: Class for the root element 'audit-trail' could not be found.
search cancel

Smarts NCM: Class for the root element 'audit-trail' could not be found.

book

Article ID: 330976

calendar_today

Updated On:

Products

VMware Smart Assurance

Issue/Introduction

Symptoms:


Smarts NCM class for the root element 'audit-trail' could not be found, consuming catalina.out log in /usr/tomcat/apache-tomcat-6.0.36/logs
 


The cm_device_audit_history table in the database is referencing 'audit-trail' which does not exist.

Environment

VMware Smart Assurance - NCM

Cause

The proper syntax for this root element is AuditTrail.

Resolution

To address this issue, do the following:
  1. Log into the database on the application server or database server (if the database is on a standalone server):
su - pgdba
psql voyencedb voyence
Password for user voyence:
  1. Run the following select statement:
select cm_device_audit_history.compliance_audit_trail,encode(cm_device_audit_histo ry.history_id,'hex') from cm_device_audit_history where cm_device_audit_history.compliance_audit_trail LIKE '%audit-trail%';
  1. To redirect the output to a file, execute the following command sequence:
\pset pager
\o /tmp/audit-trail.txt
select cm_device_audit_history.compliance_audit_trail,encode(cm_device_audit_history.history_id,'hex') from cm_device_audit_history where cm_device_audit_history.compliance_audit_trail LIKE '%audit-trail%';
\o
\pset pager
  1. The above command set will turn off page breaks, redirect the output to /tmp in a file called 'audit-trail.txt', and restore standard output after the select statement is finished. You will not see any output to the screen, but the prompt will return once the command has executed. When the command prompt returns, exit the database:
\q
exit
 
  1. View the file that you have created. You will see an entry or entries similar to the following:
compliance_audit_trail | encode
--------------------------------------------------------------------+----------------------------------
<?xml version="1.0" encoding="UTF-8"?> | 0a1040297bc6d03f535c00353e010000
<audit-trail job-number="0" dcs-number="42"
enforcement-time="1366688809766" creation-time="1366688809766"
severity-level="0" device-idx="6576">
<compliance-state>NotAudited</compliance-state>
<device-name>ETSGARIDRT01.ets-ap.com</device-name>
<config-units-audited></config-units-audited>
<user-name>system</user-name>
<trail-id>0a1040297a24e63f084300353e010000</trail-id>
<device-id>0a1040297ae8e73fd16118fe34010000</device-id>
<management-ip-address>10.172.96.10</management-ip-address>
</audit-trail>
 
(1 row)
 
  1. To change the entry or entries, use the 'UPDATE' statement:
UPDATE cm_device_audit_history SET compliance_audit_trail = '<?xml version="1.0" encoding="UTF-8"?>
<AuditTrail job-number="0" dcs-number="42"
enforcement-time="1366688809766" creation-time="1366688809766"
severity-level="0" device-idx="6576" compliance-state="NotAudited"
device-name="ETSGARIDRT01.ets-ap.com" config-units-audited="" user-name="system" trail-id="0a1040297a24e63f084300353e010000"
device-id="0a1040297ae8e73fd16118fe34010000" management-ip-address="10.172.96.10" />' where encode(cm_device_audit_history.history_id,'hex')='0a1040297bc6d03f535c00353 e010000';
 
  1. Once the entry is updated, restart Smarts NCM services.