Thursday, July 20, 2017

vRealize Log Insight : vRA Provisioning Status - Custom Dashboards Part 1


Both vROPs and vRLI already have Management Pack and Content Pack respectively for vRealize Automation, which shows a lot of useful information.
However recently one of my customer demanded that as a Business Group owner or Tenant Admin, if i want to see 


  • Catalog-Items requested over time
  • Who all requested which all CatalogItems
  • How many successfully deployed and how many failed
  • How much time did it take for the Catalog Request to complete etc etc... 
...without login to the vRA console, how can we achieve it.

The obvious expectation was to monitor it using vROPs or vRLI. But none of them share this information out of the box. 
So it got me thinking that since all this information is available in form of events in 

/var/log/vmware/vcac/catalina.out, if i can use vRLI Custom Dashboard UI to achieve it.

Hence i started working on this project.

In this series of posts, i will try to share the recipe of creating these Dashboards, as the ingredients are unique for every setup. Which is why you may not find a readymade content pack at the end of this blog :)

To begin with Let's start with the first post...


Post Series PART 1: Catalog-Items Request UI







The Marketplace based VMware-vRA 7 content pack shows a bunch of UI widgets in "vRA-Catalog Requests" Dashboard section, however none shows any stats with Catalog-Items names.




This is because every vRA setup has unique internal IDs for the Service Catalog-Items. And vRA events uses these Internal IDs, not the Catalog-Item name itself.

Below is an example of Catalog-Item Request Submission event.


2017-05-17 12:22:57,530 vcac: [component="cafe:catalog" priority="INFO" thread="queue-pool-executer-2" tenant="" context="pRR17pBs" parent="pRR17pBs" token="lV8CyMaO"] com.vmware.vcac.catalog.notifications.NotificationQueuePublisherImpl.send:30 - Publishing notification event for scenario REQUEST_SUBMISSION and entity CatalogItemRequest [catalogItem={[CatalogItem]: Id: [a74e3ca0-ccc6-4a18-a4ff-0d87e83bf38c]}, toString()=Request [requestNumber=305, state=SUBMITTED, requestedFor=vradev@vmwareebc.in, requestedBy=vradev@vmwareebc.in, description=null, reasons=null, organization=Organization[tenant=Tenant [id=vsphere.local, name=vsphere.local],subTenant=SubTenant [id=e811dc4c-9776-4384-94ab-70758f503eed, name=VBC-BG, tenant=Tenant [id=vsphere.local, name=vsphere.local]]], requestorEntitlement=Entitlement: [id=0d4a0e96-f95f-4369-b765-589ce46b93aa] [name=VBC] [status=ACTIVE]

Note: The Catalog-Item reference ID: a74e3ca0-ccc6-4a18-a4ff-0d87e83bf38c refers to a Catalog-Item named "vSphere-Win2k8R2" in this example.

Step 1) Map Reference ID to Catalog-Item Names

So, before we query the events, we need to correlate Catalog Service Name to their respective IDs.
To find the IDs value for each Catalog-Items, search for below string in the vcac/catalina.out event logs...
"principals: [Principal...."

The content after keyword "Principal" is like a reference guide which maps Catalog-Item Name with its corresponding Reference ID. Looks like this...



Step 2) Create Custom Fields

Once we have mapping for Catalog-Items with CatalogItemIDs, we need to create Custom-Fields for each of them.
To learn how to make Custom-Fields using Extract Field function, see
http://pubs.vmware.com/log-insight-45/topic/com.vmware.log-insight.user.doc/GUID-5553DE45-6871-4F28-85C2-867D0F72AAA1.html 
or 
http://sflanders.net/2013/12/19/query-building-log-insight-fields/ 



Create a Custom-Field for all the Catalog-Items like this...


The easy way to do this is, use Extract field function to capture catalogitemID value on one of the events, and name it by the Catalog-Item Name (example: AWS-Suse)

Once you create one Custom-Field, you can duplicate the same field over and over by keep changing the CatalogitemID and Field name.


Step 3) Final Step - Creation of Query and Custom UI
The last and final step is to create a query & dashboard to showcase Catalog Item Request Graph.
Use "all" the below filters and plot it over time series to get the required result.

product                                                    contains                vra
component                                               contains               cafe:catalog
vmw_vra_submitted_request_num            exists
text                                                         contains              request_submission
text                                                         contains              catalogitemrequest
<custom-field-name>                                exists 


An output examples with above query would be like...


Likewise you can create a Custom UI for all the Catalog-Item services.


Next up, how to get the requesting user names reflecting in the custom UI.

1 comment:

  1. Donate a k1dney with the sum of $500,000.00 USD (3 Crore)Email for more details: Email: healthc976@ gmail.com
    Call or whatsapp +91 994 531 7569

    ReplyDelete