VMware Cloud Community
henry_hyperic
Contributor
Contributor

Deleting Client from Auto-Discovery

I've got an issue with a couple of clients that were installed and appeared in Auto-Discovery but were re-built before they had been added to the inventory and hence the agent token is wrong when I try to add them now.

I get the following error message in the Auto-Discovery tab when I try to "Add to Inventory" on these nodes:

Unable to import platform : org.hyperic.hq.appdef.shared.AIQApprovalException: Cannot approve platform: Agent with token 1208879697491-5739539444621039996-310325214852132591 not found

I've tried doing a "runagent.sh setup" but this doesn't seem to cater for the scenario where the agent key has changed.

Any suggestions would be appreciated!

Rgds,

Henry
0 Kudos
9 Replies
excowboy
Virtuoso
Virtuoso

Please have a look at some tables in you HQ database, for example with the built-in SQL tool:

http://<YOURHQSERVER>:7080/admin/sql.jsp

select * from eam_aiq_platform;
select * from eam_aiq_server;
select * from eam_aiq_service;


If you see entries of the HQ Agents you've talked about, make a database backup and delete the the approtiate rows from the tables above.

Mirko

P.S. guess aiq means AutoInventoryQuarantine 😉
0 Kudos
henry_hyperic
Contributor
Contributor

Mirko - thanks for that suggestion - that did the trick but I must admit not something I would have thought of doing!

Maybe Hyperic could add another button to the "Auto-Discovery Tab" to ignore/purge a machine...

Rgds,

Henry
0 Kudos
andsupport
Contributor
Contributor

Hi,

Is there a plan to add this 'Purge Auto Discovered' feature?

During testing we accumulated quite a few 'ghost' machines (whilst playing around with the Agents)

🙂

Kind regards,

Geoff
0 Kudos
jkstraw
Contributor
Contributor

This has been a pain for over a year for us. We run in to it often. Here are the direction I got from Hyperic:


Go to: https://your.server.domain:7443/admin/sql.jsp (note I use a secure connection in this example)


To get problem platform ID:

SELECT * FROM EAM_AIQ_PLATFORM;

To Remove:

DELETE FROM EAM_AIQ_IP WHERE AIQ_PLATFORM_ID = <platform id>;

DELETE FROM EAM_AIQ_SERVER WHERE AIQ_PLATFORM_ID = <platform id>;

DELETE FROM EAM_AIQ_PLATFORM WHERE ID = <platform id>;

Note: I believe AIQ = Auto-Inventory Queue
0 Kudos
andsupport
Contributor
Contributor

Thanks JKStraw 🙂

I did it from the command line - didn't think to use the gui lol.

Fingers crossed they add this as a one-click type thing.

Kind regards,

Geoff
0 Kudos
sblandford
Contributor
Contributor

Question: If I've deleted a machine in this way how to I get auto-discovery to re-detect it?

Update:

OK I found the solution. I stop the agent, delete the /opt/hyperic/hyperic-hq-agent/data directory, delete the agent entries from the Recourses then restart the agent with a new token.

The agent should then be re-detected by auto-discovery.

Message was edited by: simonb
0 Kudos
excowboy
Virtuoso
Virtuoso

Hi Simon,

another solution:

Run ' hq-agent.sh setup' to setup the auth token again. Then you don't need to delete the data-directory.


Mirko
0 Kudos
sblandford
Contributor
Contributor

Thanks 🙂
0 Kudos
misaochankun_hy
Contributor
Contributor

I found I needed to do this manually as well.
Heres a bump in hopes it might be noticed.

For future use, I found the following sql helpful.
"shortnamehere" would be the simple name that shows up for the platform.

DELETE FROM EAM_AIQ_SERVICE WHERE NAME LIKE "%shortnamehere%";

DELETE FROM EAM_AIQ_SERVER WHERE NAME LIKE "%shortnamehere%";

DELETE FROM EAM_AIQ_PLATFORM WHERE NAME LIKE "%shortnamehere%";

This helps to catch more of the little bits, without having to dig up IDs and such.
0 Kudos