Task Execution by Computer

yabru's picture

Hi,

How difficult would it be to show in this report a column for IP Address and Relative Package Server of each computer.

Attached  screen shot to make sense...

Steve
imagebrowser image

Mike.Langford's picture

Half of it is easy

Cloning the report, and replacing the SQL with the code below will include IP address.
The package server piece is a little bit trickier because (at least in our environment) machines aren't assigned to specific package servers so they could pull from a different one each time depending on which is closest and is ready first. Potentially you could maybe pull information on the URL that the machine pulled the package from, but that history is cleaned out pretty regularly (again, at least in our environment) so you wouldn't get a complete set of results.  That being said, here is the SQL to include IP address:
----------------------------------------

SELECT  vComp.Guid AS _ResourceGuid, 
 vComp.[Name] [Computer Name], 
 vComp.[IP Address], 
 swb.Name as [Software Bulletin], 
 s1.[Name] AS [Software Delivery Task], 
 ( 
  case eebc.Successful 
  when 1 
  then dbo.fnLocalizeString('executionstate.succeeded', '69e9c2c2-7a8d-4831-8a65-a3294b262712', '%_culture%') 
  else dbo.fnLocalizeString('executionstate.failed', '69e9c2c2-7a8d-4831-8a65-a3294b262712', '%_culture%') 
  end 
 ) Status, 
 e1.ReturnCode AS [Return Code], 
 datediff(ss,e1.Start,e1.[End]) as [Duration(Sec)], 
 e1.Start as [Start Time], 
 e1.[End] as [End Time], 
 e1.LoggedInUser as [User], 
 e1.CommandLine Command 
 
from Evt_AeX_SWD_Execution e1 
 
  inner join vPMCore_SWDEventExecutionSuccessByComputer eebc 
   on e1._ResourceGuid = eebc._ResourceGuid 
   and e1.PackageId  = eebc.PackageId 
   and e1.AdvertisementId = eebc.AdvertisementId 
   and e1._eventTime  = eebc.EventTime 
 INNER JOIN ResourceAssociation swu_pkg 
  ON  swu_pkg.ChildResourceGuid = e1.PackageId 
   and swu_pkg.ResourceAssociationTypeGuid = 'A19CED33-9E1F-4E97-98CF-0F8B339739C3' -- Software Update Created Software Package  
 INNER JOIN ResourceAssociation swb_swu 
  ON swb_swu.ChildResourceGuid = swu_pkg.ParentResourceGuid 
   and swb_swu.ResourceAssociationTypeGuid = '7EEAB03A-839C-458d-9AF2-55DB6B173293' -- Software Bulletin 2 Software Update 
    and upper(swb_swu.ParentResourceGuid) like upper(%_SWBGuid%) 
 INNER JOIN ResourceAssociation swb_vendor 
  ON swb_vendor.ParentResourceGuid = swb_swu.ParentResourceGuid 
   and swb_vendor.ResourceAssociationTypeGuid = '2FFEB9F0-601E-4746-A830-BDB200076503' -- Software Bulletin 2 Vendor 
   and upper(swb_vendor.ChildResourceGuid) like upper(%VendorGuid%) 
 INNER JOIN vComputer vComp 
  ON vComp.Guid = e1._ResourceGuid 
   and upper(vComp.Name) like upper(%Computer Name%) 
   and upper(vComp.Guid) like upper('%') 
 INNER JOIN SWDAdvertisement s1 
  ON s1.AdvertisementId = e1.AdvertisementId 
   and s1.[_Latest] = 1 
   and upper(s1.Name) like upper(%SWDTaskName%) 
   and s1.AdvertisementId like %_Software Delivery Task Id% 
 inner join Item swb 
  on swb_swu.ParentResourceGuid = swb.Guid 
 
WHERE 1 = 1 
 and (%ExecutionStatus% = -1 or eebc.Successful = %ExecutionStatus%) 
 AND datediff(dd,e1.[Start],getdate()) <= %_From% 
 AND lower(e1.PackageId) like lower(%_Package Id%) 
 and ( select  count(ExecutionNumber) 
  from  Evt_AeX_SWD_Execution e2 
  where e2._ResourceGuid = e1._ResourceGuid 
   and e1.PackageId = e2.PackageId 
   and e1.CommandLine = e2.CommandLine ) >= %NumExecutions% 
ORDER BY 
  vComp.[Name], 
  s1.[Name], 
  e1.[Start]

timaa's picture

reports

I have trouble with reports also.

When I came across this report I was so happy. Problem is, I don't know exactly where yabru was in the UI.

As for myself, I logged into the SEPM UI and went to the Reports Tab. In both the quick reports and the scheduled reports I do not see a way to get to cloning a report.

I would like to create a report with the following info for columns:
-Client
-last time checked in
-user
-IP
-group
-server
-last scan
-definitions
-product version
-scan engine

I feel these categories represent the most used info from the SCS or SAV MMC. I can not find a report that gets me this info.

timaa's picture

Soo I guess this is an

Soo I guess this is an Altiris report not a SEPM report