1 Reply Latest reply on Apr 9, 2015 6:26 AM by Bill Robinson

    How to get the compliance result from BBSA?

    encina NameToUpdate

      Hi all, I am using the third-party portal to display the result of compliance job,does anybody knows how to get it from BBSA? I tried using the following sql,but it just only returns compliance rule name and status,I want to fetch the more detail. SELECT COMPO.NAME FROM BLADELOGIC.component COMPO WHERE       compo.component_id IN (             SELECT com_re.component_id       FROM               BLADELOGIC.compliance_rule_result COM_RE       WHERE         com_re.component_id IN (SELECT com_p.component_id FROM BLADELOGIC.component COM_P WHERE COM_P.NAME LIKE '%LinuxCheck%' GROUP BY com_p.component_id)       AND com_re.is_inconsistent=1       AND com_re.result_date > (SELECT CAST(MAX(START_TIME) AS TIMESTAMP) FROM BLADELOGIC.job_run WHERE JOB_ID=(SELECT JOB_ID FROM BLADELOGIC.job WHERE NAME='CNPC_LINUX_COMPLIANCE' GROUP BY bladelogic.job.job_id))       GROUP BY com_re.component_id            ) GROUP BY compo.name; //Get the compliance_rule name,component name. SELECT     COM_R.COMPLIANCE_RULE_ID,COM_R.NAME FROM       BLADELOGIC.compliance_rule COM_R WHERE       com_r.compliance_rule_id IN (                                             SELECT COM_RE.COMPLIANCE_RULE_ID FROM BLADELOGIC.compliance_rule_result COM_RE             WHERE COM_RE.COMPONENT_ID=(SELECT COMPONENT_ID FROM BLADELOGIC.component WHERE NAME='LinuxCheck (11.11.162.147)' GROUP BY COMPONENT_ID)             AND COM_RE.IS_INCONSISTENT=1             AND COM_RE.RESULT_DATE > (SELECT CAST(MAX(START_TIME) AS TIMESTAMP) FROM BLADELOGIC.job_run WHERE JOB_ID=(SELECT JOB_ID FROM BLADELOGIC.job WHERE NAME='CNPC_LINUX_COMPLIANCE' GROUP BY JOB_ID))                              )      GROUP BY       COM_R.COMPLIANCE_RULE_ID,COM_R.NAME; Appreciate any help. Wanfeng