Highlighted
Absent Member.
Absent Member.
803 views

How to delete resource by ID?

So I have a rule that seems to be lingering. It showed up on a resource validation report and shows a URI in a users folder but in the console it doesn't show up there. If I search for the rule by the ID it finds it and I can edit it from there but I don't see any option to delete it since it is not showing up in the folder path where it is supposed to be. Is there an alternative way to delete it?

Labels (1)
0 Likes
5 Replies
Highlighted
New Member.

You can access the mysql database and delete the resource from there. Do at your own risk.

1. SSH to Express / ESM as root

2. Login to database as arcsight user:

Login arcsight user

cd /opt/arcsight/logger/current/arcsight/bin

./mysql -u arcsight -p

Enter password: <your mysql password> (Note: default is 'arcsight' without the single quote)

mysql> use arcsight;

3. Execute this sql statement

mysql> select name from arc_resource where id='<ID of the resource>';

4. Confirm if that is the resource you want to delete and execute:

mysql> delete from arc_resource where id='<ID of the resource>';

0 Likes
Highlighted
Acclaimed Contributor.. Acclaimed Contributor..
Acclaimed Contributor..

You can also delete an object using its UUID using the ESM API.

0 Likes
Highlighted
Absent Member.
Absent Member.

Shaun can you elaborate on this please? I'm not familiar with the ESM API.

0 Likes
Highlighted
Absent Member.
Absent Member.

Thanks Vijay! This is what I was looking for.

0 Likes
Highlighted
Acclaimed Contributor.. Acclaimed Contributor..
Acclaimed Contributor..

Look at:

https://esm:8443/www/manager-service/services/ResourceService?wsdl

The method you are looking for would be called "deleteByUUID".

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.