Saviynt unveils its cutting-edge Intelligence Suite products to revolutionize Identity Security!
Click HERE to see how Saviynt Intelligence is transforming the industry.
Saviynt Copilot Icon

Job Failure Analytics Report

asamaddar
New Contributor
New Contributor

Hi,

We need to configure an Analytics Report that would show all the Jobs that have failed in the system.

I have tried this query but Endpoint Name, Endpoint and Comments are blank:

select jobid, jobname, jobstartdate, jobenddate, SAVRESPONSE, case when ecm.EXTERNALCONNECTION is not null then (select e.ENDPOINTNAME from endpoints e where e.SECURITYSYSTEMKEY IN (select s.SYSTEMKEY from securitysystems s where s.EXTERNALCONNECTION IN (select e.EXTERNALCONNECTIONKEY from externalconnection e where e.CONNECTIONNAME=ecm.EXTERNALCONNECTION)) limit 1) when ecm.SYSTEMNAME is not null then (select e.ENDPOINTNAME from endpoints e where e.SECURITYSYSTEMKEY = (select s.systemkey from securitysystems s where s.SYSTEMNAME = ecm.SYStemNAME ) limit 1) else null end as ENDPOINTNAME, case when ecm.EXTERNALCONNECTION is not null then (select e.ENDPOINTKEY from endpoints e where e.SECURITYSYSTEMKEY IN (select s.SYSTEMKEY from securitysystems s where s.EXTERNALCONNECTION IN (select e.EXTERNALCONNECTIONKEY from externalconnection e where e.CONNECTIONNAME=ecm.EXTERNALCONNECTION)) limit 1) when ecm.SYSTEMNAME is not null then (select e.ENDPOINTKEY from endpoints e where e.SECURITYSYSTEMKEY = (select s.systemkey from securitysystems s where s.SYSTEMNAME = ecm.SYStemNAME ) limit 1) else null end as endpointKey from ecmimportjob ecm where ecm.SAVRESPONSE !='success';

We would need the  Job Name and not Job Attribute Name. Also, Endpoint is a must in the report.

 

Can someone please help!!!

 

1 REPLY 1

rushikeshvartak
All-Star
All-Star

rushikeshvartak_0-1728317683024.png

SELECT ECM.JOBID,
       ECM.TRIGGERNAME                            AS jobname,
       ECM.JOBSTARTDATE,
       ECM.JOBENDDATE,
       ECM.SAVRESPONSE,
       COALESCE(E1.ENDPOINTNAME, E2.ENDPOINTNAME) AS ENDPOINTNAME,
       COALESCE(E1.ENDPOINTKEY, E2.ENDPOINTKEY)   AS ENDPOINTKEY
FROM   ECMIMPORTJOB ECM
       LEFT JOIN SECURITYSYSTEMS S1
              ON S1.EXTERNALCONNECTION = (SELECT E2.EXTERNALCONNECTIONKEY
                                          FROM   EXTERNALCONNECTION E2
                                          WHERE
                 E2.CONNECTIONNAME = ECM.EXTERNALCONNECTION)
       LEFT JOIN ENDPOINTS E1
              ON E1.SECURITYSYSTEMKEY = S1.SYSTEMKEY
       LEFT JOIN SECURITYSYSTEMS S2
              ON S2.SYSTEMNAME = ECM.SYSTEMNAME
       LEFT JOIN ENDPOINTS E2
              ON E2.SECURITYSYSTEMKEY = S2.SYSTEMKEY
WHERE  ECM.SAVRESPONSE != 'success'; 


Regards,
Rushikesh Vartak
If this helped you move forward, click 'Kudos'. If it solved your query, select 'Accept As Solution'.