sql query for opscentre to fetch week at a glance report template.
Thanks,
I see you're monitoring 2 masters? One has ID 61 and the 696. So the above query should work as below.
But I also notice you're using 7.5, and I'm using 7.6. So that could be an issue as the schema's might be slightly different.
Sorry, should have asked earlier. You can aways upgrade, as the opscenter can be higher than the master :)
select
domain_jobarchive.id as "Job ID",
domain_jobarchive.PolicyName as "policy name",
domain_jobarchive.scheduleName as "scedule name",
DATEFORMAT(cast(UTCBigintToNOMTime(domain_JobArchive.endTime) as DATETIME), 'yyyy-mm-dd hh-mm-ss') as myDateTime,
(domain_JobArchive.bytesWritten)/1024 as "KBytes Written",
domain_JobArchive.filesBackedUp as "Files Backed up",
nb_jobfiles.fileinfo as "file list",
domain_Entity.name as "domain_Entity.name",#entity1.name as "#entity1.name" from domain_MasterServer , domain_Client , domain_JobArchive , domain_Entity, nb_jobfiles , (
select * from domain_entity)#entity1 where domain_MasterServer.id = domain_JobArchive.masterServerId and domain_Client.masterServerId = domain_JobArchive.masterServerId and domain_Client.name = domain_JobArchive.clientName
and ( (domain_MasterServer.id = domain_Entity.id) )
AND ( (domain_Client.id = #entity1.id) )
AND ( ( (domain_JobArchive.isValid = '1') AND (domain_JobArchive.filesBackedUp NOT IN (0 ) AND (domain_JobArchive.policyType NOT IN (-1, 34 )) AND (domain_JobArchive.type NOT IN (30, 31, 32, 33, 34 )) ) AND ( (domain_JobArchive.type IN (1, 0, 7, 6 )) ) AND ( ( (domain_JobArchive.masterServerId IN (61, 696 )) ) ) ) )
AND domain_jobarchive.id = nb_jobfiles.jobid
AND DATEDIFF(day,UTCBigIntToNomTime(domain_JobArchive.endTime), GETDATE()) <= 30