How to remove duplicate devices in the TSPS
The KA only applies if:
- there are no equivalent duplicate devices on the TSIM
- only one of the devices which has duplicates is collecting data in the TSPS
If both conditions match what you're seeing then keep reading.
Try restarting the TSPS. This may be sufficient to remove them without taking any further action from you.
If the devices persist after a TSPS restart, then:
Backup the TSPS database:
Open a command prompt on the TSPS server:
(Where admin is the PostgreSQL database user name configured during install of TSPS as defined in %TRUESIGHTPSERVER_HOME%\TrueSightPServerInstalledConfiguration.xml like this:
CD /D "%TRUESIGHTPSERVER_HOME%\truesightpserver\modules\pgsql\bin\"
echo select * from device | psql truesight > c:\device.txt
Open c:\device.txt and look for the entry/entries of the device(s) that you want to delete. It might have a bogus IP address, like the top two example entries:
7179 | 0 | | dupehostname | dupehostname.company.com | 0.0.0.0 | f | 0 | BmcRealm
58 | 0 | | dupehostname | dupehostname.company.com | 0.0.0.0 | f | 0 | BmcRealm
75 | 0 | | dupehostname | dupehostname.company.com | 220.127.116.11 | f | 0 | BmcRealm
We'll be using the values in the first column in the steps below.
a) Stop the indexserver and core server process using the below commands
tssh process stop csr
tssh process stop indexserver
b) Open the pgAdmin3 UI client from C:\Program Files\BMC Software\TrueSightPServer\truesightpserver\modules\pgsql\bin on the TSPS machine and login to the same.
c) Run the commands as follows:
delete from device where deviceid in (7179,58)
d) Once this is done, please run the command 'tssh server stop', to stop the DB process.
e) Run the command 'tssh server start' to start the TSPS
f) Once TSPS is up, check if the duplicate devices still exists. From the example above, it would have deleted two duplicate devices named dupehostname.