So I went in and added thousands of devices to NPM months ago. I later found out that for some reason during the initial discovery NPM decided to use a random subinterface IP address as the polling address. This is an issue because the subinterfaces don't have DNS entries so when NPM went back and did a reverse DNS query it wasn't able to find an entry and reverted the hostnames back to the subinterface IP.
This happened on somewhere around 4000 nodes. I need to go back and correct this issue, but I want to try and tackle some easier, low-hanging fruit first.
1. I don't want to update all of this via the web GUI because it'll take forever, and I don't have that much spare time.
2. I think the easier and possibly more automated way to fix the issue is to address it directly via the DB Manager.
So here's my plan:
1. I think I can use a simple query to update records and correct entries where they have a SysName polled from SNMP, but they have a Caption that matches their IP_Address.
UPDATE NodesData
SET Caption =(select SysName)
WHERE Caption = IP_Address AND Caption IS NOT NULL
Once I've knocked those ones out, I can do the same thing with the DNS field (I've got a number of switches that aren't populating a hostname for the caption, even though they have an entry in the DNS column.
UPDATE NodesData
SET Caption =(select DNS)
WHERE Caption = IP_Address AND Caption IS NOT NULL
I think these will pare down my list significantly, at which point I can run a query for Caption = IP_Address again and then, using another application, fill in the Caption based on the IP from a separate database.
Does this sound right? Do my queries make working sense? Am I going to completely destroy my DB doing this?
Thanks!
Brian