Friday, April 20, 2012

Rediscover Interfaces in Reporter Analyzer when Deleted:

One way to force a re-discovery is to delete the router (and interfaces) from the Harvester database and restart the Harvester service. Obviously, take care when doing so

(Working Script)
But before you go there, check the router state.
mysql -P 3308 harvester
select inet_ntoa(router),state from routers order by router;
-- do you see state=2 for these misbehaving devices
----------------

Open a command prompt.
mysql -P 3308 reporter
update routers set lastrefresh=0, firstpollerror=0, nextpollretry=0
where inet_aton('routeraddress');  i.e. ('1.1.1.1');

1.1.1.1=the router ip address
------------------------
Hi John. This is often the result of stale routers in the harvester dbase. On harvester:

Mysql -P 3308 harvester
Delete * from routers;
or
Mysql -P 3308 harvester
Delete 10.246.155.253 from routers;
-------------------------------------
There’s a chance that until the harvester tells the console it sees a “new” device that you won’t see this router. You would have to delete from the routers table, and then the interfaces table (to clean out the interface that were associated with that router) on the harvester…

Mysql -P 3308 harvester
Delete from routers where inet_ntoa(router)=inet_aton(‘10.246.155.253’);

Mysql -P 3308 harvester
Delete from interfaces where routerid(10.246.155.253) not in (select routerid from routers).

Something like that…retype the lines (due to Microsoft smart quotes) and double check column names.
-------------------------------

Your queries are slightly off there.


The ip address is stored as an integer, and inet_aton(‘X.x.x.x’) will give you that integer representation.
The query you’re running is giving you the dotted decimial (using inet_ntoa()) and then comparing it to the integer you got using the inet_aton() command.

***(This one worked)
Mysql -P 3308 harvester
Delete from routers where router = inet_aton('10.246.155.253');
delete from interfaces where router not in (select router from routers);

You don’t need to designate anything concerning the router in the second query because you should never have interfaces that don’t have a router referenced in the routers table, so we would want ot clear any interface out that doesn’t have it’s router represented in the routers table.

Reset both the harvester and the reaper services on that system after making the delete.
------------------------
Instructions from Support Case:


If its a new device and we can delete it you can do the following to delete the device and clean up to allow it to come in fresh.

1)In "Administration->Physical & Virtual", you can select the router then select "Delete"

2)Then also check "Adminstration->Enable Interfaces"  to see if the router
    still shows up here, if so delete it here as well.

3)Then on the Harvester you can run the following mysql queries...

mysql -P3308 harvester
truncate table interfaces;
truncate table routers;

4)Recycle the NetQos Harvester service

Then allow the router to come back in again.

No comments:

Post a Comment