Notification

Icon
Error

All switches and the assets connected to them

Posted: Tuesday, November 18, 2014 2:39:19 PM(UTC)
Bart.M

Bart.M

Member Original PosterPosts: 13
5
Like
List of switches, some details of the switch and IP, Mask, Mac and Name of the asset connected to them.

No criteria.

Sorted on:
- Assetname name of the switch
- If (alias for IfIndex)

Code:
Select Distinct Top 1000000 tsysAssetTypes.AssetTypeIcon10 As icon,
  tblAssets.AssetID,
  tblAssets.AssetName,
  tsysAssetTypes.AssetTypename As AssetType,
  tblAssets.IPAddress,
  tblAssets.Firstseen,
  tblAssets.Lastseen,
  tblSNMPInfo.IfIndex As [Interface],
  tblSNMPInfo.IfDescription As Name,
  tblSNMPIfTypes.IfTypename As Type,
  tblSNMPInfo.IfAdminstatus As Admin,
  tblSNMPInfo.IfMTU As MTU,
  Ceiling(tblSNMPInfo.IfSpeed / 1000 / 1000) As Speed,
  tblSNMPInfo.IfIPAddress As IP,
  tblSNMPInfo.IfMask As Mask,
  tblSNMPInfo.IfMacaddress As MAC,
  tblAssets1.AssetName As Asset
From tblAssets
  Inner Join tsysAssetTypes On tsysAssetTypes.AssetType = tblAssets.Assettype
  Inner Join tblSNMPInfo On tblAssets.AssetID = tblSNMPInfo.AssetID
  Inner Join tblSNMPIfTypes On tblSNMPIfTypes.IfType = tblSNMPInfo.IfType
  Left Join tblSNMPAssetMac On tblSNMPAssetMac.AssetID = tblSNMPInfo.AssetID And
    tblSNMPAssetMac.IfIndex = tblSNMPInfo.IfIndex
  Left Join tblAssetMacAddress On tblAssetMacAddress.Mac =
    tblSNMPAssetMac.AssetMacAddress
  Left Join tblAssets tblAssets1 On tblAssets1.AssetID =
    tblAssetMacAddress.AssetID
Where tsysAssetTypes.AssetTypename = 'switch'
Order By tblAssets.AssetName,
  [Interface]
CoolDood
#1CoolDood Member Posts: 7  
posted: 12/11/2019 12:15:53 PM(UTC)
I am only getting information on one switch
rader
#2NWSF Member Posts: 2  
posted: 12/12/2019 5:23:34 PM(UTC)
Nicely done. Lists all of our managed switches only. No unmanaged switches of course.
Thanks.

Active Discussions

Lansweeper Jan 2020 Patch Tuesday Report
by  zor999   Go to last post Go to first unread
Last post: Today at 7:36:42 PM(UTC)
Lansweeper Asset config history
by  Chris C.  
Go to last post Go to first unread
Last post: Today at 7:16:15 PM(UTC)
Lansweeper Registry report
by  Jac   Go to last post Go to first unread
Last post: Today at 5:15:00 PM(UTC)
Lansweeper Pull Description from Active Directory
by  Jeff HLava  
Go to last post Go to first unread
Last post: Today at 3:17:10 PM(UTC)
Lansweeper Manually added assets
by  Elmar  
Go to last post Go to first unread
Last post: Today at 11:55:49 AM(UTC)
Lansweeper Updating asset custom fields from Excel
by  steveb   Go to last post Go to first unread
Last post: Yesterday at 7:16:52 PM(UTC)
Lansweeper Changes in the licensing model
by  SolusMIB  
Go to last post Go to first unread
Last post: Yesterday at 6:47:47 PM(UTC)