Long story short, there was a period of time where hosts were added and removed from Observium a number of times (Essentially all hosts added, deleted, added, etc).  In general, there were no ill effects other than losing the previous graph data and ports not being deleted from the DB when hosts were removed.  So now I have this.


mysql> select count(*) from ports;
+----------+
| count(*) |
+----------+
|    20701 |
+----------+
1 row in set (0.00 sec)

907+5+1+582 = 1495

So there are a number of stale/orphaned port entries in the DB.  What would be the best way to fix this?

Thanks!

-Hogan