No idea how to pull this into a webpage. I tried. It blew up. We needed the extract in csv so this was good enough. YMMV. I am not an expert. Use at your own risk.
SELECT DISTINCT Device.sDisplayName as DisplayName
,NetworkInterface.sNetworkAddress AS IPAddress
,(SELECT DeviceAttribute.sValue FROM DeviceAttribute WHERE DeviceAttribute.sName = 'SerialNumber' AND (DeviceAttribute.nDeviceID = Device.nDeviceID)) as SerialNumber
,(SELECT DeviceAttribute.sValue FROM DeviceAttribute WHERE DeviceAttribute.sName = 'Name' AND (DeviceAttribute.nDeviceID = Device.nDeviceID)) as Hostname,
(SELECT DeviceAttribute.sValue FROM DeviceAttribute WHERE DeviceAttribute.sName = 'Location' AND (DeviceAttribute.nDeviceID = Device.nDeviceID))AS Location,
(SELECT DeviceAttribute.sValue FROM DeviceAttribute WHERE DeviceAttribute.sName = 'Model' AND (DeviceAttribute.nDeviceID = Device.nDeviceID)) AS Model,
(SELECT DeviceAttribute.sValue FROM DeviceAttribute WHERE DeviceAttribute.sName = 'GPTAG' AND (DeviceAttribute.nDeviceID = Device.nDeviceID)) AS GPTAG,
(SELECT DeviceAttribute.sValue FROM DeviceAttribute WHERE DeviceAttribute.sName = 'AssetTag' AND (DeviceAttribute.nDeviceID = Device.nDeviceID)) AS AssetTag,
(SELECT DeviceAttribute.sValue FROM DeviceAttribute WHERE DeviceAttribute.sName = 'MACAddress' AND (DeviceAttribute.nDeviceID = Device.nDeviceID)) AS MACAddress
FROM Device JOIN DeviceAttribute ON Device.nDeviceID = DeviceAttribute.nDeviceIDJOIN NetworkInterface ON Device.nDeviceID = NetworkInterface.nDeviceID
WHERE NetworkInterface.sNetworkAddress LIKE '10.63%'ORDER BY IPAddress
PS -- I can send you the raw sql if you desire. Learning mode....
This is great stuff. Have you thought about sharing it on the WUGspace community? That is all things WhatsUp Gold related. Here is the URL:
ReplyDeletehttp://community.whatsupgold.com
Cheers,
The WhatsUp Guru