
[dbo].[ARG_AGENT_DISCOVERY_VIEW]
CREATE VIEW ARG_AGENT_DISCOVERY_VIEW
AS
SELECT dh.dis_hw_uuid,
dh.tenant_id as tenant,
dh.host_name,
dh.serial_number,
dh.primary_mac_address,
dh.asset_tag,
dh.creation_date,
dh.vendor_name as system_vendor,
ag.user_def1 as login_id,
ag.user_def3 as location,
ag.user_def4 as external_host_key,
ag.last_run_date as last_scan_date,
ap.genBatchID as batch_id,
ap.genModel as system_model,
ap.genType as system_type,
ap.genTotMemory as total_memory,
ap.genTotDisk as total_disk_space,
ap.genNetIP as ip_address,
ap.genOS as operating_system,
ap.genNumProcs as processor_count,
ap.genProcType as processor_type,
ap.genProcSpeed as processor_speed,
ap.ndMAC as mac_address,
ap.ndIP as network_ip_address,
ap.ndSwName as switch_name,
ap.ndPortName as port_name,
ap.ndPortType as port_type,
ap.ndPortDesc as port_description,
ap.ndSwIP as switch_ip_address,
ap.ndSwLoc as switch_location,
ap.ndSwVendor as vendor,
ap.ndSwSite as site,
ap.ndSwCust as customer_name,
ap.ndSwFn as "function",
ap.ndSwScDate as scan_date
FROM ca_discovered_hardware dh
INNER JOIN ca_agent ag
ON ag.object_uuid = dh.dis_hw_uuid
INNER JOIN ca_agent_prop ap
ON ap.object_uuid = dh.dis_hw_uuid
GO