Hello Guys,
If you ever got stuck with any issue with VMware Usage Meter then you might know that there are not enough troubleshooting KBs from VMware or enough troubleshooting articles on it. I too got stuck in one issue and couldn't find any article which could help me. I raised a SR too but it was pending since weeks without any support from VMware Support team.
I continued to work on it and finally could resolve it by my own hence thought to create a KB here on vcnotes.in.
Issue : Duplicate entry found of same vcenter server through two different vROPS instances. Now need to delete vROPS server from usage meter from product page (Usage Meter Version 4.4). In my case, I didn't want three vROPS entry here and want to delete one which is bringing in the duplicate vcenter entry. This KB will help you to understand how to delete any product from product list in usage meter.
Roadblock : There is no option to delete the vROPS product in version 4.4's GUI. Please note that this version comes with HTML5 interface. In flex interface you could do it but in HTML5, there is no such option for vROPS. Reason is, Usage meter pick vROPS from vCenter MOB extension. I was having below kind of state. I had to change the snippet with vcenter name.
You can see that in vRealize operation page there is a vcenter named vcenter2.vcnotes.in is showing against two different vrops nodes that are 172.17.1.238 and 172.17.1.239.
This is a mess and we need to clean this up. I want to delete the entry against 172.17.1.239 but there is no option to delete.
Solution : Solution is to use API.
1. Connect Usage Meter in API tool as explained below
Header -Credentials -
Once you entered the filed as above, hit the send button, it will give you output like below
Note that in above snippet you have message "202 Accepted", means you are logged in now. Also, you have sessionid in Body. It will be used as a header for further work. Let's check further.Now, the requirement is to delete the product. Use below delete query-
DELETE https://172.25.2.198/api/v1/product?id=8&productType=VROPS&forget=true
Where
api call is - https://172.25.2.198/api/v1/product
id - this is the prdouct ID, well visible in the HTML5 web page when you login in usage meter
product tye - it is to mention that the product you are trying to delete is vcenter, vcd, vrops or something else
forget - it is to delete the history and for full cleanup. You should always use it.
Headers will be -
Accept : Application/json (used earlier)
session id : extracted after login in above steps
Once you have given all the required parameters, hit the send button and targeted product will be delete from VMware Usage meter UI page.
Now when you read above stuff, you should be able to understand this VMware documentation for more information on API operations with VMware usage Meter.
Thank you.
0 Comments:
Post a Comment