Today we will focus on the SCOM Network Device Discovery process. Adding Network Devices in SCOM could be a challenge and time consuming, when an external team has to configure the device to authorize SCOM queries it.
In SCOM, You need to:
- Create the Run As Account with the Community String
- Create a Discovery Rule
- Configure the Discovery settings and Account for the Device you want to add
- Ensure that the Network device is well configured to let SCOM discover it
If you have a lot of devices and only one SCOM discovery rule, the discovery could take time….and now, if the device is missed configured, you have to re-do everything and wait wait wait….and test….
Let try to speed up this process by ensuring that the device that we want to discover is well configured for SCOM. For that, I wrote the little PowerShell script that you have to run on the MS that will discover and monitor the Network Device.
$IP = '10.15.5.67' #Ip of the network device you want to discover $Community = 'SCOM_******' #Community string configured on the network device for the SCOM monitoring $SNMP = new-object -ComObject olePrn.OleSNMP $snmp.open($ip,$community) Write-Host "SysName : "$snmp.Get(".126.96.36.199.188.8.131.52.0") Write-Host "SysDescription : "$snmp.Get(".184.108.40.206.220.127.116.11.0") Write-Host "SysObjectID : "$snmp.Get(".18.104.22.168.22.214.171.124.0") Write-Host "SysContact : "$snmp.Get(".126.96.36.199.188.8.131.52.0") Write-Host "SysLocation : "$snmp.Get(".184.108.40.206.220.127.116.11.0") $SNMP.Close()
I targeted the script to a F5 load balancer, the output is below:
Now, that I’m sure that the Network Device is well configured, I could add it to SCOM J
You could of course improve this script by adding a loop for testing multiple devices, reading the devices list from a CSV file, …
I hope this help J